@viewlift/player-backup 2.0.73-smartTv → 2.0.74-smartTv
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-1f49211b.js → autoNextVideo-b7e91ff3.js} +1 -1
- package/cjs/bundle.css +2 -2
- package/cjs/{features-43b5c4f0.js → features-6abeaa09.js} +1 -1
- package/cjs/{generic-eff9f2d5.js → generic-6bf3ba02.js} +1 -1
- package/cjs/{index-0243ab75.js → index-2ee2a39b.js} +1 -1
- package/cjs/{index-2414bf78.js → index-391dd643.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-4152c3fb.js → multicamv2-421ec910.js} +1 -1
- package/cjs/{multicamv2-97f57710.js → multicamv2-4fdb520e.js} +1 -1
- package/cjs/{nextEpisodeButton-2f8a5dcf.js → nextEpisodeButton-076f0135.js} +1 -1
- package/cjs/{playlist-261f3571.js → playlist-3861f880.js} +1 -1
- package/cjs/{series-50af9773.js → series-3e119ba2.js} +1 -1
- package/cjs/{series-v2-138050e8.js → series-v2-26d49c70.js} +1 -1
- package/cjs/{series-v2-07ce65b0.js → series-v2-88c9fe30.js} +1 -1
- package/cjs/{skin-62650b0f.js → skin-0131ea28.js} +1 -1
- package/cjs/{skin-88b9e5b1.js → skin-5192bd86.js} +1 -1
- package/cjs/{skin-c02dde27.js → skin-75c04f58.js} +1 -1
- package/cjs/{skin-3bdd38e0.js → skin-beebad4a.js} +1 -1
- package/cjs/{skin-b79a429d.js → skin-eaccb61e.js} +1 -1
- package/cjs/{skin-10e868b9.js → skin-ebf1c61b.js} +1 -1
- package/cjs/{skin-3117b6f1.js → skin-ff25c748.js} +1 -1
- package/cjs/{videoSelector-bccb16ce.js → videoSelector-5e111200.js} +1 -1
- package/cjs/{videoSelector-338918fc.js → videoSelector-6171c2a7.js} +1 -1
- package/esm/{autoNextVideo-3f83b349.js → autoNextVideo-69a951c0.js} +1 -1
- package/esm/bundle.css +2 -2
- package/esm/{features-b4c00ff4.js → features-9a994afb.js} +1 -1
- package/esm/{generic-d14a701a.js → generic-ecdd66bc.js} +1 -1
- package/esm/{index-2257f4dd.js → index-82c877d2.js} +1 -1
- package/esm/{index-7e56199c.js → index-962dee5d.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-d637c59b.js → multicamv2-623eca21.js} +1 -1
- package/esm/{multicamv2-0545a0ae.js → multicamv2-6b4b899a.js} +1 -1
- package/esm/{nextEpisodeButton-3bdc1a02.js → nextEpisodeButton-36ca385c.js} +1 -1
- package/esm/{playlist-15c1cf5a.js → playlist-854a1c2a.js} +1 -1
- package/esm/{series-dc5effb9.js → series-ef0753e5.js} +1 -1
- package/esm/{series-v2-9b928249.js → series-v2-6d69b4c4.js} +1 -1
- package/esm/{series-v2-6ab87b3b.js → series-v2-9cec905e.js} +1 -1
- package/esm/{skin-0816e9e9.js → skin-1ce04d9e.js} +1 -1
- package/esm/{skin-049e3470.js → skin-290e8407.js} +1 -1
- package/esm/{skin-6308bce9.js → skin-5f4514f0.js} +1 -1
- package/esm/{skin-4d7c7bee.js → skin-6c7025a3.js} +1 -1
- package/esm/{skin-374cfb40.js → skin-c82837a4.js} +1 -1
- package/esm/{skin-a9e96e66.js → skin-ea45bc48.js} +1 -1
- package/esm/{skin-1ef7495f.js → skin-f339b646.js} +1 -1
- package/esm/{videoSelector-5275b274.js → videoSelector-e8d8f5e5.js} +1 -1
- package/esm/{videoSelector-05c05c24.js → videoSelector-fec759ed.js} +1 -1
- package/package.json +1 -1
- package/cjs/autoNextVideo-50bf0bcb.js +0 -1
- package/cjs/autoNextVideo-836d16c3.js +0 -1
- package/cjs/autoNextVideo-fb6d3116.js +0 -1
- package/cjs/autoNextVideo-ff4a5872.js +0 -1
- package/cjs/features-48d14d21.js +0 -1
- package/cjs/features-9ff981d6.js +0 -1
- package/cjs/features-d5a19c52.js +0 -1
- package/cjs/features-e8393717.js +0 -1
- package/cjs/generic-270e0c0e.js +0 -1
- package/cjs/generic-9dbaac2c.js +0 -1
- package/cjs/generic-b8561129.js +0 -1
- package/cjs/generic-c3ef1a4c.js +0 -1
- package/cjs/index-1b366d64.js +0 -1
- package/cjs/index-27816143.js +0 -1
- package/cjs/index-4282d6c8.js +0 -1
- package/cjs/index-7d0e79b0.js +0 -1
- package/cjs/index-7deb8e51.js +0 -1
- package/cjs/index-952059d8.js +0 -1
- package/cjs/index-a5bc95df.js +0 -1
- package/cjs/index-f8f03b72.js +0 -1
- package/cjs/multicamv2-4a03ff7a.js +0 -1
- package/cjs/multicamv2-59658c00.js +0 -1
- package/cjs/multicamv2-733a4c98.js +0 -1
- package/cjs/multicamv2-afab5e59.js +0 -1
- package/cjs/multicamv2-b0297c16.js +0 -1
- package/cjs/multicamv2-e582b219.js +0 -1
- package/cjs/multicamv2-e60917aa.js +0 -1
- package/cjs/multicamv2-f25bdf97.js +0 -1
- package/cjs/nextEpisodeButton-458c85bb.js +0 -1
- package/cjs/nextEpisodeButton-b62010fa.js +0 -1
- package/cjs/nextEpisodeButton-db512765.js +0 -1
- package/cjs/nextEpisodeButton-dbbf6459.js +0 -1
- package/cjs/playlist-452d88c2.js +0 -1
- package/cjs/playlist-da8132ef.js +0 -1
- package/cjs/playlist-dc7fd81d.js +0 -1
- package/cjs/playlist-f6dc47d2.js +0 -1
- package/cjs/series-5379adf3.js +0 -1
- package/cjs/series-62cf13d7.js +0 -1
- package/cjs/series-f93fa395.js +0 -1
- package/cjs/series-fa977c7b.js +0 -1
- package/cjs/series-v2-1540a570.js +0 -1
- package/cjs/series-v2-26fac2cb.js +0 -1
- package/cjs/series-v2-446ef683.js +0 -1
- package/cjs/series-v2-5db6fcc5.js +0 -1
- package/cjs/series-v2-a0ce7016.js +0 -1
- package/cjs/series-v2-aeb231ee.js +0 -1
- package/cjs/series-v2-dbf8f5c5.js +0 -1
- package/cjs/series-v2-f1dbee5e.js +0 -1
- package/cjs/skin-02cc96c7.js +0 -1
- package/cjs/skin-0d2d9d9c.js +0 -1
- package/cjs/skin-11200134.js +0 -1
- package/cjs/skin-1fb711b8.js +0 -1
- package/cjs/skin-251297dc.js +0 -1
- package/cjs/skin-28e40e43.js +0 -1
- package/cjs/skin-389e200a.js +0 -1
- package/cjs/skin-3e832338.js +0 -1
- package/cjs/skin-408082dc.js +0 -1
- package/cjs/skin-4e3109f5.js +0 -1
- package/cjs/skin-5e026b9e.js +0 -1
- package/cjs/skin-5e6de97a.js +0 -1
- package/cjs/skin-66bb1abb.js +0 -1
- package/cjs/skin-71bb1a0a.js +0 -1
- package/cjs/skin-7cd44fdf.js +0 -1
- package/cjs/skin-7de5dd6b.js +0 -1
- package/cjs/skin-9319e6f5.js +0 -1
- package/cjs/skin-95078d13.js +0 -1
- package/cjs/skin-a4de7dc7.js +0 -1
- package/cjs/skin-a9258d0d.js +0 -1
- package/cjs/skin-c165b563.js +0 -1
- package/cjs/skin-d1c415fe.js +0 -1
- package/cjs/skin-d7cd2ac9.js +0 -1
- package/cjs/skin-db8f3b08.js +0 -1
- package/cjs/skin-e0505707.js +0 -1
- package/cjs/skin-eb1292bc.js +0 -1
- package/cjs/skin-f0dbcafa.js +0 -1
- package/cjs/skin-fc778d21.js +0 -1
- package/cjs/videoSelector-3ab7f937.js +0 -1
- package/cjs/videoSelector-913574c8.js +0 -1
- package/cjs/videoSelector-9dba4d4f.js +0 -1
- package/cjs/videoSelector-c371fba4.js +0 -1
- package/cjs/videoSelector-c8c41440.js +0 -1
- package/cjs/videoSelector-d6d0e1ae.js +0 -1
- package/cjs/videoSelector-e2c21c25.js +0 -1
- package/cjs/videoSelector-eea96e59.js +0 -1
- package/esm/autoNextVideo-63dbac74.js +0 -1
- package/esm/autoNextVideo-793707f8.js +0 -1
- package/esm/autoNextVideo-b51e19f4.js +0 -1
- package/esm/autoNextVideo-f6f0062e.js +0 -1
- package/esm/features-005cbf2c.js +0 -1
- package/esm/features-6746c29c.js +0 -1
- package/esm/features-cc91a503.js +0 -1
- package/esm/features-e7e14dda.js +0 -1
- package/esm/generic-0d71c851.js +0 -1
- package/esm/generic-258d34e7.js +0 -1
- package/esm/generic-817644b6.js +0 -1
- package/esm/generic-9a919ba4.js +0 -1
- package/esm/index-11827a9e.js +0 -1
- package/esm/index-5312b88e.js +0 -1
- package/esm/index-5c199c09.js +0 -1
- package/esm/index-6d959e99.js +0 -1
- package/esm/index-7b9ff142.js +0 -1
- package/esm/index-9327e721.js +0 -1
- package/esm/index-b559de16.js +0 -1
- package/esm/index-c0023a66.js +0 -1
- package/esm/multicamv2-1656a706.js +0 -1
- package/esm/multicamv2-170df815.js +0 -1
- package/esm/multicamv2-2b22eed0.js +0 -1
- package/esm/multicamv2-3cb2c96b.js +0 -1
- package/esm/multicamv2-469790c5.js +0 -1
- package/esm/multicamv2-7d0dc57f.js +0 -1
- package/esm/multicamv2-fa150bd7.js +0 -1
- package/esm/multicamv2-fe3eda2b.js +0 -1
- package/esm/nextEpisodeButton-4fe59bd5.js +0 -1
- package/esm/nextEpisodeButton-c6968fe4.js +0 -1
- package/esm/nextEpisodeButton-d18af0e3.js +0 -1
- package/esm/nextEpisodeButton-f3651707.js +0 -1
- package/esm/playlist-1fc22b9e.js +0 -1
- package/esm/playlist-2131b25d.js +0 -1
- package/esm/playlist-3e586e91.js +0 -1
- package/esm/playlist-4f7cdb85.js +0 -1
- package/esm/series-04163ae5.js +0 -1
- package/esm/series-093b9d99.js +0 -1
- package/esm/series-3d86f785.js +0 -1
- package/esm/series-e696078a.js +0 -1
- package/esm/series-v2-6beb4cc3.js +0 -1
- package/esm/series-v2-76fe35d9.js +0 -1
- package/esm/series-v2-7afbd3dc.js +0 -1
- package/esm/series-v2-7d2aef8f.js +0 -1
- package/esm/series-v2-837b160e.js +0 -1
- package/esm/series-v2-aeb7ed74.js +0 -1
- package/esm/series-v2-dea9bcde.js +0 -1
- package/esm/series-v2-e0e817a0.js +0 -1
- package/esm/skin-08b2a668.js +0 -1
- package/esm/skin-287d98f0.js +0 -1
- package/esm/skin-367d2640.js +0 -1
- package/esm/skin-3688bf2d.js +0 -1
- package/esm/skin-48246846.js +0 -1
- package/esm/skin-49eb5647.js +0 -1
- package/esm/skin-5a4f7dff.js +0 -1
- package/esm/skin-61d92027.js +0 -1
- package/esm/skin-6290413d.js +0 -1
- package/esm/skin-68d81ff0.js +0 -1
- package/esm/skin-6f7eb9bb.js +0 -1
- package/esm/skin-6fb58468.js +0 -1
- package/esm/skin-77856587.js +0 -1
- package/esm/skin-7d9a1801.js +0 -1
- package/esm/skin-7f756cf9.js +0 -1
- package/esm/skin-8563e89f.js +0 -1
- package/esm/skin-8892d0cc.js +0 -1
- package/esm/skin-9701a9b0.js +0 -1
- package/esm/skin-9b61d1eb.js +0 -1
- package/esm/skin-ad92ef73.js +0 -1
- package/esm/skin-b56ca7dd.js +0 -1
- package/esm/skin-b64164a9.js +0 -1
- package/esm/skin-c3287a11.js +0 -1
- package/esm/skin-c360d3a7.js +0 -1
- package/esm/skin-d5e0b3e0.js +0 -1
- package/esm/skin-dfd47b2e.js +0 -1
- package/esm/skin-ec925239.js +0 -1
- package/esm/skin-f2961805.js +0 -1
- package/esm/videoSelector-0e2a85dc.js +0 -1
- package/esm/videoSelector-16ae6e6d.js +0 -1
- package/esm/videoSelector-4230d7f6.js +0 -1
- package/esm/videoSelector-93165559.js +0 -1
- package/esm/videoSelector-ce7a4a33.js +0 -1
- package/esm/videoSelector-d4e66214.js +0 -1
- package/esm/videoSelector-e3a73107.js +0 -1
- package/esm/videoSelector-fc9959a8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n,r,i=require("./skin-3397dca5.js"),a=require("./generic-b8561129.js"),l=require("./autoNextVideo-836d16c3.js"),o=require("@babel/runtime/helpers/typeof"),u=require("video.js"),s=require("@babel/runtime/helpers/asyncToGenerator"),c=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/defineProperty"),p=require("@babel/runtime/helpers/slicedToArray"),v=[],m=function(e,t){var n=i.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var o=a.getVideoIdx();l.switchToNext(o,e,v)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===o(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var a,l,o,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),o.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(o),v=function(e){var i,a,l,c,v,m,f,g,h,b;for(a in l=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(l=Math.max(l,a));(v=u[l]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),o.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(l=a.customData)&&void 0!==l&&l.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,o.style.left=r+"px",s.style.opacity="1"):(o.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{o.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){o.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var f="my-player";function g(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function h(){return(h=s(c.mark(function e(t){var n,r,i,a,l,o,u,s,d,v,m,f,g,h,b,y,x,w,A,E,N,k,T,I;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),l=p(a,2),o=l[0],u=l[1],s=i.width/u,d=i.height/o,v=[],m=0;m<o;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=d,g.getContext("2d").drawImage(i,f*s,m*d,s,d,0,0,s,d),h=g.toDataURL("image/png"),v.push({uri:h,duration:t.duration}),t._tiles=v;return e.abrupt("return",v);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=p(b,2),x=y[0],w=y[1],A=[],E=0;E<x*w;E++)A.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(T=k.appcmsMain)||void 0===T||null===(I=T.images)||void 0===I?void 0:I.placeholderCover,duration:t.duration});return e.abrupt("return",A);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function b(e,t){return y.apply(this,arguments)}function y(){return(y=s(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",g(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function x(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=i.getPlayer(f);if(r&&a){var l=r.getBoundingClientRect(),o=(e.clientX-l.left)/l.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var l=Math.floor((i+a)/2),o=t[l];if(o===e)return o;o<e?i=l+1:a=l-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(o*a.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return h.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function w(e){return A.apply(this,arguments)}function A(){return(A=s(c.mark(function e(t){var n,r,a,l;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=p(r,2),a=i[0]*i[1],l=e.duration,o=0;o<a;o++){var u,s=Math.round((t*a+o)*l);n[s]=Object.assign({},e,{duration:e.duration,tileIndex:o,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},d(u,"left","-60px"),d(u,"border","1px solid transparent"),d(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(a=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||a.addEventListener("mousemove",i.throttle(function(e){return x(e,n,r)},500)),null==(l=document.querySelector(".vjs-progress-control.vjs-control"))||l.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",i.throttle(function(e){return x(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var E=function(){var e=s(c.mark(function e(t,n){var r,i,a,l,o,u,s,d;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),l=[],o=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}o={resolution:null,duration:null,uri:null,layout:null},d=s.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),n=p(t,2),r=n[0],i=n[1];r&&i&&(o[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(o.uri=s.includes("http")?s:t+s,l.push(o),o=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",l);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function N(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function k(e,t){return T.apply(this,arguments)}function T(){return(T=s(c.mark(function e(t,n){var r,l,o,u,s,d,v,m,g,h,b,y,x,w,A,E,k,T,L,B,j,M,S,P,R,q,O,$,X,D,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,le,oe,ue,se,ce,de,pe,ve,me;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=n,r=i.getPlayer(n),l=t.split("/"),o=l.findIndex(function(e){return"dash"===e.toLowerCase()}),u=N(-1!==o?l.slice(0,o+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:g=e.sent,h=new DOMParser,b=h.parseFromString(g,"application/xml"),y=(null==r?void 0:r.duration())||(null===(s=a.getCurrentVideo())||void 0===s||null===(d=s.video)||void 0===d?void 0:d.runtime),x=(null==b||null===(v=b.querySelector("MPD > BaseURL"))||void 0===v?void 0:v.textContent)||u+"/",w=b.getElementsByTagName("AdaptationSet"),A=0;case 18:if(!(A<w.length)){e.next=72;break}if(("image"!==(E=w[A]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(T=E.getElementsByTagName("SegmentTemplate")[0],L=null===(k=T.getElementsByTagName("SegmentTimeline"))||void 0===k?void 0:k[0],!T||!L){e.next=48;break}if(M=L.getElementsByTagName("S"),S=parseInt(null===(B=M[0])||void 0===B?void 0:B.getAttribute("t")),P=parseInt(null===(j=M[0])||void 0===j?void 0:j.getAttribute("d")),R=E.getElementsByTagName("Representation")[0],q=R.getElementsByTagName("EssentialProperty")[0],O=q.getAttribute("value"),$=null==O?void 0:O.split("x"),X=p($,2),D=X[0],V=X[1],!T){e.next=46;break}if(T.getAttribute("media"),_=T.getAttribute("timescale"),F=(_?P/_:P)/(D*V),U=R.getAttribute("id"),W=Math.round(y/F),G=Math.ceil(W/(D*V)),z=T.getAttribute("media"),parseInt(T.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],A=0;A<G;A++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:O,uri:Y+Q.replace("$Time$",S+A*P).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=p(ee,2),ne=te[0],re=te[1],!T){e.next=69;break}if(T.getAttribute("media"),ie=T.getAttribute("duration"),ae=T.getAttribute("timescale"),le=(ae?ie/ae:ie)/(ne*re),oe=J.getAttribute("id"),ue=Math.round(y/le),se=Math.ceil(ue/(ne*re)),ce=T.getAttribute("media"),de=parseInt(T.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=I(ce),A=0;A<se;A++)me=ve?C(ve,A+de):ce,pe.push({duration:le,layout:Z,uri:x+me.replace("$Number$",A+de).replace("$RepresentationID$",oe)});return e.abrupt("return",pe);case 69:A++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function I(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function C(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function L(){return(L=s(c.mark(function e(t){var n,r,a,l,o,u,s,d,p,v,m,f,g,h,y,x;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=i.getPlayer(t),s=u.currentSource(),d=s.src,d=null!==(n=d)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(a=r.player)||void 0===a?void 0:a.getSource():d,null===(l=d)||void 0===l||!l.includes("m3u8")){e.next=19;break}return e.next=6,b(d,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,E(f,m);case 12:return g=e.sent,e.next=15,w(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(o=d)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,k(d,t);case 22:if(!((null==(y=e.sent)?void 0:y.length)>0)){e.next=28;break}return e.next=26,w(y);case 26:x=e.sent,u.thumbnails(x);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;v=[];var l=a.getCurrentSeries();null==l||l.map(function(e){var t;return(t=v).push.apply(t,e.episodes)}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var o,u;v=(null==t||null===(o=t.relatedVideos)||void 0===o?void 0:o.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=i.getPlayer(e);s.on("timeupdate",function(){var e,t,n=Math.floor(s.currentTime()),r=s.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")});var c,d=v.filter(function(e,t){return t==a.getVideoIdx()});if((null==d?void 0:d.length)>0)if(null!==(c=document.getElementsByClassName("next-ep-preview"))&&void 0!==c&&c[0]){var p,f,g,h,b,y,x,w,A,E,N,k;(null===(p=document.getElementsByClassName("next-ep-preview"))||void 0===p?void 0:p[0]).style.visibility="hidden";var T=null===(f=document.getElementsByClassName("next-ep-title"))||void 0===f?void 0:f[0],I=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],C=null===(h=document.getElementsByClassName("next-ep-content"))||void 0===h?void 0:h[0],L=null===(b=d[0])||void 0===b?void 0:b.title;(null===(y=L)||void 0===y?void 0:y.length)>60&&(L=L.substr(0,60)+"..."),T.textContent="".concat(L),I.src=(null===(x=d[0])||void 0===x||null===(w=x.gist)||void 0===w||null===(A=w.imageGist)||void 0===A?void 0:A.r16x9)||(null==d||null===(E=d[0])||void 0===E?void 0:E.img)||(null===(N=window)||void 0===N||null===(k=N.customData)||void 0===k?void 0:k.fallbackImage),C.onclick=function(){return m(e)}}else{var B,j,M,S,P,R,q,O,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var D=null===(B=d[0])||void 0===B?void 0:B.title,V=document.createElement("img");V.className="next-ep-img",V.src=(null===(j=d[0])||void 0===j||null===(M=j.gist)||void 0===M||null===(S=M.imageGist)||void 0===S?void 0:S.r16x9)||(null==d||null===(P=d[0])||void 0===P?void 0:P.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var _=document.createElement("div");_.className="next-ep-title",(null===(O=D)||void 0===O?void 0:O.length)>60&&(D=D.substr(0,60)+"..."),_.textContent="".concat(D);var F=document.createElement("div");F.className="next-ep-content",F.append(V),F.append(_),F.onclick=function(){return m(e)},$.append(X),$.append(F)}},exports.addTVProviderImage=function(e,t){var n=i.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var a=document.createElement("div");a.className="tvProviderImage";var l=document.createElement("img");l.src="".concat(r),l.alt="Provider Image",a.append(l),n.el().appendChild(a),n.on("useractive",function(){a.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||a.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}},exports.initiateTrickplay=function(e){return L.apply(this,arguments)};
|
|
1
|
+
"use strict";var e,t,n,r,i=require("./skin-3397dca5.js"),a=require("./generic-6bf3ba02.js"),l=require("./autoNextVideo-b7e91ff3.js"),o=require("@babel/runtime/helpers/typeof"),u=require("video.js"),s=require("@babel/runtime/helpers/asyncToGenerator"),c=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/defineProperty"),p=require("@babel/runtime/helpers/slicedToArray"),v=[],m=function(e,t){var n=i.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var o=a.getVideoIdx();l.switchToNext(o,e,v)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===o(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var a,l,o,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),o.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(o),v=function(e){var i,a,l,c,v,m,f,g,h,b;for(a in l=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(l=Math.max(l,a));(v=u[l]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),o.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(l=a.customData)&&void 0!==l&&l.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,o.style.left=r+"px",s.style.opacity="1"):(o.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{o.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){o.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var f="my-player";function g(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function h(){return(h=s(c.mark(function e(t){var n,r,i,a,l,o,u,s,d,v,m,f,g,h,b,y,x,w,A,E,N,k,T,I;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),l=p(a,2),o=l[0],u=l[1],s=i.width/u,d=i.height/o,v=[],m=0;m<o;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=d,g.getContext("2d").drawImage(i,f*s,m*d,s,d,0,0,s,d),h=g.toDataURL("image/png"),v.push({uri:h,duration:t.duration}),t._tiles=v;return e.abrupt("return",v);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=p(b,2),x=y[0],w=y[1],A=[],E=0;E<x*w;E++)A.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(T=k.appcmsMain)||void 0===T||null===(I=T.images)||void 0===I?void 0:I.placeholderCover,duration:t.duration});return e.abrupt("return",A);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function b(e,t){return y.apply(this,arguments)}function y(){return(y=s(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",g(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function x(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=i.getPlayer(f);if(r&&a){var l=r.getBoundingClientRect(),o=(e.clientX-l.left)/l.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var l=Math.floor((i+a)/2),o=t[l];if(o===e)return o;o<e?i=l+1:a=l-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(o*a.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return h.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function w(e){return A.apply(this,arguments)}function A(){return(A=s(c.mark(function e(t){var n,r,a,l;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=p(r,2),a=i[0]*i[1],l=e.duration,o=0;o<a;o++){var u,s=Math.round((t*a+o)*l);n[s]=Object.assign({},e,{duration:e.duration,tileIndex:o,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},d(u,"left","-60px"),d(u,"border","1px solid transparent"),d(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(a=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||a.addEventListener("mousemove",i.throttle(function(e){return x(e,n,r)},500)),null==(l=document.querySelector(".vjs-progress-control.vjs-control"))||l.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",i.throttle(function(e){return x(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var E=function(){var e=s(c.mark(function e(t,n){var r,i,a,l,o,u,s,d;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),l=[],o=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}o={resolution:null,duration:null,uri:null,layout:null},d=s.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),n=p(t,2),r=n[0],i=n[1];r&&i&&(o[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(o.uri=s.includes("http")?s:t+s,l.push(o),o=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",l);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function N(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function k(e,t){return T.apply(this,arguments)}function T(){return(T=s(c.mark(function e(t,n){var r,l,o,u,s,d,v,m,g,h,b,y,x,w,A,E,k,T,L,B,j,M,S,P,R,q,O,$,X,D,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,le,oe,ue,se,ce,de,pe,ve,me;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=n,r=i.getPlayer(n),l=t.split("/"),o=l.findIndex(function(e){return"dash"===e.toLowerCase()}),u=N(-1!==o?l.slice(0,o+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:g=e.sent,h=new DOMParser,b=h.parseFromString(g,"application/xml"),y=(null==r?void 0:r.duration())||(null===(s=a.getCurrentVideo())||void 0===s||null===(d=s.video)||void 0===d?void 0:d.runtime),x=(null==b||null===(v=b.querySelector("MPD > BaseURL"))||void 0===v?void 0:v.textContent)||u+"/",w=b.getElementsByTagName("AdaptationSet"),A=0;case 18:if(!(A<w.length)){e.next=72;break}if(("image"!==(E=w[A]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(T=E.getElementsByTagName("SegmentTemplate")[0],L=null===(k=T.getElementsByTagName("SegmentTimeline"))||void 0===k?void 0:k[0],!T||!L){e.next=48;break}if(M=L.getElementsByTagName("S"),S=parseInt(null===(B=M[0])||void 0===B?void 0:B.getAttribute("t")),P=parseInt(null===(j=M[0])||void 0===j?void 0:j.getAttribute("d")),R=E.getElementsByTagName("Representation")[0],q=R.getElementsByTagName("EssentialProperty")[0],O=q.getAttribute("value"),$=null==O?void 0:O.split("x"),X=p($,2),D=X[0],V=X[1],!T){e.next=46;break}if(T.getAttribute("media"),_=T.getAttribute("timescale"),F=(_?P/_:P)/(D*V),U=R.getAttribute("id"),W=Math.round(y/F),G=Math.ceil(W/(D*V)),z=T.getAttribute("media"),parseInt(T.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],A=0;A<G;A++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:O,uri:Y+Q.replace("$Time$",S+A*P).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=p(ee,2),ne=te[0],re=te[1],!T){e.next=69;break}if(T.getAttribute("media"),ie=T.getAttribute("duration"),ae=T.getAttribute("timescale"),le=(ae?ie/ae:ie)/(ne*re),oe=J.getAttribute("id"),ue=Math.round(y/le),se=Math.ceil(ue/(ne*re)),ce=T.getAttribute("media"),de=parseInt(T.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=I(ce),A=0;A<se;A++)me=ve?C(ve,A+de):ce,pe.push({duration:le,layout:Z,uri:x+me.replace("$Number$",A+de).replace("$RepresentationID$",oe)});return e.abrupt("return",pe);case 69:A++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function I(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function C(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function L(){return(L=s(c.mark(function e(t){var n,r,a,l,o,u,s,d,p,v,m,f,g,h,y,x;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=i.getPlayer(t),s=u.currentSource(),d=s.src,d=null!==(n=d)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(a=r.player)||void 0===a?void 0:a.getSource():d,null===(l=d)||void 0===l||!l.includes("m3u8")){e.next=19;break}return e.next=6,b(d,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,E(f,m);case 12:return g=e.sent,e.next=15,w(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(o=d)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,k(d,t);case 22:if(!((null==(y=e.sent)?void 0:y.length)>0)){e.next=28;break}return e.next=26,w(y);case 26:x=e.sent,u.thumbnails(x);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;v=[];var l=a.getCurrentSeries();null==l||l.map(function(e){var t;return(t=v).push.apply(t,e.episodes)}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var o,u;v=(null==t||null===(o=t.relatedVideos)||void 0===o?void 0:o.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=i.getPlayer(e);s.on("timeupdate",function(){var e,t,n=Math.floor(s.currentTime()),r=s.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")});var c,d=v.filter(function(e,t){return t==a.getVideoIdx()});if((null==d?void 0:d.length)>0)if(null!==(c=document.getElementsByClassName("next-ep-preview"))&&void 0!==c&&c[0]){var p,f,g,h,b,y,x,w,A,E,N,k;(null===(p=document.getElementsByClassName("next-ep-preview"))||void 0===p?void 0:p[0]).style.visibility="hidden";var T=null===(f=document.getElementsByClassName("next-ep-title"))||void 0===f?void 0:f[0],I=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],C=null===(h=document.getElementsByClassName("next-ep-content"))||void 0===h?void 0:h[0],L=null===(b=d[0])||void 0===b?void 0:b.title;(null===(y=L)||void 0===y?void 0:y.length)>60&&(L=L.substr(0,60)+"..."),T.textContent="".concat(L),I.src=(null===(x=d[0])||void 0===x||null===(w=x.gist)||void 0===w||null===(A=w.imageGist)||void 0===A?void 0:A.r16x9)||(null==d||null===(E=d[0])||void 0===E?void 0:E.img)||(null===(N=window)||void 0===N||null===(k=N.customData)||void 0===k?void 0:k.fallbackImage),C.onclick=function(){return m(e)}}else{var B,j,M,S,P,R,q,O,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var D=null===(B=d[0])||void 0===B?void 0:B.title,V=document.createElement("img");V.className="next-ep-img",V.src=(null===(j=d[0])||void 0===j||null===(M=j.gist)||void 0===M||null===(S=M.imageGist)||void 0===S?void 0:S.r16x9)||(null==d||null===(P=d[0])||void 0===P?void 0:P.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var _=document.createElement("div");_.className="next-ep-title",(null===(O=D)||void 0===O?void 0:O.length)>60&&(D=D.substr(0,60)+"..."),_.textContent="".concat(D);var F=document.createElement("div");F.className="next-ep-content",F.append(V),F.append(_),F.onclick=function(){return m(e)},$.append(X),$.append(F)}},exports.addTVProviderImage=function(e,t){var n=i.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var a=document.createElement("div");a.className="tvProviderImage";var l=document.createElement("img");l.src="".concat(r),l.alt="Provider Image",a.append(l),n.el().appendChild(a),n.on("useractive",function(){a.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||a.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}},exports.initiateTrickplay=function(e){return L.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-6bf3ba02.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-2ee2a39b.js");require("./util-c1962d91.js"),require("./captions-3c7ca3a7.js"),require("./renditions-26c6d0df.js"),require("./resolution-5a0df2be.js"),require("./skin-3397dca5.js"),require("./browser-38ff3331.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),module.exports=e.VLPlayerCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/inherits"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/inherits"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-6bf3ba02.js"),i=require("./skin-3397dca5.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js");var d=s.getComponent("Component"),u=function(){function u(t){var a,s,o,l,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),s=this,l=[t,i],o=n(o=u),(a=r(s,c()?Reflect.construct(o,l||[],n(s).constructor):o.apply(s,l))).playerId=i.playerId,a.seriesData=i.sres,a.streams=i.streams,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a}return a(u,d),t(u,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(i.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then(function(e){l.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),i.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}])}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),n=require("@babel/runtime/helpers/inherits"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),n=require("@babel/runtime/helpers/inherits"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-6bf3ba02.js"),l=require("./skin-3397dca5.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js");var d=s.getComponent("Component"),u=function(){function u(t){var n,s,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),s=this,i=[t,l],o=a(o=u),(n=r(s,c()?Reflect.construct(o,i||[],a(s).constructor):o.apply(s,i))).playerId=l.playerId,n.seriesData=l.sres,n.streams=l.streams,n.currentVideoData=l.res,n.initialiseStructure(),n.loadCSS(),n}return n(u,d),t(u,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then(function(e){i.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}])}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-6bf3ba02.js"),d=require("./skin-3397dca5.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js");var u=o.getComponent("Component"),c=function(){function s(n){var r,o,l,d,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),o=this,d=[n,u],l=i(l=s),(r=t(o,a()?Reflect.construct(l,d||[],i(o).constructor):l.apply(o,d))).playerId=u.playerId,r.seriesData=u.sres,r.currentVideoData=u.res,r.initialiseStructure(),r.loadCSS(),r}return r(s,u),n(s,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),i=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),r=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(i,r),o.dom.appendContent(i,l),o.dom.appendContent(n,t),o.dom.appendContent(n,i),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}])}(),p=function(e,n){for(var t=-1,i=0;i<e.length;i++)for(var r=0;r<e[i].episodes.length;r++)if(e[i].episodes[r].id===n){t=i;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,i=n-1>=0?n-1:t-1,r=(n+1)%t,o=t>1?e.episodes[i]:null,l=t>1?e.episodes[r]:null;return i===r&&(0===i?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:i,nextEpIdx:r}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,i){e.gist.id===n&&(t=i)}),t):null},f=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var i=o.dom.$(".next-eps-image"),r=d.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==r?void 0:r.firstChild;null==i||i.append(l);for(var a=o.dom.$(".next-eps-description"),u=d.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==a||a.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),i=m(e[t],n.video.gist.id),r=v(e[t],i);f(r.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("@babel/runtime/helpers/inherits"),o=require("video.js"),a=require("./icons-0ea2e662.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("@babel/runtime/helpers/inherits"),o=require("video.js"),a=require("./icons-0ea2e662.js"),s=require("./generic-6bf3ba02.js"),r=require("./autoNextVideo-b7e91ff3.js"),c=require("./skin-3397dca5.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js"),require("./util-c1962d91.js");var u=o.getComponent("Component"),p=function(){function p(t){var i,o,a,s,c,u,m,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),c=this,m=[t,v],u=l(u=p),(s=n(c,d()?Reflect.construct(u,m||[],l(c).constructor):u.apply(c,m))).playerId=v.playerId,s.seriesData=v.sres,s.videos=null==v||null===(i=v.playlist)||void 0===i?void 0:i.content,s.cb=(null==v||null===(o=v.playlist)||void 0===o?void 0:o.cb)||null,s.autoNext=(null==v||null===(a=v.playlist)||void 0===a?void 0:a.autoNext)||!1,s.currentVideoData=v.res,s.initialiseStructure(),s.loadCSS(),s.autoNext&&r.autoPlayNext({playerId:s.playerId,content:s.videos,cb:s.cb}),s}return i(p,u),t(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(c.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),l=o.dom.createEl("div",{className:"playlist-selector-head"}),i=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var r=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=o.dom.createEl("div",{className:"playlist-selector-content"}),u=function(e){var n,l,i=o.dom.createEl("div",{className:"playlist-container"}),a=o.dom.createEl("div",{className:"playlist-section",index:e}),r=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=t.videos[e])||void 0===n?void 0:n.title)||"")}),c=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(t.videos[e].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(a,r),o.dom.appendContent(a,c),o.dom.appendContent(i,a),o.dom.appendContent(d,i);var u=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),p=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=t.videos[e])||void 0===l?void 0:l.description)||"")}),m=o.dom.createEl("div",{className:"playlist-image"});m.style.backgroundImage="url(".concat(t.videos[e].img,")"),o.dom.appendContent(u,m),o.dom.appendContent(u,p),o.dom.appendContent(i,u),o.dom.appendContent(d,i),u.onclick=function(n){n.stopPropagation(),s.setVideoIdx(e+1),s.load(t.playerId,t.videos[e].id).then(function(e){null!=t&&t.cb&&t.cb(e)}).catch(function(e){null!=t&&t.cb&&t.cb(e)})},a.onclick=function(e){var t,n,l,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,a=(o=[].concat(o))[e.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=a&&null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(i.style.backgroundColor="#0000007d",null==a||null===(n=a.classList)||void 0===n||n.remove("hidden")):(null==a||null===(l=a.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);o.dom.appendContent(l,i),o.dom.appendContent(l,r),o.dom.appendContent(e,l),o.dom.appendContent(e,d),c.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(l,"px")}})}}])}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),c=require("video.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),c=require("video.js"),l=require("./generic-6bf3ba02.js"),d=require("./icons-0ea2e662.js"),u=require("./skin-3397dca5.js");require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js");var p=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h,f=c.getComponent("Component"),m=function(){function e(t){var r,o,c,l,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,e),o=this,l=[t,d],c=s(c=e),r=n(o,v()?Reflect.construct(c,l||[],s(o).constructor):c.apply(o,l)),a(r,"seriesData",[]),r.seriesData=d.seriesData,h=d.playerId,y(r.el(),r.seriesData),r.loadCSS(),r}return r(e,f),t(e,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}])}();function g(){return(g=e(o.mark(function e(i,t,n,s){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l.pause(h),p(h),l.load(h,t).then(function(e){l.setCurrentVideo(e.response),l.play(h)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(d.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=u.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var c=u.parseHtmlString(o);null!=c&&c.firstChild;)a.appendChild(c.firstChild);!function(e){l.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var d=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)});for(var y=function(i){d[i].addEventListener("click",function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach(function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,p[i],p)}),v[i].addEventListener("click",function(){return function(e,i,t,n){return g.apply(this,arguments)}(i,m[i].id,t,p)}),e.episodes[i].id==f&&p[i].classList.add("highlight-active-eps")},b=0;b<d.length;b++)y(b)},exports.seriesModule=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),i=require("@babel/runtime/helpers/inherits"),o=require("video.js"),l=require("./icons-0ea2e662.js"),r=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),i=require("@babel/runtime/helpers/inherits"),o=require("video.js"),l=require("./icons-0ea2e662.js"),r=require("./generic-6bf3ba02.js"),a=require("./skin-3397dca5.js"),d=require("./autoNextVideo-b7e91ff3.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js"),require("./util-c1962d91.js");var u=o.getComponent("Component"),v=function(){function v(t){var i,o,l,a,u,p,m,h,g,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,v),m=this,g=[t,C],h=s(h=v),(p=n(m,c()?Reflect.construct(h,g||[],s(m).constructor):h.apply(m,g))).playerId=C.playerId,p.seriesData=C.sres,p.videos=null==C||null===(i=C.sres)||void 0===i?void 0:i.seasons,p.currentVideoData=C.res,p.initialiseStructure(),p.loadCSS(),p.selectedSeason=0,p.cb=null==C||null===(o=C.series)||void 0===o?void 0:o.cb,p.autoPlayNext=(null==C||null===(l=C.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),p.watchMap=r.getSeriesWatchMap(),null!==(a=p)&&void 0!==a&&a.autoPlayNext&&null!=C&&null!==(u=C.series)&&void 0!==u&&u.enable){var f,y,b,S,N=null==C||null===(f=C.sres)||void 0===f?void 0:f.seasons,E=[];N.map(function(e){E.push.apply(E,e.episodes)}),r.createIdxMapping(E),r.setVideoIdxById(null===(y=p.options_)||void 0===y||null===(b=y.res)||void 0===b||null===(S=b.video)||void 0===S?void 0:S.id),d.autoPlayNext({playerId:p.playerId,content:E,cb:p.cb,series:null==C?void 0:C.sres})}return p}return i(v,u),t(v,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-e037e14e.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(a.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=o.dom.createEl("div",{className:"series-selection-container hidden"});o.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),o.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=o.dom.createEl("div",{className:"series-selector-head"}),i=o.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=o.dom.$(".series-selector-content",t.el());for(o.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var r=t.createSeasonLister();for(o.dom.appendContent(s,r),o.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var d=a.parseSvgString(l.crossIconSvg());i.appendChild(d)}};var r=o.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),d=o.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();o.dom.appendContent(d,c),o.dom.appendContent(s,i),o.dom.appendContent(s,r),o.dom.appendContent(e,s),o.dom.appendContent(e,d),a.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;a.getPlayer(this.playerId);for(var t=r.getCurrentSeries(),n=o.dom.createEl("div",{className:"season-container"}),s=function(s){var i,l=document.createElement("label");l.className="season-holder",l.setAttribute("for","season-".concat(s));var a=document.createElement("div");a.className="season - ".concat(s),a.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var d=o.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});d.setAttribute("type","radio"),e.selectedSeason==s&&(d.checked=!0),d.onclick=function(t){r.seasonIdxManager.set(s),e.showSeasonDetails(s)},o.dom.appendContent(l,d),o.dom.appendContent(l,a),o.dom.appendContent(n,l)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(e,t){var n=this;e=e.map(function(e){var t,s,i,o,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(i=s.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==n||null===(o=n.watchMap)||void 0===o||null===(l=o.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}});for(var s=function(s){var i,l,a,d,c,u,v,p=o.dom.createEl("div",{className:"series-container"}),m=o.dom.createEl("div",{className:"series-section",index:s}),h=o.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=e[s])||void 0===i?void 0:i.title)||"")}),g=o.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(e[s].watchedPercentage,"%' class='series-progress-bar-value'></div>")});o.dom.appendContent(m,h),o.dom.appendContent(m,g),o.dom.appendContent(p,m),o.dom.appendContent(t,p);var C=o.dom.createEl("div",{className:"series-section-expanded hidden"}),f=(null===(l=e[s])||void 0===l?void 0:l.description)||"";(null===(a=f)||void 0===a?void 0:a.length)>170&&(f=f.substr(0,170)+"...");var y=o.dom.createEl("div",{className:"series-description",innerHTML:"".concat(f||"")}),b=o.dom.createEl("img",{className:"series-image"});b.src="".concat((null===(d=e[s])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),b.alt="".concat(null===(v=e[s])||void 0===v?void 0:v.title),o.dom.appendContent(C,b),o.dom.appendContent(C,y),o.dom.appendContent(p,C),o.dom.appendContent(t,p),C.onclick=function(t){var i;t.stopPropagation(),r.setVideoIdxById(null===(i=e[s])||void 0===i?void 0:i.id),r.load(n.playerId,e[s].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},m.onclick=function(e){var t,n,s,i=document.getElementsByClassName("series-selector-content")[0].childNodes,o=(i=[].concat(i))[e.target.index].getElementsByClassName("series-section-expanded")[0];null!=o&&null!==(t=o.classList)&&void 0!==t&&t.contains("hidden")?(p.style.backgroundColor="#0000007d",null==o||null===(n=o.classList)||void 0===n||n.remove("hidden")):(null==o||null===(s=o.classList)||void 0===s||s.add("hidden"),p.style.backgroundColor="unset")}},i=0;i<e.length;i++)s(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=o.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=r.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=o.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=a.parseSvgString(l.BackIcon());s.appendChild(i),o.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}])}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),i=require("video.js"),l=require("./icons-0ea2e662.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),i=require("video.js"),l=require("./icons-0ea2e662.js"),a=require("./generic-6bf3ba02.js"),r=require("./skin-3397dca5.js"),d=require("./autoNextVideo-b7e91ff3.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js"),require("./util-c1962d91.js");var u=i.getComponent("Component"),v=function(){function v(t){var o,i,l,r,u,m,p,h,y,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,v),p=this,y=[t,g],h=n(h=v),(m=s(p,c()?Reflect.construct(h,y||[],n(p).constructor):h.apply(p,y))).playerId=g.playerId,m.seriesData=g.sres,m.videos=null==g||null===(o=g.sres)||void 0===o?void 0:o.seasons,m.currentVideoData=g.res,m.initialiseStructure(),m.loadCSS(),m.selectedSeason=0,m.cb=null==g||null===(i=g.series)||void 0===i?void 0:i.cb,m.autoPlayNext=(null==g||null===(l=g.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),m.watchMap=a.getSeriesWatchMap(),null!==(r=m)&&void 0!==r&&r.autoPlayNext&&null!=g&&null!==(u=g.series)&&void 0!==u&&u.enable){var C,f,b,S,I=null==g||null===(C=g.sres)||void 0===C?void 0:C.seasons,N=[];I.map(function(e){N.push.apply(N,e.episodes)}),a.createIdxMapping(N),a.setVideoIdxById(null===(f=m.options_)||void 0===f||null===(b=f.res)||void 0===b||null===(S=b.video)||void 0===S?void 0:S.id),d.autoPlayNext({playerId:m.playerId,content:N,cb:m.cb,series:null==g?void 0:g.sres})}return m}return o(v,u),t(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("button",{className:"series-selector-icon",title:"series selector",innerHTML:"".concat(l.PlaylistIcon())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-68886cd2.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(r.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),r.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=i.dom.createEl("div",{className:"series-selection-container hidden"});i.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),i.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=i.dom.$(".series-selector-content",this.el());for(i.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(i.dom.appendContent(n,o),i.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var a=r.parseSvgString(l.crossIconSvg());e.appendChild(a)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=i.dom.createEl("div",{className:"series-selector-head"}),o=i.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(l.crossIconSvg())});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var a=i.dom.createEl("div",{className:"series-selector-title",ariaLabel:"season title",innerHTML:"Seasons"}),d=i.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();i.dom.appendContent(d,c),i.dom.appendContent(n,o),i.dom.appendContent(n,a),i.dom.appendContent(e,n),i.dom.appendContent(e,d),r.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;r.getPlayer(this.playerId);for(var t=a.getCurrentSeries(),s=i.dom.createEl("div",{className:"season-container"}),n=function(n){var o,l=document.createElement("label");l.className="season-holder",l.ariaLabel="season-".concat(n+1),l.role="button",l.type="button",l.setAttribute("for","season-".concat(n));var r=document.createElement("div");r.className="season - ".concat(n),r.textContent=null===(o=t[n])||void 0===o?void 0:o.title;var d=i.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});d.setAttribute("type","radio"),e.selectedSeason==n&&(d.checked=!0),d.onclick=function(t){a.seasonIdxManager.set(n),e.showSeasonDetails(n)},l.onkeydown=function(t){"Enter"===t.key&&(a.seasonIdxManager.set(n),e.showSeasonDetails(n))},i.dom.appendContent(l,d),i.dom.appendContent(l,r),i.dom.appendContent(s,l)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;a.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),a.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(e,t){var s=this;e=e.map(function(e){var t,n,o,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(n=e.gist)||void 0===n||null===(o=n.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==s||null===(d=s.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var o,l,a,d,c,u=i.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),v=i.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(o=e[n])||void 0===o?void 0:o.title)||"")});i.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=e[n])||void 0===l?void 0:l.title)||"")}),i.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(e[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var m=i.dom.createEl("div",{className:"series-section-image"}),p=(null===(a=e[n])||void 0===a?void 0:a.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),i.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=i.dom.createEl("img",{className:"series-image"});h.src="".concat(r.impolicy16x9(null===(c=e[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),i.dom.appendContent(m,h),i.dom.appendContent(u,m),i.dom.appendContent(u,v),i.dom.appendContent(t,u),u.onclick=function(t){t.stopPropagation(),s.loadSeriesAssetById(e,n)},u.onkeydown=function(t){"Enter"===t.key&&(t.stopPropagation(),s.loadSeriesAssetById(e,n))},v.onclick=function(e){var t,s,n,o=document.getElementsByClassName("series-selector-content")[0].childNodes,i=(o=[].concat(o))[e.target.index].getElementsByClassName("series-section-expanded")[0];null!=i&&null!==(t=i.classList)&&void 0!==t&&t.contains("hidden")?(u.style.backgroundColor="#0000007d",null==i||null===(s=i.classList)||void 0===s||s.remove("hidden")):(null==i||null===(n=i.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},o=0;o<e.length;o++)n(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=i.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=a.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=i.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=r.parseSvgString(l.BackIcon());n.appendChild(o),i.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}])}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-6bf3ba02.js"),r=require("./skin-3397dca5.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js");var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(t){Promise.resolve().then(function(){return require("./skin-225252ff.js")}).then(function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)}),n(),function(n){var t=document.getElementById("".concat(n)),i=r.getPlayer(n);t&&t.addEventListener("touchstart",function(){i.paused()?e.play(n):e.pause(n)})}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6abeaa09.js"),r=require("./index-2ee2a39b.js"),i=require("./icons-0ea2e662.js"),n=require("./skin-3397dca5.js"),t=require("./generic-6bf3ba02.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),require("video.js"),require("./renditions-26c6d0df.js"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./util-c1962d91.js"),require("./captions-3c7ca3a7.js"),require("./resolution-5a0df2be.js"),require("@babel/runtime/helpers/defineProperty"),require("./browser-38ff3331.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(s,l){n.getPlayer(s).addClass("skin_default"),r.initialiseKeyboardEvents(s,l),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(s,l),function(r,s){var l=n.getPlayer(r),o=(null==s?void 0:s.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-076f0135.js")}).then(function(e){e.initaliseFunctionality(s.sres.seasons,t.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==s||null===(i=s.sres)||void 0===i?void 0:i.seasons,s),e.addNextEpisodeButton(s.sres,s.res,r))})}(s,l),function(e,r){var t,s,l,o,u=n.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=u.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=u.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(s,l)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-48d14d21.js"),t=require("./skin-3397dca5.js"),i=require("./index-2414bf78.js"),n=require("./browser-38ff3331.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/helpers/inherits"),u=require("video.js"),d=require("@babel/runtime/helpers/typeof"),c=require("./generic-b8561129.js"),v=require("./index-1b366d64.js");require("./renditions-26c6d0df.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-836d16c3.js"),require("./util-c1962d91.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js"),require("video.js/dist/video-js.min.css"),require("./resolution-5a0df2be.js");var p=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},h=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("SettingsOptionOneWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.handleClick=t.callback||function(){},this.focused=t.focused||!1,"function"!=typeof this.handleClick)throw new Error("SettingsOptionOneWrapper: callback must be a function");this.handleClick=this.handleClick.bind(this)},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionOneWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");n.textContent=this.title,i.appendChild(n);var o=document.createElement("p");o.textContent="›",o.style.fontSize="24px",i.appendChild(o),this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),i.addEventListener("keydown",function(e){"Enter"!==e.key&&"OK"!==e.key||t.handleClick()}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}])}(),f=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("SettingsOptionTwoWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.selected=t.selected||!1,this.focused=t.focused||!1,this.id=t.id,"string"!=typeof this.title)throw new Error("SettingsOptionTwoWrapper: title must be a string")},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionTwoWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");if(n.textContent=this.title,i.appendChild(n),this.selected){i.classList.add("selected");var o=document.createElement("span");o.appendChild(p('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),i.appendChild(o)}this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}])}(),m=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("Sidebar: props must be a valid object");if(this.title=t.title||"Settings",this.items=t.items||[{text:"Video Quality",isSelected:!0,callback:function(){}},{text:"Audio Language",isSelected:!1,callback:function(){}},{text:"Subtitles",isSelected:!1,callback:function(){}}],this.klassname=t.klassname||"default-sidebar",this.currentFocusedOption=null,this.lastFocusedElement=t.lastFocusedElement||null,this.type=t.type||"navigation",this.focused=t.focused||!1,this.callback=t.callback||function(){},this.onselect=t.onselect||function(){},"function"!=typeof this.callback)throw new Error("Sidebar: callback must be a function");if(!["navigation","selection"].includes(this.type))throw new Error('Sidebar: type must be either "navigation" or "selection"')},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("Sidebar: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname;var n=document.createElement("div");n.textContent=this.title,n.className="settingsHeading",i.appendChild(n);var o=document.createElement("div");"navigation"===this.type?this.items.forEach(function(e,i){var n=new h({title:e.text,klassname:"default-option-wrapper",focused:0===i,callback:e.callback});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}):"selection"===this.type&&this.items.forEach(function(e,i){var n=new f({title:e.text,klassname:"default-option-wrapper",focused:0===i,selected:e.isSelected,id:e.id});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}),i.appendChild(o),this.sidebarElement=i,e.appendChild(i),this.addEventListeners(),this.focus()}},{key:"addEventListeners",value:function(){var e=this;if(!this.sidebarElement)throw new Error("Sidebar: sidebarElement is not initialized");this.sidebarElement.addEventListener("keydown",function(t){"ArrowDown"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusNext()):"ArrowUp"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusPrevious()):"Backspace"===t.key||"Escape"===t.key||10009===t.keyCode||461===t.keyCode||196===t.keyCode||8===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.unfocus(),e.unmount()):"Enter"!==t.key&&"OK"!==t.key||(t.preventDefault(),t.stopPropagation(),"selection"===e.type&&e.selectionTypeAction())})}},{key:"selectionTypeAction",value:function(){if(this.currentFocusedOption){this.items.forEach(function(e){if(e.instance){e.instance.optionWrapper.classList.remove("selected"),e.instance.selected=!1;var t=e.instance.optionWrapper.querySelector("span");t&&t.remove();var i=e.instance.optionWrapper.querySelector("svg");i&&i.remove()}}),this.currentFocusedOption.optionWrapper.classList.add("selected"),this.currentFocusedOption.selected=!0;this.currentFocusedOption.optionWrapper.appendChild(p('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),this.onselect(this.currentFocusedOption)}}},{key:"focusNext",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.nextElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focusPrevious",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.previousElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.focus()}},{key:"unfocus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.blur()}},{key:"unmount",value:function(){this.sidebarElement&&(this.sidebarElement.remove(),this.sidebarElement=void 0,this.lastFocusedElement&&(this.callback(),this.lastFocusedElement.focus()),this.currentFocusedOption=null)}}])}();function y(e,t){var i,n,o,l,r,a,s,u=[{text:"Video Quality",isSelected:!0,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l,r;if(!e)return;var a=null===(i=t.qualityLevels())||void 0===i?void 0:i.levels_,s=-1==(null===(n=t.qualityLevels())||void 0===n?void 0:n.selectedIndex_)?"auto":null===(o=t.qualityLevels())||void 0===o?void 0:o.levels_[null===(l=t.qualityLevels())||void 0===l?void 0:l.selectedIndex_].height,u=[{text:"Auto",id:"auto",isSelected:"auto"===s,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}].concat(a.map(function(t){return{text:"".concat(t.height,"p"),id:t.height,isSelected:s===t.height,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}}));r=new m({title:"Video Quality",items:u,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){if("auto"===e.id)t.el_.player.qualityLevels().selectedIndex_=-1;else{var i=a.findIndex(function(t){return t.height===e.id});-1!==i&&(t.el_.player.qualityLevels().selectedIndex_=i)}},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),r.mount(null==t?void 0:t.el())}(s,e)}}];null!=e&&null!==(i=e.audioTracks())&&void 0!==i&&i.tracks_&&(null==e||null===(n=e.audioTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.length)>1&&u.push({text:"Audio Language",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l;if(!e)return;var r=null==t||null===(i=t.audioTracks())||void 0===i?void 0:i.tracks_,a=(null==r||null===(n=r.find(function(e){return e.enabled}))||void 0===n?void 0:n.label)||(null==r||null===(o=r[0])||void 0===o?void 0:o.label)||"Default",s=r.map(function(t){return{text:t.label,id:t.id,isSelected:a===t.label,callback:function(){e.currentFocusedOption.focus(),l.unmount()}}});l=new m({title:"Audio Language",items:s,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){null==r||r.forEach(function(t){t.enabled=!1,t.enabled=t.id===e.id})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),l.mount(null==t?void 0:t.el())}(s,e)}});var d=null==e||null===(l=e.textTracks())||void 0===l?void 0:l.tracks_;return(d=d.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))&&(null===(r=d)||void 0===r?void 0:r.length)>0&&u.push({text:"Subtitles",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o;if(!e)return;var l=t.textTracks().tracks_;l=l.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var r=(null===(i=l)||void 0===i||null===(n=i.find(function(e){return"showing"===e.mode}))||void 0===n?void 0:n.label)||"Captions Off",a=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===r,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}].concat(l.map(function(t){return{text:t.label,id:t.id,kind:t.kind,lang:t.language,mode:t.mode,isSelected:r===t.label,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}}));o=new m({title:"Closed Captions",items:a,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){var t;null===(t=l)||void 0===t||t.forEach(function(t){t.mode=t.id===e.id?"showing":"hidden"})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),o.mount(null==t?void 0:t.el())}(s,e)}}),(s=new m({title:"Settings",items:u,klassname:"default-sidebar",lastFocusedElement:t,type:"navigation",focused:!0,callback:function(){var i;null===(i=e.controlBar)||void 0===i||i.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){t.focus()},100)}})).mount(null==e?void 0:e.el()),null===(a=e.controlBar)||void 0===a||a.addClass("hidePlayerControls"),e.options({inactivityTimeout:0}),s}function g(e,t,i){return t=a(t),r(e,k()?Reflect.construct(t,i||[],a(e).constructor):t.apply(e,i))}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}var C=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");l.querySelector(".vjs-control-text").textContent="CC",l.classList.add("vjs-ClosedCaption-button");return r.append(p('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M92.7268 78.3757H81.5999V88.0906L57.4173 78.3757H9.27274V16.2273H92.7268V78.3757ZM17.6184 69.5027H57.3108L73.7991 74.6169L73.8001 69.5027H84.3821V25.2107H17.6184V69.5027Z" fill="currentColor"/>\n<rect x="20.8628" y="34.7727" width="39.4091" height="6.95455" fill="currentColor"/>\n<rect x="69.5446" y="34.7727" width="11.5909" height="6.95455" fill="currentColor"/>\n<rect x="44.0446" y="51" width="37.0909" height="9.27273" fill="currentColor"/>\n<rect x="20.8628" y="51" width="13.9091" height="9.27273" fill="currentColor"/>\n</svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){!function(e){var t,i,n,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.textTracks().tracks_,a=(null===(t=r=r.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))||void 0===t||null===(i=t.find(function(e){return"showing"===e.mode}))||void 0===i?void 0:i.label)||"Captions Off",s=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===a,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}].concat(r.map(function(e){return{text:e.label,id:e.id,kind:e.kind,lang:e.language,mode:e.mode,isSelected:a===e.label,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}}));(o=new m({title:"Closed Captions",items:s,klassname:"default-sidebar",lastFocusedElement:l,type:"selection",focused:!0,onselect:function(t){var i,n;null===(i=r)||void 0===i||i.forEach(function(e){e.mode=e.id===t.id?"showing":"hidden"}),o.unmount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)},callback:function(){var t;o.unmount(null==e?void 0:e.el()),null===(t=e.controlBar)||void 0===t||t.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)}})).mount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.addClass("hidePlayerControls"),e.options({inactivityTimeout:0})}(e,this)}}])}(u.getComponent("Button"));return u.registerComponent("CloseCaptionButton",t),new t(e,{})};var b=function(e){if(e)try{var t,i,n,o=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(n=i.entitlement)||void 0===n?void 0:n.deviceType)||"smart_tv_samsung";e&&(!function(e){try{var t;"smart_tv_samsung"==e&&null!==(t=window)&&void 0!==t&&t.tizen&&(window.tizen.tvinputdevice.registerKey("MediaPlayPause"),window.tizen.tvinputdevice.registerKey("MediaRewind"),window.tizen.tvinputdevice.registerKey("MediaFastForward"),window.tizen.tvinputdevice.registerKey("Exit"),window.tizen.tvinputdevice.registerKey("MediaPlay"),window.tizen.tvinputdevice.registerKey("MediaPause"),window.tizen.tvinputdevice.registerKey("MediaStop"))}catch(e){}}(o),e.on("keydown",function(t){10252==t.keyCode||"xfinityX1"==o&&179==t.keyCode?e.paused()?e.play():e.pause():415==t.keyCode?e.play():19==t.keyCode?e.pause():412===t.keyCode||"xfinityX1"==o&&227==t.keyCode?e.currentTime(e.currentTime()-10):(417===t.keyCode||"xfinityX1"==o&&228==t.keyCode)&&e.currentTime(e.currentTime()+10)}))}catch(e){}};exports.initialiseSkin=function(r,a){var d=t.getPlayer(r);d.addClass("skin_smartTV"),function(e,t){var i,n,r,a,d,c,v,h,f,m,k,C,w,L,S,E,x,q,T,B,O,F,_,j,W,D,M,P,V,z,H,A=null==e?void 0:e.el();A&&(A.style.color=(null==t||null===(i=t.theme)||void 0===i?void 0:i.color)||(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(a=r.appcmsMain)||void 0===a||null===(d=a.brand)||void 0===d||null===(c=d.cta)||void 0===c||null===(v=c.primary)||void 0===v?void 0:v.backgroundColor)||"#FFFFFF");null===(h=e.controlBar)||void 0===h||h.removeChild("VolumePanel"),null===(f=e.controlBar)||void 0===f||f.removeChild("AudioTrackButton"),null===(m=e.controlBar)||void 0===m||m.removeChild("FullscreenToggle"),null===(k=e.controlBar)||void 0===k||k.removeChild("PictureInPictureToggle"),null===(C=e.controlBar)||void 0===C||C.removeChild("skipBackward"),null===(w=e.controlBar)||void 0===w||w.removeChild("skipForward"),null===(L=e.controlBar)||void 0===L||L.removeChild("PictureInPictureToggle");var I=document.createElement("div");I.className="custom-smartTV-progress-bar",null===(S=e.controlBar)||void 0===S||null===(E=S.el())||void 0===E||E.append(I);var R=null===(x=e.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");try{I.style.opacity=0,R.el_.style.opacity=0}catch(e){}var G=null===(q=e.controlBar)||void 0===q?void 0:q.getChild("ProgressControl"),K=null===(T=e.controlBar)||void 0===T?void 0:T.getChild("CurrentTimeDisplay"),N=null===(B=e.controlBar)||void 0===B?void 0:B.getChild("SeekToLive");N&&(N.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live");var Z=null===(O=e.controlBar)||void 0===O?void 0:O.getChild("LiveDisplay"),Q=null===(F=e.controlBar)||void 0===F?void 0:F.getChild("RemainingTimeDisplay");G&&K&&N&&I.append(K.el(),G.el(),Q.el(),null==Z?void 0:Z.el());null==R||R.addChild(N);var U=e.getChild("TitleBar");null==R||R.addChild(U);var X=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_;return l.querySelector(".vjs-control-text").textContent="Start From Beginning",l.classList.add("vjs-startFromBeginning-button"),t}return s(i,t),l(i,[{key:"handleClick",value:function(){(null==e?void 0:e.currentTime())>0&&e.currentTime(0)}}])}(u.getComponent("Button"));return u.registerComponent("StartFromBeginning",t),new t(e,{})}(e);null==R||R.addChild(X);var J,Y,$,ee=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Settings",l.classList.add("vjs-Settings-button"),r.append(p('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M90.913 45.8867V56.1132L80.0959 58.1496C79.4266 61.1027 78.2623 63.9214 76.6523 66.4864L82.8603 75.597L75.586 82.8192L66.5158 76.664C63.9394 78.2538 61.1222 79.4156 58.1737 80.1041L56.1361 90.913H45.8542L43.8193 80.1041C40.8708 79.4158 38.0535 78.2541 35.4773 76.664L26.4071 82.8192L19.1313 75.597L25.2918 66.4864C23.7008 63.9116 22.5379 61.0962 21.8482 58.1496L11.087 56.1132V45.8867L21.8482 43.8028C22.5428 40.8493 23.7235 38.0315 25.3421 35.4646L19.1327 26.4016L26.4085 19.1807L35.4787 25.3359C38.045 23.7263 40.8656 22.5627 43.8207 21.8945L45.8556 11.0869H56.1375L58.1751 21.8945C61.1301 22.5631 63.9506 23.7267 66.5172 25.3359L75.5874 19.1807L82.8617 26.4016L76.6537 35.5135C78.2633 38.0617 79.4277 40.8647 80.0973 43.8028L90.913 45.8867ZM28.9308 51.0214C28.9434 63.1872 38.8221 73.0394 50.9956 73.0271C56.8418 73.0212 62.4462 70.6944 66.5758 66.5588C70.7054 62.4232 73.0219 56.8174 73.0156 50.9748C73.0025 38.809 63.1234 28.9572 50.9499 28.9701C38.7764 28.983 28.9182 38.8556 28.9308 51.0214Z" fill="currentColor"/>\n</svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){y(e,this)}}])}(u.getComponent("Button"));return u.registerComponent("SettingsButton",t),new t(e,{})}(e);if(null==R||R.addChild(ee),!(null!=t&&null!==(_=t.res)&&void 0!==_&&null!==(j=_.video)&&void 0!==j&&null!==(W=j.streamingInfo)&&void 0!==W&&W.isLiveStream)||null!=t&&null!==(D=t.res)&&void 0!==D&&null!==(M=D.video)&&void 0!==M&&null!==(P=M.liveDetails)&&void 0!==P&&P.isDvrEnabled){var te,ie,ne=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Forward",l.classList.add("vjs-forward-button"),r.append(p('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M461.37 551.05a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67t-12.02 3.59zm109.47-75.65a33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85 33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83zm-1.5 66.6q-4.43 8.19-13.15 8.19c-5.91 0-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.83-4.43 22.32z"></path><path d="M687.85 490l-25.1 5a153.7 153.7 0 1 1-301.6.77c15.68-80.78 92.29-134.47 173-122.56L528.5 389l66.74-8-46.45-48.58-5.79 16.24C447 331.88 354.66 395 336 490.9a179.29 179.29 0 0 0 141.77 210.2 182.22 182.22 0 0 0 34.61 3.35A179.4 179.4 0 0 0 687.85 490z"></path></g></svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t>=0){var i=t+30;e.currentTime(i)}}}])}(u.getComponent("Button"));return u.registerComponent("ForwardButton",t),new t(e,{})}(e);null===(te=e.controlBar)||void 0===te||te.addChild(ne);var oe=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Rewind",l.classList.add("vjs-rewind-button"),r.append(p('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M473.39 547.46q-4.22 3.6-12 3.59a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67zm68.15 16.45a33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83 33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85zm1.57-66.65q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.86-4.43 22.32-7.34 8.19-13.15 8.19-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39z"></path><path d="M688 490.9c-18.66-95.93-111-159-207-142.24l-5.84-16.29L428.74 381l66.74 8-5.64-15.72c80.7-11.91 157.31 41.78 173 122.56a153.67 153.67 0 1 1-301.6-.78l-25.1-5a179.47 179.47 0 0 0 175.47 214.39 182.93 182.93 0 0 0 34.6-3.35A179.29 179.29 0 0 0 688 490.9z"></path></g></svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t-30>=0){var i=t-30;e.currentTime(i)}else e.currentTime(0)}}])}(u.getComponent("Button"));return u.registerComponent("RewindButton",t),new t(e,{})}(e);null===(ie=e.controlBar)||void 0===ie||ie.addChild(oe)}null!=t&&null!==(V=t.res)&&void 0!==V&&null!==(z=V.video)&&void 0!==z&&null!==(H=z.gist)&&void 0!==H&&H.title&&e.titleBar.update({title:null==t||null===(J=t.res)||void 0===J||null===(Y=J.video)||void 0===Y||null===($=Y.gist)||void 0===$?void 0:$.title});b(e)}(d,a),function(o,l){var r=t.getPlayer(o);r&&(r.on("loadeddata",function(){var e,t,a,s,u;try{var d,c,v,p,h,f;if(null!=l&&null!==(d=l.res)&&void 0!==d&&null!==(c=d.video)&&void 0!==c&&null!==(v=c.streamingInfo)&&void 0!==v&&v.isLiveStream&&null!=l&&null!==(p=l.res)&&void 0!==p&&null!==(h=p.video)&&void 0!==h&&null!==(f=h.liveDetails)&&void 0!==f&&f.isDvrEnabled){var m,y,g=(null===(m=r.seekable())||void 0===m?void 0:m.end(0))-(null===(y=r.seekable())||void 0===y?void 0:y.start(0));window.customData.dvrWindow=g}else window.customData.dvrWindow=null}catch(e){}try{var k,b,w;if(null!=l&&null!==(k=l.res)&&void 0!==k&&null!==(b=k.video)&&void 0!==b&&null!==(w=b.streamingInfo)&&void 0!==w&&w.isLiveStream){var L,S=null===(L=r.controlBar)||void 0===L?void 0:L.getChild("ProgressControl");if(S){var E=S.el().querySelector(".vjs-play-progress");E&&(E.style.width="100%")}}}catch(e){}try{r.qualityLevels().selectedIndex_=-1}catch(e){}try{var x,q,T=r.textTracks().tracks_;T=T.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var B=null===(x=r.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");if(T&&(null===(q=T)||void 0===q?void 0:q.length)>0){var O=C(r);null==B||B.addChild(O)}else try{B.children_[2].el_.style.right="115px"}catch(e){}try{var F,_;B.el_.style.opacity=1,(null===(F=r.controlBar)||void 0===F||null===(_=F.el_)||void 0===_?void 0:_.querySelector(".custom-smartTV-progress-bar")).style.opacity=1}catch(e){}}catch(e){}!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(a=t.app_data)&&void 0!==a&&null!==(s=a.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=l&&l.liveVideo||i.addNextEpPreview(o,l),null!=l&&l.liveVideo||n.isMobile()||i.initiateTrickplay(o)}),r.one("play",function(){var t,i,n,l;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(n=window)||void 0===n||null===(l=n.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}(r,a),function(e,n){var o,l,r,a,s,u,d,p,h=c.getSource(null==n?void 0:n.res,e)||{},f=h.src;i.addTVProviderImage(e,n),"MEDIA_TAILOR"==(null===(o=window)||void 0===o||null===(l=o.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.adsConfig)||void 0===a?void 0:a.vodAdSticherProvider)&&null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(p=d.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking&&v.setupAdvertisementMarkers(e,f);!function(e,i){var n=t.getPlayer(e);if(n){var o,l,r=!1,a=!1;null===(o=n.controlBar)||void 0===o||o.on("keydown",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!0)}),null===(l=n.controlBar)||void 0===l||l.on("keyup",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!1)}),n.on("seeking",function(){var e,t,i;n.paused()||r||(r=!0,n.pause());var o=n.currentTime();if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.dvrWindow)if(o=n.liveTracker.liveCurrentTime()-o,0==Math.round(o)){var l,a;o=window.customData.dvrWindow;var s=null===(l=n.controlBar)||void 0===l||null===(a=l.customControlSpacer)||void 0===a?void 0:a.getChild("SeekToLive");s&&(s.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=0)}else if(o>window.customData.dvrWindow){var u,d;o=0;var c=null===(u=n.controlBar)||void 0===u||null===(d=u.customControlSpacer)||void 0===d?void 0:d.getChild("SeekToLive");c&&(c.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}else{var v,p;o=window.customData.dvrWindow-o;var h=null===(v=n.controlBar)||void 0===v||null===(p=v.customControlSpacer)||void 0===p?void 0:p.getChild("SeekToLive");h&&(h.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}var f=o/(window.customData.dvrWindow?window.customData.dvrWindow:n.duration())*100,m=null===(i=n.controlBar)||void 0===i?void 0:i.getChild("ProgressControl");if(m){var y=m.el().querySelector(".vjs-play-progress");y&&(y.style.width=f+"%")}}),n.on("seeked",function(){var e,t,o,l,s,u;if(n.paused()&&r&&!a&&(r=!1,n.play()),null!=i&&null!==(e=i.res)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&null!==(o=t.streamingInfo)&&void 0!==o&&o.isLiveStream&&null!=i&&null!==(l=i.res)&&void 0!==l&&null!==(s=l.video)&&void 0!==s&&null!==(u=s.liveDetails)&&void 0!==u&&u.isDvrEnabled){var d,c,v=null===(d=n.controlBar)||void 0===d||null===(c=d.customControlSpacer)||void 0===c?void 0:c.getChild("SeekToLive");n.liveTracker.seekedBehindLive_?v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0):v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=1)}})}}(e,n)}(r,a)};
|
|
1
|
+
"use strict";var e=require("./features-6abeaa09.js"),t=require("./skin-3397dca5.js"),i=require("./index-391dd643.js"),n=require("./browser-38ff3331.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/helpers/inherits"),u=require("video.js"),d=require("@babel/runtime/helpers/typeof"),c=require("./generic-6bf3ba02.js"),v=require("./index-2ee2a39b.js");require("./renditions-26c6d0df.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-b7e91ff3.js"),require("./util-c1962d91.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-3c7ca3a7.js"),require("video.js/dist/video-js.min.css"),require("./resolution-5a0df2be.js");var p=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},h=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("SettingsOptionOneWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.handleClick=t.callback||function(){},this.focused=t.focused||!1,"function"!=typeof this.handleClick)throw new Error("SettingsOptionOneWrapper: callback must be a function");this.handleClick=this.handleClick.bind(this)},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionOneWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");n.textContent=this.title,i.appendChild(n);var o=document.createElement("p");o.textContent="›",o.style.fontSize="24px",i.appendChild(o),this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),i.addEventListener("keydown",function(e){"Enter"!==e.key&&"OK"!==e.key||t.handleClick()}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}])}(),f=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("SettingsOptionTwoWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.selected=t.selected||!1,this.focused=t.focused||!1,this.id=t.id,"string"!=typeof this.title)throw new Error("SettingsOptionTwoWrapper: title must be a string")},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionTwoWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");if(n.textContent=this.title,i.appendChild(n),this.selected){i.classList.add("selected");var o=document.createElement("span");o.appendChild(p('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),i.appendChild(o)}this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}])}(),m=function(){return l(function e(t){if(o(this,e),!t||"object"!==d(t))throw new Error("Sidebar: props must be a valid object");if(this.title=t.title||"Settings",this.items=t.items||[{text:"Video Quality",isSelected:!0,callback:function(){}},{text:"Audio Language",isSelected:!1,callback:function(){}},{text:"Subtitles",isSelected:!1,callback:function(){}}],this.klassname=t.klassname||"default-sidebar",this.currentFocusedOption=null,this.lastFocusedElement=t.lastFocusedElement||null,this.type=t.type||"navigation",this.focused=t.focused||!1,this.callback=t.callback||function(){},this.onselect=t.onselect||function(){},"function"!=typeof this.callback)throw new Error("Sidebar: callback must be a function");if(!["navigation","selection"].includes(this.type))throw new Error('Sidebar: type must be either "navigation" or "selection"')},[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("Sidebar: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname;var n=document.createElement("div");n.textContent=this.title,n.className="settingsHeading",i.appendChild(n);var o=document.createElement("div");"navigation"===this.type?this.items.forEach(function(e,i){var n=new h({title:e.text,klassname:"default-option-wrapper",focused:0===i,callback:e.callback});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}):"selection"===this.type&&this.items.forEach(function(e,i){var n=new f({title:e.text,klassname:"default-option-wrapper",focused:0===i,selected:e.isSelected,id:e.id});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}),i.appendChild(o),this.sidebarElement=i,e.appendChild(i),this.addEventListeners(),this.focus()}},{key:"addEventListeners",value:function(){var e=this;if(!this.sidebarElement)throw new Error("Sidebar: sidebarElement is not initialized");this.sidebarElement.addEventListener("keydown",function(t){"ArrowDown"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusNext()):"ArrowUp"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusPrevious()):"Backspace"===t.key||"Escape"===t.key||10009===t.keyCode||461===t.keyCode||196===t.keyCode||8===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.unfocus(),e.unmount()):"Enter"!==t.key&&"OK"!==t.key||(t.preventDefault(),t.stopPropagation(),"selection"===e.type&&e.selectionTypeAction())})}},{key:"selectionTypeAction",value:function(){if(this.currentFocusedOption){this.items.forEach(function(e){if(e.instance){e.instance.optionWrapper.classList.remove("selected"),e.instance.selected=!1;var t=e.instance.optionWrapper.querySelector("span");t&&t.remove();var i=e.instance.optionWrapper.querySelector("svg");i&&i.remove()}}),this.currentFocusedOption.optionWrapper.classList.add("selected"),this.currentFocusedOption.selected=!0;this.currentFocusedOption.optionWrapper.appendChild(p('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),this.onselect(this.currentFocusedOption)}}},{key:"focusNext",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.nextElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focusPrevious",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.previousElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.focus()}},{key:"unfocus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.blur()}},{key:"unmount",value:function(){this.sidebarElement&&(this.sidebarElement.remove(),this.sidebarElement=void 0,this.lastFocusedElement&&(this.callback(),this.lastFocusedElement.focus()),this.currentFocusedOption=null)}}])}();function y(e,t){var i,n,o,l,r,a,s,u=[{text:"Video Quality",isSelected:!0,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l,r;if(!e)return;var a=null===(i=t.qualityLevels())||void 0===i?void 0:i.levels_,s=-1==(null===(n=t.qualityLevels())||void 0===n?void 0:n.selectedIndex_)?"auto":null===(o=t.qualityLevels())||void 0===o?void 0:o.levels_[null===(l=t.qualityLevels())||void 0===l?void 0:l.selectedIndex_].height,u=[{text:"Auto",id:"auto",isSelected:"auto"===s,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}].concat(a.map(function(t){return{text:"".concat(t.height,"p"),id:t.height,isSelected:s===t.height,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}}));r=new m({title:"Video Quality",items:u,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){if("auto"===e.id)t.el_.player.qualityLevels().selectedIndex_=-1;else{var i=a.findIndex(function(t){return t.height===e.id});-1!==i&&(t.el_.player.qualityLevels().selectedIndex_=i)}},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),r.mount(null==t?void 0:t.el())}(s,e)}}];null!=e&&null!==(i=e.audioTracks())&&void 0!==i&&i.tracks_&&(null==e||null===(n=e.audioTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.length)>1&&u.push({text:"Audio Language",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l;if(!e)return;var r=null==t||null===(i=t.audioTracks())||void 0===i?void 0:i.tracks_,a=(null==r||null===(n=r.find(function(e){return e.enabled}))||void 0===n?void 0:n.label)||(null==r||null===(o=r[0])||void 0===o?void 0:o.label)||"Default",s=r.map(function(t){return{text:t.label,id:t.id,isSelected:a===t.label,callback:function(){e.currentFocusedOption.focus(),l.unmount()}}});l=new m({title:"Audio Language",items:s,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){null==r||r.forEach(function(t){t.enabled=!1,t.enabled=t.id===e.id})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),l.mount(null==t?void 0:t.el())}(s,e)}});var d=null==e||null===(l=e.textTracks())||void 0===l?void 0:l.tracks_;return(d=d.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))&&(null===(r=d)||void 0===r?void 0:r.length)>0&&u.push({text:"Subtitles",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o;if(!e)return;var l=t.textTracks().tracks_;l=l.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var r=(null===(i=l)||void 0===i||null===(n=i.find(function(e){return"showing"===e.mode}))||void 0===n?void 0:n.label)||"Captions Off",a=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===r,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}].concat(l.map(function(t){return{text:t.label,id:t.id,kind:t.kind,lang:t.language,mode:t.mode,isSelected:r===t.label,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}}));o=new m({title:"Closed Captions",items:a,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){var t;null===(t=l)||void 0===t||t.forEach(function(t){t.mode=t.id===e.id?"showing":"hidden"})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),o.mount(null==t?void 0:t.el())}(s,e)}}),(s=new m({title:"Settings",items:u,klassname:"default-sidebar",lastFocusedElement:t,type:"navigation",focused:!0,callback:function(){var i;null===(i=e.controlBar)||void 0===i||i.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){t.focus()},100)}})).mount(null==e?void 0:e.el()),null===(a=e.controlBar)||void 0===a||a.addClass("hidePlayerControls"),e.options({inactivityTimeout:0}),s}function g(e,t,i){return t=a(t),r(e,k()?Reflect.construct(t,i||[],a(e).constructor):t.apply(e,i))}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}var C=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");l.querySelector(".vjs-control-text").textContent="CC",l.classList.add("vjs-ClosedCaption-button");return r.append(p('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M92.7268 78.3757H81.5999V88.0906L57.4173 78.3757H9.27274V16.2273H92.7268V78.3757ZM17.6184 69.5027H57.3108L73.7991 74.6169L73.8001 69.5027H84.3821V25.2107H17.6184V69.5027Z" fill="currentColor"/>\n<rect x="20.8628" y="34.7727" width="39.4091" height="6.95455" fill="currentColor"/>\n<rect x="69.5446" y="34.7727" width="11.5909" height="6.95455" fill="currentColor"/>\n<rect x="44.0446" y="51" width="37.0909" height="9.27273" fill="currentColor"/>\n<rect x="20.8628" y="51" width="13.9091" height="9.27273" fill="currentColor"/>\n</svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){!function(e){var t,i,n,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.textTracks().tracks_,a=(null===(t=r=r.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))||void 0===t||null===(i=t.find(function(e){return"showing"===e.mode}))||void 0===i?void 0:i.label)||"Captions Off",s=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===a,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}].concat(r.map(function(e){return{text:e.label,id:e.id,kind:e.kind,lang:e.language,mode:e.mode,isSelected:a===e.label,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}}));(o=new m({title:"Closed Captions",items:s,klassname:"default-sidebar",lastFocusedElement:l,type:"selection",focused:!0,onselect:function(t){var i,n;null===(i=r)||void 0===i||i.forEach(function(e){e.mode=e.id===t.id?"showing":"hidden"}),o.unmount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)},callback:function(){var t;o.unmount(null==e?void 0:e.el()),null===(t=e.controlBar)||void 0===t||t.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)}})).mount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.addClass("hidePlayerControls"),e.options({inactivityTimeout:0})}(e,this)}}])}(u.getComponent("Button"));return u.registerComponent("CloseCaptionButton",t),new t(e,{})};var b=function(e){if(e)try{var t,i,n,o=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(n=i.entitlement)||void 0===n?void 0:n.deviceType)||"smart_tv_samsung";e&&(!function(e){try{var t;"smart_tv_samsung"==e&&null!==(t=window)&&void 0!==t&&t.tizen&&(window.tizen.tvinputdevice.registerKey("MediaPlayPause"),window.tizen.tvinputdevice.registerKey("MediaRewind"),window.tizen.tvinputdevice.registerKey("MediaFastForward"),window.tizen.tvinputdevice.registerKey("Exit"),window.tizen.tvinputdevice.registerKey("MediaPlay"),window.tizen.tvinputdevice.registerKey("MediaPause"),window.tizen.tvinputdevice.registerKey("MediaStop"))}catch(e){}}(o),e.on("keydown",function(t){10252==t.keyCode||"xfinityX1"==o&&179==t.keyCode?e.paused()?e.play():e.pause():415==t.keyCode?e.play():19==t.keyCode?e.pause():412===t.keyCode||"xfinityX1"==o&&227==t.keyCode?e.currentTime(e.currentTime()-10):(417===t.keyCode||"xfinityX1"==o&&228==t.keyCode)&&e.currentTime(e.currentTime()+10)}))}catch(e){}};exports.initialiseSkin=function(r,a){var d=t.getPlayer(r);d.addClass("skin_smartTV"),function(e,t){var i,n,r,a,d,c,v,h,f,m,k,C,w,L,S,E,x,q,T,B,O,F,_,j,W,D,M,P,V,z,H,A=null==e?void 0:e.el();A&&(A.style.color=(null==t||null===(i=t.theme)||void 0===i?void 0:i.color)||(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(a=r.appcmsMain)||void 0===a||null===(d=a.brand)||void 0===d||null===(c=d.cta)||void 0===c||null===(v=c.primary)||void 0===v?void 0:v.backgroundColor)||"#FFFFFF");null===(h=e.controlBar)||void 0===h||h.removeChild("VolumePanel"),null===(f=e.controlBar)||void 0===f||f.removeChild("AudioTrackButton"),null===(m=e.controlBar)||void 0===m||m.removeChild("FullscreenToggle"),null===(k=e.controlBar)||void 0===k||k.removeChild("PictureInPictureToggle"),null===(C=e.controlBar)||void 0===C||C.removeChild("skipBackward"),null===(w=e.controlBar)||void 0===w||w.removeChild("skipForward"),null===(L=e.controlBar)||void 0===L||L.removeChild("PictureInPictureToggle");var I=document.createElement("div");I.className="custom-smartTV-progress-bar",null===(S=e.controlBar)||void 0===S||null===(E=S.el())||void 0===E||E.append(I);var R=null===(x=e.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");try{I.style.opacity=0,R.el_.style.opacity=0}catch(e){}var G=null===(q=e.controlBar)||void 0===q?void 0:q.getChild("ProgressControl"),K=null===(T=e.controlBar)||void 0===T?void 0:T.getChild("CurrentTimeDisplay"),N=null===(B=e.controlBar)||void 0===B?void 0:B.getChild("SeekToLive");N&&(N.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live");var Z=null===(O=e.controlBar)||void 0===O?void 0:O.getChild("LiveDisplay"),Q=null===(F=e.controlBar)||void 0===F?void 0:F.getChild("RemainingTimeDisplay");G&&K&&N&&I.append(K.el(),G.el(),Q.el(),null==Z?void 0:Z.el());null==R||R.addChild(N);var U=e.getChild("TitleBar");null==R||R.addChild(U);var X=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_;return l.querySelector(".vjs-control-text").textContent="Start From Beginning",l.classList.add("vjs-startFromBeginning-button"),t}return s(i,t),l(i,[{key:"handleClick",value:function(){(null==e?void 0:e.currentTime())>0&&e.currentTime(0)}}])}(u.getComponent("Button"));return u.registerComponent("StartFromBeginning",t),new t(e,{})}(e);null==R||R.addChild(X);var J,Y,$,ee=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Settings",l.classList.add("vjs-Settings-button"),r.append(p('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M90.913 45.8867V56.1132L80.0959 58.1496C79.4266 61.1027 78.2623 63.9214 76.6523 66.4864L82.8603 75.597L75.586 82.8192L66.5158 76.664C63.9394 78.2538 61.1222 79.4156 58.1737 80.1041L56.1361 90.913H45.8542L43.8193 80.1041C40.8708 79.4158 38.0535 78.2541 35.4773 76.664L26.4071 82.8192L19.1313 75.597L25.2918 66.4864C23.7008 63.9116 22.5379 61.0962 21.8482 58.1496L11.087 56.1132V45.8867L21.8482 43.8028C22.5428 40.8493 23.7235 38.0315 25.3421 35.4646L19.1327 26.4016L26.4085 19.1807L35.4787 25.3359C38.045 23.7263 40.8656 22.5627 43.8207 21.8945L45.8556 11.0869H56.1375L58.1751 21.8945C61.1301 22.5631 63.9506 23.7267 66.5172 25.3359L75.5874 19.1807L82.8617 26.4016L76.6537 35.5135C78.2633 38.0617 79.4277 40.8647 80.0973 43.8028L90.913 45.8867ZM28.9308 51.0214C28.9434 63.1872 38.8221 73.0394 50.9956 73.0271C56.8418 73.0212 62.4462 70.6944 66.5758 66.5588C70.7054 62.4232 73.0219 56.8174 73.0156 50.9748C73.0025 38.809 63.1234 28.9572 50.9499 28.9701C38.7764 28.983 28.9182 38.8556 28.9308 51.0214Z" fill="currentColor"/>\n</svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){y(e,this)}}])}(u.getComponent("Button"));return u.registerComponent("SettingsButton",t),new t(e,{})}(e);if(null==R||R.addChild(ee),!(null!=t&&null!==(_=t.res)&&void 0!==_&&null!==(j=_.video)&&void 0!==j&&null!==(W=j.streamingInfo)&&void 0!==W&&W.isLiveStream)||null!=t&&null!==(D=t.res)&&void 0!==D&&null!==(M=D.video)&&void 0!==M&&null!==(P=M.liveDetails)&&void 0!==P&&P.isDvrEnabled){var te,ie,ne=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Forward",l.classList.add("vjs-forward-button"),r.append(p('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M461.37 551.05a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67t-12.02 3.59zm109.47-75.65a33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85 33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83zm-1.5 66.6q-4.43 8.19-13.15 8.19c-5.91 0-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.83-4.43 22.32z"></path><path d="M687.85 490l-25.1 5a153.7 153.7 0 1 1-301.6.77c15.68-80.78 92.29-134.47 173-122.56L528.5 389l66.74-8-46.45-48.58-5.79 16.24C447 331.88 354.66 395 336 490.9a179.29 179.29 0 0 0 141.77 210.2 182.22 182.22 0 0 0 34.61 3.35A179.4 179.4 0 0 0 687.85 490z"></path></g></svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t>=0){var i=t+30;e.currentTime(i)}}}])}(u.getComponent("Button"));return u.registerComponent("ForwardButton",t),new t(e,{})}(e);null===(te=e.controlBar)||void 0===te||te.addChild(ne);var oe=function(e){var t=function(t){function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,i);var l=(t=g(this,i,[e,n])).el_,r=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Rewind",l.classList.add("vjs-rewind-button"),r.append(p('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M473.39 547.46q-4.22 3.6-12 3.59a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67zm68.15 16.45a33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83 33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85zm1.57-66.65q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.86-4.43 22.32-7.34 8.19-13.15 8.19-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39z"></path><path d="M688 490.9c-18.66-95.93-111-159-207-142.24l-5.84-16.29L428.74 381l66.74 8-5.64-15.72c80.7-11.91 157.31 41.78 173 122.56a153.67 153.67 0 1 1-301.6-.78l-25.1-5a179.47 179.47 0 0 0 175.47 214.39 182.93 182.93 0 0 0 34.6-3.35A179.29 179.29 0 0 0 688 490.9z"></path></g></svg>')),t}return s(i,t),l(i,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t-30>=0){var i=t-30;e.currentTime(i)}else e.currentTime(0)}}])}(u.getComponent("Button"));return u.registerComponent("RewindButton",t),new t(e,{})}(e);null===(ie=e.controlBar)||void 0===ie||ie.addChild(oe)}null!=t&&null!==(V=t.res)&&void 0!==V&&null!==(z=V.video)&&void 0!==z&&null!==(H=z.gist)&&void 0!==H&&H.title&&e.titleBar.update({title:null==t||null===(J=t.res)||void 0===J||null===(Y=J.video)||void 0===Y||null===($=Y.gist)||void 0===$?void 0:$.title});b(e)}(d,a),function(o,l){var r=t.getPlayer(o);r&&(r.on("loadeddata",function(){var e,t,a,s,u;try{var d,c,v,p,h,f;if(null!=l&&null!==(d=l.res)&&void 0!==d&&null!==(c=d.video)&&void 0!==c&&null!==(v=c.streamingInfo)&&void 0!==v&&v.isLiveStream&&null!=l&&null!==(p=l.res)&&void 0!==p&&null!==(h=p.video)&&void 0!==h&&null!==(f=h.liveDetails)&&void 0!==f&&f.isDvrEnabled){var m,y,g=(null===(m=r.seekable())||void 0===m?void 0:m.end(0))-(null===(y=r.seekable())||void 0===y?void 0:y.start(0));window.customData.dvrWindow=g}else window.customData.dvrWindow=null}catch(e){}try{var k,b,w;if(null!=l&&null!==(k=l.res)&&void 0!==k&&null!==(b=k.video)&&void 0!==b&&null!==(w=b.streamingInfo)&&void 0!==w&&w.isLiveStream){var L,S=null===(L=r.controlBar)||void 0===L?void 0:L.getChild("ProgressControl");if(S){var E=S.el().querySelector(".vjs-play-progress");E&&(E.style.width="100%")}}}catch(e){}try{r.qualityLevels().selectedIndex_=-1}catch(e){}try{var x,q,T=r.textTracks().tracks_;T=T.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var B=null===(x=r.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");if(T&&(null===(q=T)||void 0===q?void 0:q.length)>0){var O=C(r);null==B||B.addChild(O)}else try{B.children_[2].el_.style.right="115px"}catch(e){}try{var F,_;B.el_.style.opacity=1,(null===(F=r.controlBar)||void 0===F||null===(_=F.el_)||void 0===_?void 0:_.querySelector(".custom-smartTV-progress-bar")).style.opacity=1}catch(e){}}catch(e){}!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(a=t.app_data)&&void 0!==a&&null!==(s=a.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=l&&l.liveVideo||i.addNextEpPreview(o,l),null!=l&&l.liveVideo||n.isMobile()||i.initiateTrickplay(o)}),r.one("play",function(){var t,i,n,l;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(n=window)||void 0===n||null===(l=n.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}(r,a),function(e,n){var o,l,r,a,s,u,d,p,h=c.getSource(null==n?void 0:n.res,e)||{},f=h.src;i.addTVProviderImage(e,n),"MEDIA_TAILOR"==(null===(o=window)||void 0===o||null===(l=o.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.adsConfig)||void 0===a?void 0:a.vodAdSticherProvider)&&null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(p=d.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking&&v.setupAdvertisementMarkers(e,f);!function(e,i){var n=t.getPlayer(e);if(n){var o,l,r=!1,a=!1;null===(o=n.controlBar)||void 0===o||o.on("keydown",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!0)}),null===(l=n.controlBar)||void 0===l||l.on("keyup",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!1)}),n.on("seeking",function(){var e,t,i;n.paused()||r||(r=!0,n.pause());var o=n.currentTime();if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.dvrWindow)if(o=n.liveTracker.liveCurrentTime()-o,0==Math.round(o)){var l,a;o=window.customData.dvrWindow;var s=null===(l=n.controlBar)||void 0===l||null===(a=l.customControlSpacer)||void 0===a?void 0:a.getChild("SeekToLive");s&&(s.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=0)}else if(o>window.customData.dvrWindow){var u,d;o=0;var c=null===(u=n.controlBar)||void 0===u||null===(d=u.customControlSpacer)||void 0===d?void 0:d.getChild("SeekToLive");c&&(c.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}else{var v,p;o=window.customData.dvrWindow-o;var h=null===(v=n.controlBar)||void 0===v||null===(p=v.customControlSpacer)||void 0===p?void 0:p.getChild("SeekToLive");h&&(h.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}var f=o/(window.customData.dvrWindow?window.customData.dvrWindow:n.duration())*100,m=null===(i=n.controlBar)||void 0===i?void 0:i.getChild("ProgressControl");if(m){var y=m.el().querySelector(".vjs-play-progress");y&&(y.style.width=f+"%")}}),n.on("seeked",function(){var e,t,o,l,s,u;if(n.paused()&&r&&!a&&(r=!1,n.play()),null!=i&&null!==(e=i.res)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&null!==(o=t.streamingInfo)&&void 0!==o&&o.isLiveStream&&null!=i&&null!==(l=i.res)&&void 0!==l&&null!==(s=l.video)&&void 0!==s&&null!==(u=s.liveDetails)&&void 0!==u&&u.isDvrEnabled){var d,c,v=null===(d=n.controlBar)||void 0===d||null===(c=d.customControlSpacer)||void 0===c?void 0:c.getChild("SeekToLive");n.liveTracker.seekedBehindLive_?v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0):v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=1)}})}}(e,n)}(r,a)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6abeaa09.js"),l=require("./icons-0ea2e662.js"),i=require("./skin-3397dca5.js"),n=require("./renditions-26c6d0df.js"),r=require("./captions-3c7ca3a7.js"),o=require("./index-391dd643.js"),t=require("./browser-38ff3331.js");function d(l,d){var u=i.getPlayer(l);u&&(u.on("loadeddata",function(){var i,a,s,v,c,p,m;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,d),(null===(a=r.getCaptions(l))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(l,d),!(null!=d&&null!==(s=d.series)&&void 0!==s&&s.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play)||null!=d&&d.liveVideo||o.addNextEpPreview(l,d),function(e,l){var i,n=Math.floor(e/60),r=null===(i=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===i?void 0:i[0];r&&(r.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],t=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(t[0].style.display="block",r&&(r.style.marginRight="56px"))}(u.duration(),(null==d?void 0:d.liveVideo)||!1),null!=d&&d.liveVideo||t.isMobile()||o.initiateTrickplay(l)}),u.one("play",function(){var i,n,r,o;null!==(i=window)&&void 0!==i&&null!==(n=i.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),require("video.js"),require("./generic-6bf3ba02.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-b7e91ff3.js"),require("./util-c1962d91.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),exports.initialiseSkin=function(n,r){i.getPlayer(n).addClass("skin_defaultv2"),function(){"Chrome"==t.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-87c06e34.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),d(n,r),function(e,n){var r,o,t,d,u,a,s=i.getPlayer(e);null==s||null===(r=s.controlBar)||void 0===r||null===(o=r.getChild("FullscreenToggle"))||void 0===o||null===(t=o.el())||void 0===t||t.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==s||null===(d=s.controlBar)||void 0===d||null===(u=d.getChild("FullscreenToggle"))||void 0===u||null===(a=u.el())||void 0===a||a.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var v=document.getElementsByClassName("vjs-time-control");n.liveVideo&&v[0]&&(v[0].style.display="none")}(n,r),function(i,n){var r,o,t,d,u,a;0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());n.liveVideo||e.addSlowMotion(i);(null==n||null===(r=n.relatedVideos)||void 0===r||null===(o=r.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.relatedVideos);(null==n||null===(t=n.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.streams);(null==n||null===(d=n.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==n?void 0:n.playlist);null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,n)}(n,r),o.addTVProviderImage(n,r)};
|