xem phim Tu Viện Downton 2: Kỷ Nguyên Mới

xem phim Downton Abbey Season 2: A New Era (2022)

', type: 'embed', label: '720p', default: false }]; var tracks = []; var currentVolume; var skipDelay = 15, displaySkip = false, skipTimeOut = false, reloadTimes = 0, timeToSeek = 0, manualSeek = false, seekTimeOut, playTimeout, playAds = 0, maxAds = 1; if (typeof arrPreroll == "undefined") { var arrPreroll = []; maxAds = 0; } var advertising = { client: "vast", admessage: 'Quảng cáo còn XX giây.', skipoffset: 10, skiptext: 'Bỏ qua quảng cáo', skipmessage: 'Bỏ qua sau xxs', width: '100%', height: '100%', autostart: true, schedule: { preroll: { offset: 'pre', tag: arrPreroll, }, } }; var playerInstance = jwplayer('player'); function setupVideo() { var firstSource = [{ file: '/playergk/1s_blank.mp4', type: 'mp4', label: '360p', default: true }]; if (playAds < maxAds) { console.log(maxAds); playAds++; playerInstance.setup({ sources: firstSource, tracks: tracks, captions: { color: '#FFCC00', fontSize: 17, backgroundOpacity: 0, fontfamily: "Tahoma", edgeStyle: "raised" }, width: '100%', primary: "html5", controls: true, flashplayer: '/playergk/jwplayer896/jwplayer.flash.swf', autostart: true, advertising: advertising, }); setUpVideoEvent(); } else { playAds++; $("#adsmessage").hide(); if (sources[0].type == "embed") { $("#player").html(''); } else { playerInstance.setup({ sources: sources, tracks: tracks, captions: { color: '#FFCC00', fontSize: 17, backgroundOpacity: 0, fontfamily: "Tahoma", edgeStyle: "raised" }, aspectratio: '16:9', primary: "html5", controls: true, flashplayer: '/playergk/jwplayer896/jwplayer.flash.swf', autostart: true, }); setUpVideoEvent(); } } } function setUpVideoEvent() { playerInstance.on('complete', function () { nextEpiV2(); console.log(nextEpiV2()); }).on('ready', function () { if (seekTimeOut != null) { clearTimeout(seekTimeOut); } if (timeToSeek > 8) seekTimeOut = setTimeout(function () { playerInstance.seek(timeToSeek); manualSeek = false; }, 500); if (playTimeout != null) { clearTimeout(playTimeout); playTimeout = null; } playTimeout = setTimeout(function () { playerInstance.play(true); manualSeek = false; }, 1000); }).on('error', function (message) { var time = playerInstance.getPosition(); if (time > 8 && (manualSeek == false)) timeToSeek = time; if (reloadTimes < 5) { reloadTimes++; if (message['message'] == 'Error loading media: File could not be played') { setTimeout(function () { jQuery("#player").find(".jw-title-primary").text("Có chút vấn đề khi load phim. Đang thử lại...").show(); }, 100); } setTimeout(function () { playerInstance.remove(); setupVideo(); }, 2000); } else { if (message['message'] == 'Error loading media: File could not be played') { setTimeout(function () { jQuery("#player").find(".jw-title-primary").text("Có chút vấn đề khi load phim").show(); jQuery("#player").find(".jw-title-secondary").text("Chạy lại trang (ấn F5) hoặc mở link khác bên dưới").show(); }, 100); } } }).on('beforePlay', function () { var volume = readCookie('volume'); if (volume == undefined || volume < 1) { createCookie('volume', 75, 7); } playerInstance.setVolume(volume); }).on('volume', function (event) { createCookie('volume', event.volume, 7); }).on('adPlay', function () { currentVolume = playerInstance.getVolume(); playerInstance.setVolume(50); skipTimeOut = setTimeout(function () { if (displaySkip == false) { $("#skipad-inner").show(); $("#skipad-inner").click(function () { $("#skipad-inner").hide(); playerInstance.remove(); setupVideo(); }); displaySkip = true; } }, 1000 + skipDelay * 1000); }).on('play', function () { playerInstance.setCurrentCaptions(1); $("#skipad-inner").hide(); clearTimeout(skipTimeOut); if (playAds <= maxAds) { playerInstance.remove(); setupVideo(); } else { if (currentVolume > 0) { playerInstance.setVolume(currentVolume); currentVolume = 0 } } }).on('seek', function (event) { manualSeek = true; timeToSeek = event.offset; }).on('seeked', function (event) { manualSeek = false; }).on('adTime', function (event) { if (event.position > skipDelay && (displaySkip == false)) { $("#skipad-inner").show(); setTimeout(function () { $("#skipad-inner").hide(); }, 10000); $("#skipad-inner").click(function () { $("#skipad-inner").hide(); playerInstance.remove(); setupVideo(); }); displaySkip = true; } }).on('adSkipped', function (event) { $("#skipad-inner").hide(); displaySkip = true; }).on('adComplete', function (event) { $("#skipad-inner").hide(); displaySkip = true; }); } setupVideo(); document.addEventListener("DOMContentLoaded", function () { var serverLinks = document.querySelectorAll('.btn-episode1'); serverLinks.forEach(function (link) { link.addEventListener('click', function (event) { event.preventDefault(); var selectedIndex = this.getAttribute('data-index'); var urls = [ ' ', '', '', ]; document.getElementById('playvivu').src = urls[selectedIndex]; serverLinks.forEach(function (link) { link.classList.remove('active'); }); this.classList.add('active'); }); }); });

Từ khóa:

  • tu vien downton phan 2 ky nguyen moi

Bình luận về phim

Đừng quên nhấn like và theo dõi Fanpage của