var lastScrollTop = 200; window.addEventListener("scroll", function(){ var st = window.pageYOffset || document.documentElement.scrollTop; var cathide = document.getElementById("main-header"); if (st > lastScrollTop) { //alert(st); cathide.classList.add("dark"); } else if (st < lastScrollTop) { cathide.classList.remove("dark") } //lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling }, false); $(document).ready(function(){ $(".sliderContent").scrollLeft(0); $(".focusyou").focus(); setTimeout(function() {$(".scroll-active").removeClass("scroll-active1111111111");}, 1000); Li_count(); $(window).resize(function(){Li_count();}); function Li_count(){ $('.lolomoRow').each(function(){ var listElements = $(this).find('.slider-item'); var windowsize2 = $(window).width(); if(windowsize2 > 1400) {var liPart =6;}else if(windowsize2 > 1100) {var liPart =5;}else{var liPart =4;} var listCount = listElements.length / liPart; $(this).find('.pagination-indicator').empty(); for(let i = 0; i < listCount; i++) { if(i==0){var liLast = "
  • ";}else{var liLast = "
  • ";} $(this).find('.pagination-indicator').append(liLast); } }); } var timeoutId2; $('.account-menu-item00000').hover(function(e) { $(".account-drop-down").removeClass("hide"); setTimeout(function() {$(".account-menu-item").addClass("account-menu-show");}, 10); window.clearTimeout(timeoutId2); },function() { window.clearTimeout(timeoutId2); //$(this).removeClass("account-menu-show"); timeoutId2 = window.setTimeout(function() {$(".account-menu-item").removeClass("account-menu-show");setTimeout(function() {$(".account-drop-down").addClass("hide");}, 300);}, 1001); }); var timeoutId; $('.slider-item222,#actionMenu222').hover(function(e) { var openbox = $(this).attr("data-modal"); if(openbox){}else{ var xw = $(this).offset(); var img = $(this).find("img").attr("data-src"); var boxsize = $(this).width(); var VideoID = $(this).attr("data-post"); $("#actionMenu").attr("data-post",VideoID); var mini_delete = $(this).attr("data-delete"); window.clearTimeout(timeoutId); timeoutId = window.setTimeout(function() { $(".videoMerchPlayer--boxart-wrapper img").attr("src",img); Mini_modal_info(); $(".mini-pop-delete-btn").removeClass(mini_delete); var y = xw.top - 100; var x = xw.left - -5; //80 var windowsize = $(window).width(); if(windowsize>1920){var boxmax = 595;var xmax = "1vw";} if(windowsize<=1920 && windowsize>1680){var boxmax = 475;} if(windowsize<=1680 && windowsize>1280){var boxmax = 400;} if(windowsize<=1280){var boxmax = 350;} if(x<66){var x = "1vw";}else{ var gsgs = (boxmax - boxsize) / 2; var x = x - gsgs; var x = x +"px";} $("#actionMenu").css({position: "absolute",top: y + "px",left: x,maxWidth: boxmax + "px"}); $(".videoMerchPlayer--boxart-wrapper img").attr("src","https://imgcdn.media/poster/h/"+VideoID+".jpg"); // $(".videoMerchPlayer--boxart-wrapper img").attr("src","https://i0.wp.com/img.nfmirrorcdn.top/poster/h/"+VideoID+".jpg"); $("#pop-box").removeClass("hide"); $(".previewModal--info").show(200); $('#actionMenu').css({animation: "fadeIn2 0.215s linear"}); setTimeout(function(){ $("#actionMenu").attr("data-box","open"); }, 95); }, 700);} },function() { //$("#actionMenu").on("mouseleave",function() { var openbox = $("#actionMenu").attr("data-box"); window.clearTimeout(timeoutId); timeoutId = null; setTimeout(function() { if(openbox=="open"){ $('#actionMenu').css({animation: "fadeOut2 0.25s linear"}); setTimeout(function(){ $("#pop-box").addClass("hide");Mini_modal_info_clear();$("#actionMenu").attr("data-box","close");$(".videoMerchPlayer--boxart-wrapper img").attr("src",""); }, 195); } }, 100); }); //}); Re_newdata(); }); function Mini_modal_info(){ var t = $("body").attr("data-time"); var vid = $("#actionMenu[data-post]").attr("data-post"); $.ajax({type: "GET", url: "/mini-modal-info.php", data:{id:vid,t:t}, success: function(result){ $("#actionMenu[data-post="+vid+"]").find(".mini-modal-match").text(result.match); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-hdsd").text(result.hdsd); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-age").text(result.ua); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-runtime").text(result.runtime); genre = result.genre.replaceAll(", ", ""); $("#actionMenu[data-post="+vid+"]").find(".evidence-text").html(genre); }, error: function () {alert("Post data fetch failed");} }); } function Mini_modal_info_clear(){ $("#actionMenu[data-post]").find(".mini-modal-match").empty(); $("#actionMenu[data-post]").find(".mini-modal-hdsd").empty(); $("#actionMenu[data-post]").find(".mini-modal-age").empty(); $("#actionMenu[data-post]").find(".mini-modal-runtime").empty(); $("#actionMenu[data-post]").find(".evidence-text").empty(); $("#actionMenu[data-post]").find(".mini-pop-delete-btn").addClass("hide"); $("#pop-box").addClass("hide"); } function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else {expires = "";} document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; domain="+location.host.split(":")[0]+"; path=/"; } function readCookie(name) { var nameEQ = encodeURIComponent(name) + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) === 0)return decodeURIComponent(c.substring(nameEQ.length, c.length)); } return null; } $(".searchTab").click(function() { $(".searchInput").removeClass("hide"); $(".searchTab").addClass("hide"); $("#searchInput").focus(); }); $(".searchboxClose").click(function() { $(".searchInput").addClass("hide"); $(".searchTab").removeClass("hide"); //$("#bodyPage").removeClass("hide"); //$("#searchPage").addClass("hide"); $(".search-result").empty(); $("#bodyPage:not(.show)").toggle(500).addClass("show"); $("#searchPage:not(.notshow)").toggle(500).addClass("notshow"); $("#searchInput").val(null); }); var timeoutId; $("#searchInput").on("input", function() { window.clearTimeout(timeoutId); timeoutId = window.setTimeout(function() {search_input();}, 2000); $("#bodyPage.show").toggle(500).removeClass("show"); //$("#bodyPage").addClass("hide"); $("#searchPage.notshow").toggle(500).removeClass("notshow");}); $(".open-modal,.billboard-links").click(function() { var post_id = $(this).attr("data-post"); set_model_post(post_id); //$('.modal-body').css({animation: "fadeIn3 0.4s linear"}); }); $(".open-modal2,.modal-mini-play").click(function() { var post_id = $("#actionMenu").attr("data-post"); set_model_post(post_id); //$('.modal-body').css({animation: "fadeIn3 0.4s linear"}); }); $(".setOTT").click(function() { var ott_id = $(this).attr("data-ott"); $(".move-ott").removeClass("hide"); $.ajax({type: "POST", url: "/tv/setting.php", data:{ott:ott_id}, success: function(result){ if(result.error=="no"){setTimeout(function(){location.reload();}, 3000); }else{$(".move-ott").addClass("hide");alert_msg("danger",result.error);alert(result.error);} }}); }); $(".moreOTT").click(function() { if ($(".ottBOX").hasClass("hide123")) { $(".ottBOX").removeClass("hide123").hide(500);}else{$(".ottBOX").addClass("hide123").show(500);} }); $(".modal-bg,.previewModal-close").click(function() { clear_model_post(); $('.modal-body').css({animation: "fadeOut3 0.601s linear"}); }); function set_lang(elem,Lang){ $(".audio_lang_list a").removeClass("active"); var thislang = $(elem); $.ajax({type: "POST", url: "/language.php", data:{lang:Lang}, success: function(result){ thislang.addClass("active"); },error: function () {alert("Language Set Failed, Internet ERROR");} }); } function clear_model_post(){ $(".modal-main").scrollTop(0); setTimeout(function() { $("body").removeClass("overflow"); $(".modal-main").addClass("hide"); $(".modal-bg").addClass("hide"); $(".episode-lists").addClass("hide"); $(".modal-head-data").addClass("hide"); $(".modal-head-title").text(""); $(".model-ep-box .season-box").empty(); $(".btn-main-play").text('Play'); $("#modal-main").attr("data-post", "").attr("data-type", "").attr("data-ep", ""); $(".modal-img").attr("src",""); $(".modal-releted-content").addClass("collapsed"); $(".model-match").empty(); $(".model-year").empty(); $(".model-runtime").empty(); $(".model-hdsd").empty(); $(".more-episodes").addClass("hide"); $(".more-episodes .section-expandButton").attr("data-nextPage", "").attr("data-nextPageSeason", ""); $(".modal-m_reason").empty(); $(".model-Thisis").empty(); $(".model-Genres").empty(); $(".model-Cast").empty(); $(".model-Writer").empty(); $(".model-Director").empty(); $(".model-Creator").empty(); $(".model-ua").empty(); $(".model-Maturity-info").empty(); $(".audio_lang_list").empty(); $(".focusyou").focus(); ep_placeholder(); releted_placeholder(); $("#modal-main").addClass("modal-placeholder"); }, 500); } function set_model_post(post_id=""){ $('.modal-body').css({animation: "fadeIn3 0.4s linear"}); var t = $("body").attr("data-time"); $(".modal-main").removeClass("hide"); $(".modal-bg").removeClass("hide"); $("#modal-main").attr("data-post",post_id); //$(".modal-img").attr("src","https://i0.wp.com/img.nfmirrorcdn.top/poster/h/"+post_id+".jpg"); $(".modal-img").attr("src","https://imgcdn.media/poster/h/"+post_id+".jpg"); setTimeout(function() {$('.modal-main-play').focus();}, 1000); $("body").addClass("overflow"); $.ajax({type: "GET", url: "/post.php", data:{id:post_id,t:t}, success: function(result){ $(".model-title").text(result.title); $(".model-year").text(result.year); $(".model-ua").text(result.ua); $(".model-match").text(result.match); $(".model-runtime").text(result.runtime); $(".model-hdsd").text(result.hdsd); $(".model-description").text(result.desc); $("#modal-main").attr("data-type", result.type); if(result.resume){ $(".btn-main-play").text('Resume'); $(".modal-head-time").text(result.resume_time); $(".modal-head-data").removeClass("hide"); $(".modal-head-percent").css({width: result.resume_percent+"%"}); $(".modal-head-title").text(result.resume_title); } if(result.creator){$(".model-Creator").html('Creators: '+result.creator+'');} if(result.director){$(".model-Director").html('Director: '+result.director+'');} if(result.writer){$(".model-Writer").html('Writer: '+result.writer+'');} if(result.cast){$(".model-Cast").html('Cast: '+result.cast+'');} if(result.genre){$(".model-Genres").html('Genres: '+result.genre+'');} if(result.m_reason){$(".modal-m_reason").text(result.m_reason);} if(result.m_desc){$(".model-Maturity-info").text(result.m_desc);} if(result.oin){$(".model-film-series-img").html('');} $("#modal-main").removeClass("modal-placeholder"); suggest_data(result.suggest); audio_lang(result.lang,result.d_lang); if(result.type=="t"){ $(".episode-lists").removeClass("hide"); $("#modal-main").attr("data-ep", result.last_ep); if(result.thismovieis){$(".model-Thisis").html('This show is: '+result.thismovieis+'');} if(result.nextPageShow=="1"){$(".more-episodes").removeClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", result.nextPage).attr("data-nextPageSeason", result.nextPageSeason);}else{$(".more-episodes").addClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", "").attr("data-nextPageSeason", "");} ep_data(result.episodes); select_season(result.season); }else{ //suggest_data(result.suggest); if(result.thismovieis){$(".model-Thisis").html('This Movie is: '+result.thismovieis+'');} $(".model-mlt").addClass("active"); $(".model-mlt-box").addClass("active-box"); $(".model-ep").addClass("hide");} $(".modal-body-c").addClass("hide"); $(".modal-body-d").removeClass("hide"); }, error: function () {alert("Post data fetch failed");} }); } function search_input(){ var t = $("body").attr("data-time"); var search_quary = $("#searchInput").val(); $(".search-result").empty(); $("#searchPage h1").remove(); $(".search-result").before('

    Loading Please Wait.

    '); $.ajax({type: "GET", url: "/search.php", data:{s:encodeURIComponent(search_quary),t:t}, success: function(result){ //$(".search-head").text(result.head) search_data(result.searchResult); }, error: function () {alert("Episode Load failed");} }); } function search_data(searchData){ $(".search-result").empty(); $("#searchPage h1").remove(); $("html").scrollTop(0); var Searchnum = 1; $.each(searchData, function(index, jsonObject){ if(Object.keys(jsonObject).length > 0){ $(".search-result").append('
    '+jsonObject[
    '); ++Searchnum; } }); if(Searchnum==1){$(".search-result").before('

    Nothing Found with this Keywords.

    ');} $(".search-post").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });}); var timeoutId; $('.search-post000').hover(function(e) { var openbox = $(this).attr("data-modal"); if(openbox){}else{ var xw = $(this).offset(); var img = $(this).find("img").attr("data-src"); var boxsize = $(this).width(); var VideoID = $(this).attr("data-post"); $("#actionMenu").attr("data-post",VideoID); window.clearTimeout(timeoutId); timeoutId = window.setTimeout(function() { $(".videoMerchPlayer--boxart-wrapper img").attr("src",img); Mini_modal_info(); var y = xw.top - 100; var x = xw.left - 0; //80 //alert(x); var windowsize = $(window).width(); if(windowsize>1920){var boxmax = 595;var xmax = "1vw";} if(windowsize<=1920 && windowsize>1680){var boxmax = 475;} if(windowsize<=1680 && windowsize>1280){var boxmax = 400;} if(windowsize<=1280){var boxmax = 350;} if(x<105){var x = "1vw";}else{ var gsgs = (boxmax - boxsize) / 2; var x = x - gsgs; var x = x +"px";} $("#actionMenu").css({position: "absolute",top: y + "px",left: x,maxWidth: boxmax + "px"}); $(".videoMerchPlayer--boxart-wrapper img").attr("src","https://imgcdn.media/poster/h/"+VideoID+".jpg"); //$(".videoMerchPlayer--boxart-wrapper img").attr("src","https://img.nfmirrorcdn.top/poster/h/"+VideoID+".jpg"); $("#pop-box").removeClass("hide"); $(".previewModal--info").show(200); $('#actionMenu').css({animation: "fadeIn2 0.15s linear"}); setTimeout(function(){ $("#actionMenu").attr("data-box","open"); }, 95); }, 700);} },function() { var openbox = $("#actionMenu").attr("data-box"); window.clearTimeout(timeoutId); timeoutId = null; setTimeout(function() { if(openbox=="open"){ $('#actionMenu').css({animation: "fadeOut2 0.2s linear"}); setTimeout(function(){ $("#pop-box").addClass("hide");Mini_modal_info_clear();$("#actionMenu").attr("data-box","close");$(".videoMerchPlayer--boxart-wrapper img").attr("src",""); }, 195); } }, 100); }); } function suggest_data(suggestData){ $(".modal-releted-list").empty(); $.each(suggestData, function(index, jsonObject){ if(Object.keys(jsonObject).length > 0){ //$(".model-mlt-box").append('
    '+jsonObject[
    '); $(".modal-releted-list").append('
    '+jsonObject["t"]+'

    '+jsonObject["d"]+'

    '); } }); $(".titleCard-imageWrapper,.titleCard--metadataWrapper button").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });}); } function set_model_post_related(vid){ clear_model_post(); $('.modal-body').css({animation: "fadeOut3 0.501s linear"}); setTimeout(function() { set_model_post(vid); }, 900); } $(".modal-mylist").click(function() { var post_id = $("#modal-main").attr("data-post"); MyWatchList(post_id); }); $(".mini-pop-mylist").click(function() { var post_id = $("#actionMenu").attr("data-post"); MyWatchList(post_id); }); $(".mini-pop-delete-btn").click(function() { var post_id = $("#actionMenu").attr("data-post"); //alert(); Mini_modal_info_clear(); $('[data-post="'+post_id+'"][data-delete]').remove(); $.ajax({type: "POST", url: "/recentplay.php", data:{deleteid:post_id}, success: function(result){}}); }); $(".modal-releted-content .section-expandButton").click(function() { if ($(".modal-releted-content").hasClass("collapsed")) { $(".modal-releted-content").removeClass("collapsed");}else{$(".modal-releted-content").addClass("collapsed");} }); $(".notifications-menu").click(function() { if ($(".notifications-menu-box").hasClass("hide123")) { $(".notifications-menu-box").removeClass("hide123").hide(500);}else{$(".notifications-menu-box").addClass("hide123").show(500);} }); $(".more-episodes .section-expandButton").click(function() { var t = $("body").attr("data-time"); var s = $(this).attr("data-nextpageseason"); var nextPage = $(this).attr("data-nextpage"); var series = $("#modal-main").attr("data-post"); $.ajax({type: "GET", url: "/episodes.php", data:{s:s,series:series,t:t,page:nextPage}, success: function(result){ if(result.nextPageShow=="1"){$(".more-episodes").removeClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", result.nextPage).attr("data-nextPageSeason", result.nextPageSeason);}else{$(".more-episodes").addClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", "").attr("data-nextPageSeason", "");} ep_data(result.episodes,"no"); }, error: function () {alert("Episode Load failed");} }); }); function MyWatchList(VideoID) { $.ajax({type: "POST", url: "/tv/MyWatchList.php", data:{id:VideoID}, success: function(result){ var eee = $(window).width(); //alert_msg(result.col,result.msg); alert_msg(result.col,eee); }, error: function () {alert("Episode Load failed");} }); } function Re_newdata(){ var t_hash = $("body").attr("data-hash"); $.ajax({type: "POST", url: "/tv/p.php", data:{hash:t_hash}, success: function(result){ if(result.r=="y"){location.reload();} } }); } function alert_msg(color,msg,secs="5000") { $(".pop-alert").html(msg).addClass(color).addClass("show"); setTimeout(function(){$(".pop-alert").text("").removeClass(color).removeClass("show"); }, secs); } function select_season(season){ $.each(season, function(index, jsonObject){ if(Object.keys(jsonObject).length > 0){ $(".model-ep-box .season-box").append(''); } }); } function audio_lang(lang,d_lang){ $(".audio_lang_list").empty(); $.each(lang, function(index, jsonObject){ if(Object.keys(jsonObject).length > 0){ if(jsonObject["s"]==d_lang){dlang="class=\"active\" ";}else{dlang="";} $(".audio_lang_list").append(''+jsonObject["l"]+''); } }); $(".audio_lang_list a").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'end' });}); } function ep_data(object,clear_ep_box="yes"){ if(clear_ep_box=="yes"){$(".model-episodes-list").empty();} $.each(object, function(index, jsonObject){ if(Object.keys(jsonObject).length > 0){ if(jsonObject["complate"]=="0"){var parcent ='';}else{var parcent ='';} $(".model-episodes-list").append('
    '+jsonObject["ep"]+'
    '+jsonObject[
    '+parcent+'
    '+jsonObject["t"]+''+jsonObject["time"]+'

    '+jsonObject["ep_desc"]+'

    '); } }); $(".episode-item").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });}); } $('.season-box').change(function () { ep_placeholder(); var t = $("body").attr("data-time"); var s = $(this).val(); var series = $("#modal-main").attr("data-post"); $.ajax({type: "GET", url: "/episodes.php", data:{s:s,series:series,t:t}, success: function(result){ if(result.nextPageShow=="1"){$(".more-episodes").removeClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", result.nextPage).attr("data-nextPageSeason", result.nextPageSeason);}else{$(".more-episodes").addClass("hide");$(".more-episodes .section-expandButton").attr("data-nextPage", "").attr("data-nextPageSeason", "");} ep_data(result.episodes); audio_lang(result.lang,result.d_lang); }, error: function () {alert("Episode Load failed");} }); }); function ep_placeholder(){ $(".model-episodes-list").empty().html('
    '); } function releted_placeholder(){ $(".modal-releted-list").empty().html('
    '); } $('.handlePrev').click(function(event) { event.preventDefault(); var prevdt = $(this).closest(".slider").find(".pagination-indicator li.active").prev('li'); if(prevdt.length > 0){$(this).closest(".slider").find(".pagination-indicator li.active").removeClass("active").prev('li').addClass("active");} var rightside = $(this).closest(".slider").find(".sliderContent").width(); $(this).closest(".slider").find(".sliderContent").animate({scrollLeft: "-="+ rightside +"px"}, "slow"); }); $('.handleNext').click(function(event) { event.preventDefault(); $(this).closest(".slider").addClass("scroll-active"); $(this).closest(".slider").find(".handlePrev").addClass("active"); var leftside = $(this).closest(".slider").find(".sliderContent").width(); var nextdt = $(this).closest(".slider").find(".pagination-indicator li.active").next('li'); if(nextdt.length > 0){$(this).closest(".slider").find(".pagination-indicator li.active").removeClass("active").next('li').addClass("active");} $(this).closest(".slider").find(".sliderContent").animate({scrollLeft: "+="+leftside +"px"}, "slow"); }); function eps_play(VideoID){playerstart(VideoID);} function audio_menu(){setTimeout(function(){ $('.jw-icon-settings').trigger( "click" );$('.jw-submenu-audioTracks').trigger( "click" );}, 100);} $(".modal-main-play").click(function(e){ var type = $("#modal-main").attr("data-type"); if(type=="t"){var VideoID = $("#modal-main").attr("data-ep");}else{var VideoID = $("#modal-main").attr("data-post");} playerstart(VideoID); }); function playerstart(VideoID) { window.location.href = "/tv/play/"+VideoID+"/"; } function playerstart222(VideoID) { var t = $("body").attr("data-time"); var gettitle = $(".model-title").text(); $("#player").removeClass("hide"); $("body").addClass("overflow3"); const playerInstance = jwplayer('jw').setup({ playlist: "/tv/playlist.php?id="+VideoID+"&t="+encodeURIComponent(gettitle)+"&tm="+t, width: "100%", height: "100%", preload: "auto", label: "360p", default: true, hlshtml: true, //autostart: false, autostart: "viewable", primary: 'html5', //type: "application/vnd.apple.mpegurl", type:"mp4", androidhls: true, horizontalVolumeSlider: true, playbackRateControls: true, pipIcon:"disabled", //defaultBandwidthEstimate: 4000, //"stretching": "uniform", //responsive: true, "key": "c6Wt+3BVVfc9af5UKM76pP5Vxu+Tu55CBvqMZGg3pEc=", "skin": { "controlbar": { "background": "rgba(245, 245, 245, 0)", "icons": "#ffffff", "iconsActive": "rgb(244, 129, 129)" }, "timeslider": { "progress": "rgba(253, 0, 0)", "rail": "rgba(247, 244, 244, 0.40)", "buffer": "rgb(255, 255, 255)" }, "tooltips": { "background": "rgb(98, 98, 98)", "text": "#FFFFFF" }}, }); playerInstance.on('play', function(){ var type = $("#modal-main").attr("data-type"); if(type=="t"){ var SeriesID = $("#modal-main").attr("data-post"); createCookie("SE"+SeriesID, VideoID,60); } //if(type=="t"){var RecentPlay = "SE"+SeriesID;}else{var RecentPlay = VideoID;} //$.ajax({type: "POST", url: "/recentplay.php", data:{recentplay:RecentPlay}, success: function(result){} //}); }); playerInstance.once('play', function(){ var type = $("#modal-main").attr("data-type"); if(type=="t"){ var SeriesID = $("#modal-main").attr("data-post"); var RecentPlay = "SE"+SeriesID;}else{var RecentPlay = VideoID;} $.ajax({type: "POST", url: "/recentplay.php", data:{recentplay:RecentPlay}, success: function(result){} }); if(type=="t"){ var nextep = $('[data-ep_id="'+VideoID+'"]').next('[data-ep_id]').attr("data-ep_id"); if(nextep.length > 0){ $(".jw-nextup-thumbnail").before(''); $('.jw-nextup-container').css({"visibility": "visible"}); } } }); playerInstance.on('buffer', function(){ //if($("#player").find("player-msg")){}else{$(".jw-title-primary").before('You\'re Watching');} }); playerInstance.on('error', function(){ $(".jw-error-text.jw-reset-text").html('Video Under Progress.Try Again After Some Time.'); }); playerInstance.on('ready', function(){ var getYear = $(".model-year").text(); var getUA = $(".model-ua.player-ua").text(); var getTime = $(".model-runtime").text(); var getDesc = $(".model-description").text(); var centerTitle = $(".model-title").text(); $(".jw-title-primary").before("You\'re Watching"); $(".jw-title-secondary").append(""+getYear+" "+getUA+" "+getTime+""); if($("#modal-main").attr("data-type")=="t"){ var EpTitle = $('[data-ep_id="'+VideoID+'"]').find(".titleCard-title_text").text(); var Epnum = $('[data-ep_id="'+VideoID+'"]').attr("data-post"); var EpDesc = $('[data-ep_id="'+VideoID+'"]').find(".previewModal--small-text").text(); $(".jw-title-secondary").after("
    "+EpTitle+": Ep "+Epnum+"
    "); $(".jw-reset.jw-spacer").html('E'+Epnum+' '+centerTitle+' – '+EpTitle+''); if(EpDesc){var getDesc=EpDesc;} }else{$(".jw-reset.jw-spacer").html(''+centerTitle+'');} $(".jw-title.jw-reset-text").append("

    "+getDesc+"

    "); $(".jw-button-container .jw-icon-next").replaceWith('
    '); //$(".jw-display-icon-rewind .jw-icon-rewind").html(''); $(".jw-controlbar .jw-icon-rewind .jw-svg-icon-rewind").before('').remove(); $(".jw-icon-forward").click(function() {playerInstance.seek(playerInstance.getPosition() + 10);}); $(".jw-controls").append('
    '); $(".btn-payer-back").click(function(e) { $("#player").addClass("hide"); $("body").removeClass("overflow3"); //$(".player-box #jw").empty(); jwplayer().stop().remove(); }); }); playerInstance.once('play', function() { let cookieData = readCookie(VideoID); if (cookieData) { //return logger.log('No video resume cookie detected. Refresh page.'); var resumeAt = cookieData.toString().split(':'); if (resumeAt[1] != resumeAt[0]) { //alert(resumeAt[0]); playerInstance.seek(resumeAt[0]); //logger.log('Resuming at ' + resumeAt); //return; } } //logger.log('Video ended last time! Will skip resume behavior'); }); playerInstance.on('time', function(e) { var dur2 = playerInstance.getDuration(); var dur = dur2.toString().split('.'); var pos = e.position.toString().split('.'); //alert(pos[0]); if(pos[0] > 20){createCookie(VideoID, `${Math.floor(e.position)}:${dur[0]}`,60);} }); //playerInstance.addButton('/img/zoom222222.svg','Zoom', function() {zoom_func();},'Zoom'); playerInstance.addButton('/img/audiomenu22.svg','Audio Menu', function() {if ($("#jw-jw-settings-menu").attr("aria-expanded")=="true"){}else{audio_menu();}},'Audio Menu'); } $(".focusme").focus(function(){ $(".focusme").removeClass("focusyou"); $(this).addClass("focusyou"); }); $(".logo.icon-logoUpdate").focus(function(){ $("html")[0].scrollTo({ top: 0, left: 0, behavior: "smooth", }); }); $(".logo.icon-logoUpdate99").hover(function(){ $("html")[0].scrollTo({ top: 0, left: 0, behavior: "smooth", }); }); $(".sliderContent22 > *").focus(function(){ $(this)[0].closest('.sliderContent').scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' }); }); function scrollto (target) { document.documentElement.scrollTop = document.body.scrollTop = target.offset().top - (window.innerHeight - target.height()) / 2 - 50; //$('html').animate({ // scrollTop: target.offset().top - (window.innerHeight - target.height()) / 2 - 50; //document.documentElement.scrollTop = document.body.scrollTop = target.offset().top - (window.innerHeight - target.height()) / 2 - 50; // }, 1000); //$(this).closest('.sliderContent')[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' }); } function scrollTo22 (id) { $('html,body').animate({ scrollTop: id.offset().top - $(window).height()/2 }, 1000); } $(".open-modal").focus(function(){ scrollto($(this)); $(this)[0].scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' }); //$(this).closest('.sliderContent')[0].scrollIntoView({ behavior: 'smooth', block: 'center' }); }); $(".buttonControls--container .scroll-midd").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });}); $(".buttonControls--container .scroll-topp").focus(function(){$(this)[0].scrollIntoView({ behavior: 'smooth', block: 'end', inline: 'nearest' });});