@viewlift/player-backup 2.0.103-backup → 2.0.105-backup
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/bundle.css +72 -34
- package/cjs/{features-0febaf22.js → features-55df60da.js} +1 -1
- package/cjs/{index-c119a661.js → index-70e977ad.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/renditions-c5618ab7.js +1 -0
- package/cjs/{resolution-e46c9615.js → resolution-3b2ae0ba.js} +1 -1
- package/cjs/{settings-icon-6f9e9a90.js → settings-icon-9daa8da2.js} +1 -1
- package/cjs/{skin-5b25a6a3.js → skin-39ef50d6.js} +1 -1
- package/cjs/{skin-29970d97.js → skin-869b99c4.js} +1 -1
- package/cjs/skin-9680180f.js +1 -0
- package/cjs/{skin-15766a8b.js → skin-9e53d6e0.js} +1 -1
- package/esm/bundle.css +72 -34
- package/esm/{features-a845d93b.js → features-0ccf9856.js} +1 -1
- package/esm/{index-27af77eb.js → index-c50e1261.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/renditions-6323832e.js +1 -0
- package/esm/resolution-fcace655.js +1 -0
- package/esm/{settings-icon-7e5f9a3a.js → settings-icon-eb8e680a.js} +1 -1
- package/esm/{skin-4ca6cc5c.js → skin-3c20c768.js} +1 -1
- package/esm/{skin-9e9b3bde.js → skin-9785e13d.js} +1 -1
- package/esm/{skin-050d1e81.js → skin-d84d3645.js} +1 -1
- package/esm/skin-ecfbfb99.js +1 -0
- package/package.json +1 -1
- package/cjs/renditions-fed22c12.js +0 -1
- package/cjs/skin-817f015b.js +0 -1
- package/esm/renditions-4c09c626.js +0 -1
- package/esm/resolution-920515d1.js +0 -1
- package/esm/skin-2bcbd8b9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as r,e as d,T as s}from"./icons-0676e9c7.js";import{e as c,s as u,f as p,j as m,g as h,d as v,p as f}from"./skin-58b9263c.js";import{g}from"./renditions-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as r,e as d,T as s}from"./icons-0676e9c7.js";import{e as c,s as u,f as p,j as m,g as h,d as v,p as f}from"./skin-58b9263c.js";import{g}from"./renditions-6323832e.js";import{playSelectedResolution as y}from"./resolution-fcace655.js";import{g as C}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/defineProperty";import"./browser-d4613b36.js";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var E=l.getComponent("Component"),N=function(){n(L,E);var N,k,I=(N=L,k=b(),function(){var e,t=o(N);if(k){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function L(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,L),(a=I.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(L,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach(function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}})}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=l.dom.createEl("div",{className:"selection-container hidden"});l.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),l.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=l.dom.createEl("div",{className:"settings-selector-head"}),n=l.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=l.dom.createEl("div",{className:"settings-selector-title",innerHTML:C("settingsTitle")||"Settings"}),o=l.dom.createEl("div",{className:"settings-selector-content"}),r=l.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();l.dom.appendContent(r,s);var c=this.createAudioQualityContainer();l.dom.appendContent(r,c),l.dom.appendContent(a,n),l.dom.appendContent(a,i),l.dom.appendContent(e,a),l.dom.appendContent(e,o),l.dom.appendContent(o,r),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=l.dom.createEl("div",{className:"audio-language-container"}),n=l.dom.createEl("div",{className:"audio-language-container-title",innerHTML:C("audioLanguageText")||"Audio Language"});l.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var r=l.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(a){t.map(function(e){e.enabled=!1}),t[e].enabled=!0},l.dom.appendContent(i,r),l.dom.appendContent(i,o),l.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=l.dom.createEl("div",{className:"video-quality-container"}),n=l.dom.createEl("div",{className:"video-quality-container-title",innerHTML:C("videoQualityText")||"Video Quality"});l.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort(function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)});this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,r,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),h=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?C("enhancedBitrateLabel")||"Enhanced Bitrate":""),b=document.createTextNode(g);if(u.appendChild(b),p.appendChild(h),(null==i||null===(r=i[e])||void 0===r?void 0:r.height)>=720)for(var E=v("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=l.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var I=f(s());k.appendChild(I),c.appendChild(N),c.appendChild(k),c.appendChild(p),l.dom.appendContent(d,c),d.appendChild(u),l.dom.appendContent(a,d)},r=0;r<i.length;r++)o(r);return a}}]),L}();export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./skin-58b9263c.js";import{f as r,n as t}from"./features-
|
|
1
|
+
import{g as e}from"./skin-58b9263c.js";import{f as r,n as t}from"./features-0ccf9856.js";import{g as o}from"./renditions-6323832e.js";import{r as i}from"./captions-b7fd8308.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-76d748e7.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-271fa63f.js").then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,s){e(t).on("loadeddata",function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)})}(s,n),function(r){var o=e(r);o.controls(!1),t(r)}(s)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as r,d as n,e as i,i as l,j as a,k as o,l as u,m as s}from"./features-a845d93b.js";import{M as c,a as d,c as p,d as m}from"./icons-0676e9c7.js";import{t as v,g as f,b as h}from"./skin-58b9263c.js";import{g as b}from"./renditions-4c09c626.js";import{g}from"./captions-b7fd8308.js";import{a as y,b as x}from"./index-810dc03a.js";import j from"@babel/runtime/helpers/asyncToGenerator";import w from"@babel/runtime/regenerator";import k from"@babel/runtime/helpers/defineProperty";import E from"@babel/runtime/helpers/slicedToArray";import{d as N}from"./generic-76d748e7.js";import{i as A,d as C}from"./browser-d4613b36.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-613b5bf9.js";import"./util-80257541.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var I="my-player";function S(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function M(){return(M=j(w.mark(function e(t){var r,n,i,l,a,o,u,s,c,d,p,m,v,f,h,b,g,y,x,j,k,N,A,C;return w.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 r=e.sent,e.next=8,r.blob();case 8:return n=e.sent,e.next=11,createImageBitmap(n);case 11:for(i=e.sent,l=t.layout.split("x").map(Number),a=E(l,2),o=a[0],u=a[1],s=i.width/u,c=i.height/o,d=[],p=0;p<o;p++)for(m=0;m<u;m++)(v=document.createElement("canvas")).width=s,v.height=c,v.getContext("2d").drawImage(i,m*s,p*c,s,c,0,0,s,c),f=v.toDataURL("image/png"),d.push({uri:f,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),h=t.layout.split("x").map(Number),b=E(h,2),g=b[0],y=b[1],x=[],j=0;j<g*y;j++)x.push({uri:null===(k=window)||void 0===k||null===(N=k.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(C=A.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",x);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function B(e,t){return R.apply(this,arguments)}function R(){return(R=j(w.mark(function e(t,r){var n,i;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=r,e.prev=1,e.next=4,fetch(t);case 4:return n=e.sent,e.next=7,n.text();case 7:return i=e.sent,e.abrupt("return",S(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 P(e,t,r){var n=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=f(I);if(n&&i){var l=n.getBoundingClientRect(),a=(e.clientX-l.left)/l.width,o=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,l=t.length-1;for(;i<=l;){var a=Math.floor((i+l)/2),o=t[a];if(o===e)return o;o<e?i=a+1:l=a-1}var u=null!==(r=t[i])&&void 0!==r?r:1/0,s=null!==(n=t[l])&&void 0!==n?n:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(a*i.duration()),r),u=t[o];u&&!u.loading&&(u.loading=!0,function(e){return M.apply(this,arguments)}(u).then(function(e){var t=e[u.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),u.loading=!1,u.src=t.uri}))}}function D(e){return L.apply(this,arguments)}function L(){return(L=j(w.mark(function e(t){var r,n,i,l;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.forEach(function(e,t){for(var n=e.layout.split("x").map(Number),i=E(n,2),l=i[0]*i[1],a=e.duration,o=0;o<l;o++){var u,s=Math.round((t*l+o)*a);r[s]=T(T({},e),{},{duration:e.duration,tileIndex:o,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},k(u,"left","-60px"),k(u,"border","1px solid transparent"),k(u,"borderRadius","4px"),u)})}}),n=Object.keys(r).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",v(function(e){return P(e,r,n)},500)),null==(l=document.querySelector(".vjs-progress-control.vjs-control"))||l.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",v(function(e){return P(e,r,n)},500))}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var V=function(){var e=j(w.mark(function e(t,r){var n,i,l,a,o,u,s,c;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+r);case 2:return n=e.sent,e.next=5,n.text();case 5:i=e.sent,l=i.split("\n").map(function(e){return e.trim()}),a=[],o=null,u=0;case 10:if(!(u<(null==l?void 0:l.length))){e.next=27;break}if(!(s=l[u]).startsWith("#EXT-X-TILES")){e.next=19;break}o={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),r=E(t,2),n=r[0],i=r[1];n&&i&&(o[n.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,a.push(o),o=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}();function $(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function U(e,t){return _.apply(this,arguments)}function _(){return(_=j(w.mark(function e(t,r){var n,i,l,a,o,u,s,c,d,p,m,v,h,b,g,y,x,j,k,A,C,O,T,S,M,B,R,P,D,L,V,U,_,q,z,W,G,H,J,K,Q,Y,Z,ee,te,re,ne,ie,le,ae,oe,ue,se,ce,de,pe,me,ve;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=r,n=f(r),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),a=$(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return c=e.sent,e.next=11,c.text();case 11:d=e.sent,p=new DOMParser,m=p.parseFromString(d,"application/xml"),v=(null==n?void 0:n.duration())||(null===(o=N())||void 0===o||null===(u=o.video)||void 0===u?void 0:u.runtime),h=(null==m||null===(s=m.querySelector("MPD > BaseURL"))||void 0===s?void 0:s.textContent)||a+"/",b=m.getElementsByTagName("AdaptationSet"),g=0;case 18:if(!(g<b.length)){e.next=72;break}if(("image"!==(y=b[g]).getAttribute("contentType")||"image/png"!==y.getAttribute("mimeType"))&&"image/jpeg"!==y.getAttribute("mimeType")){e.next=69;break}if(j=y.getElementsByTagName("SegmentTemplate")[0],k=null===(x=j.getElementsByTagName("SegmentTimeline"))||void 0===x?void 0:x[0],!j||!k){e.next=48;break}if(O=k.getElementsByTagName("S"),T=parseInt(null===(A=O[0])||void 0===A?void 0:A.getAttribute("t")),S=parseInt(null===(C=O[0])||void 0===C?void 0:C.getAttribute("d")),M=y.getElementsByTagName("Representation")[0],B=M.getElementsByTagName("EssentialProperty")[0],R=B.getAttribute("value"),P=null==R?void 0:R.split("x"),D=E(P,2),L=D[0],V=D[1],!j){e.next=46;break}if(j.getAttribute("media"),U=j.getAttribute("timescale"),_=(U?S/U:S)/(L*V),q=M.getAttribute("id"),z=Math.round(v/_),W=Math.ceil(z/(L*V)),G=j.getAttribute("media"),parseInt(j.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],g=0;g<W;g++)K="/"==(J=G)[0]?new URL(a).origin:a+"/",H.push({duration:_,layout:R,uri:K+J.replace("$Time$",T+g*S).replace("$RepresentationID$",q)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=y.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=E(ee,2),re=te[0],ne=te[1],!j){e.next=69;break}if(j.getAttribute("media"),ie=j.getAttribute("duration"),le=j.getAttribute("timescale"),ae=(le?ie/le:ie)/(re*ne),oe=Q.getAttribute("id"),ue=Math.round(v/ae),se=Math.ceil(ue/(re*ne)),ce=j.getAttribute("media"),de=parseInt(j.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=F(ce),g=0;g<se;g++)ve=me?X(me,g+de):ce,pe.push({duration:ae,layout:Z,uri:h+ve.replace("$Number$",g+de).replace("$RepresentationID$",oe)});return e.abrupt("return",pe);case 69:g++,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 F(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function X(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function q(){return(q=j(w.mark(function e(t){var r,n,i,l,a,o,u,s,c,d,p,m,v,h,b,g;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=f(t),u=o.currentSource(),s=u.src,s=null!==(r=s)&&void 0!==r&&r.includes("blob")?null===(n=window)||void 0===n||null===(i=n.player)||void 0===i?void 0:i.getSource():s,null===(l=s)||void 0===l||!l.includes("m3u8")){e.next=19;break}return e.next=6,B(s,t);case 6:if(!((null==(c=e.sent)?void 0:c.length)>0)){e.next=17;break}return d=(null==c?void 0:c[0])||null,p=d.uri,m=s.substring(0,s.lastIndexOf("/"))+"/",e.next=12,V(m,p);case 12:return v=e.sent,e.next=15,D(v);case 15:h=e.sent,o.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(a=s)||void 0===a||!a.includes("mpd")){e.next=28;break}return e.next=22,U(s,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,D(b);case 26:g=e.sent,o.thumbnails(g);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function z(n,i){var l=f(n);l&&(l.on("loadeddata",function(){var r,a,o,u,s,c,d;(null===(r=b(n))||void 0===r?void 0:r.length)>0&&e(n,i),(null===(a=g(n))||void 0===a?void 0:a.length)>0&&t(n,i),!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(s=u.app_data)&&void 0!==s&&null!==(c=s.appcmsMain)&&void 0!==c&&null!==(d=c.features)&&void 0!==d&&d.auto_play)||null!=i&&i.liveVideo||y(n,i),function(e,t){var r,n=Math.floor(e/60),i=null===(r=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===r?void 0:r[0];i&&(i.style.marginRight=n>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(l.duration(),(null==i?void 0:i.liveVideo)||!1),null!=i&&i.liveVideo||A()||function(e){q.apply(this,arguments)}(n)}),l.one("play",function(){var e,t,i,l;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&r(n,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}function W(e,t){f(e).addClass("skin_defaultv2"),function(){"Chrome"==C()&&import("./chromett-a3cbb2e1.js").then(function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)});import("./skin-e4b35c14.js").then(function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)})}(),z(e,t),function(e,t){var r,n,i,l,a,o,u=f(e);null==u||null===(r=u.controlBar)||void 0===r||null===(n=r.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(h(c(window.controlsColor))),null==u||null===(l=u.controlBar)||void 0===l||null===(a=l.getChild("FullscreenToggle"))||void 0===a||null===(o=a.el())||void 0===o||o.appendChild(h(d(window.controlsColor)));var s=document.getElementsByClassName("vjs-time-control");t.liveVideo&&s[0]&&(s[0].style.display="none")}(e,t),function(e,t){var r,c,d,v,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&n(e,"defaultV2",p());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",m());t.liveVideo||l(e);(null==t||null===(r=t.relatedVideos)||void 0===r||null===(c=r.content)||void 0===c?void 0:c.length)>0&&a(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&o(e,null==t?void 0:t.streams);(null==t||null===(v=t.playlist)||void 0===v||null===(f=v.content)||void 0===f?void 0:f.length)>0&&u(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&s(e,t)}(e,t),x(e,t)}export{W as initialiseSkin};
|
|
1
|
+
import{f as e,g as t,h as r,d as n,e as i,i as l,j as a,k as o,l as u,m as s}from"./features-0ccf9856.js";import{M as c,a as d,c as p,d as m}from"./icons-0676e9c7.js";import{t as v,g as f,b as h}from"./skin-58b9263c.js";import{g as b}from"./renditions-6323832e.js";import{g}from"./captions-b7fd8308.js";import{a as y,b as x}from"./index-810dc03a.js";import j from"@babel/runtime/helpers/asyncToGenerator";import w from"@babel/runtime/regenerator";import k from"@babel/runtime/helpers/defineProperty";import E from"@babel/runtime/helpers/slicedToArray";import{d as N}from"./generic-76d748e7.js";import{i as A,d as C}from"./browser-d4613b36.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-613b5bf9.js";import"./util-80257541.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var I="my-player";function S(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function M(){return(M=j(w.mark(function e(t){var r,n,i,l,a,o,u,s,c,d,p,m,v,f,h,b,g,y,x,j,k,N,A,C;return w.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 r=e.sent,e.next=8,r.blob();case 8:return n=e.sent,e.next=11,createImageBitmap(n);case 11:for(i=e.sent,l=t.layout.split("x").map(Number),a=E(l,2),o=a[0],u=a[1],s=i.width/u,c=i.height/o,d=[],p=0;p<o;p++)for(m=0;m<u;m++)(v=document.createElement("canvas")).width=s,v.height=c,v.getContext("2d").drawImage(i,m*s,p*c,s,c,0,0,s,c),f=v.toDataURL("image/png"),d.push({uri:f,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),h=t.layout.split("x").map(Number),b=E(h,2),g=b[0],y=b[1],x=[],j=0;j<g*y;j++)x.push({uri:null===(k=window)||void 0===k||null===(N=k.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(C=A.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",x);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function B(e,t){return R.apply(this,arguments)}function R(){return(R=j(w.mark(function e(t,r){var n,i;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=r,e.prev=1,e.next=4,fetch(t);case 4:return n=e.sent,e.next=7,n.text();case 7:return i=e.sent,e.abrupt("return",S(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 P(e,t,r){var n=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=f(I);if(n&&i){var l=n.getBoundingClientRect(),a=(e.clientX-l.left)/l.width,o=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,l=t.length-1;for(;i<=l;){var a=Math.floor((i+l)/2),o=t[a];if(o===e)return o;o<e?i=a+1:l=a-1}var u=null!==(r=t[i])&&void 0!==r?r:1/0,s=null!==(n=t[l])&&void 0!==n?n:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(a*i.duration()),r),u=t[o];u&&!u.loading&&(u.loading=!0,function(e){return M.apply(this,arguments)}(u).then(function(e){var t=e[u.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),u.loading=!1,u.src=t.uri}))}}function D(e){return L.apply(this,arguments)}function L(){return(L=j(w.mark(function e(t){var r,n,i,l;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.forEach(function(e,t){for(var n=e.layout.split("x").map(Number),i=E(n,2),l=i[0]*i[1],a=e.duration,o=0;o<l;o++){var u,s=Math.round((t*l+o)*a);r[s]=T(T({},e),{},{duration:e.duration,tileIndex:o,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},k(u,"left","-60px"),k(u,"border","1px solid transparent"),k(u,"borderRadius","4px"),u)})}}),n=Object.keys(r).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",v(function(e){return P(e,r,n)},500)),null==(l=document.querySelector(".vjs-progress-control.vjs-control"))||l.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",v(function(e){return P(e,r,n)},500))}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var V=function(){var e=j(w.mark(function e(t,r){var n,i,l,a,o,u,s,c;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+r);case 2:return n=e.sent,e.next=5,n.text();case 5:i=e.sent,l=i.split("\n").map(function(e){return e.trim()}),a=[],o=null,u=0;case 10:if(!(u<(null==l?void 0:l.length))){e.next=27;break}if(!(s=l[u]).startsWith("#EXT-X-TILES")){e.next=19;break}o={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),r=E(t,2),n=r[0],i=r[1];n&&i&&(o[n.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,a.push(o),o=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}();function $(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function U(e,t){return _.apply(this,arguments)}function _(){return(_=j(w.mark(function e(t,r){var n,i,l,a,o,u,s,c,d,p,m,v,h,b,g,y,x,j,k,A,C,O,T,S,M,B,R,P,D,L,V,U,_,q,z,W,G,H,J,K,Q,Y,Z,ee,te,re,ne,ie,le,ae,oe,ue,se,ce,de,pe,me,ve;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=r,n=f(r),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),a=$(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return c=e.sent,e.next=11,c.text();case 11:d=e.sent,p=new DOMParser,m=p.parseFromString(d,"application/xml"),v=(null==n?void 0:n.duration())||(null===(o=N())||void 0===o||null===(u=o.video)||void 0===u?void 0:u.runtime),h=(null==m||null===(s=m.querySelector("MPD > BaseURL"))||void 0===s?void 0:s.textContent)||a+"/",b=m.getElementsByTagName("AdaptationSet"),g=0;case 18:if(!(g<b.length)){e.next=72;break}if(("image"!==(y=b[g]).getAttribute("contentType")||"image/png"!==y.getAttribute("mimeType"))&&"image/jpeg"!==y.getAttribute("mimeType")){e.next=69;break}if(j=y.getElementsByTagName("SegmentTemplate")[0],k=null===(x=j.getElementsByTagName("SegmentTimeline"))||void 0===x?void 0:x[0],!j||!k){e.next=48;break}if(O=k.getElementsByTagName("S"),T=parseInt(null===(A=O[0])||void 0===A?void 0:A.getAttribute("t")),S=parseInt(null===(C=O[0])||void 0===C?void 0:C.getAttribute("d")),M=y.getElementsByTagName("Representation")[0],B=M.getElementsByTagName("EssentialProperty")[0],R=B.getAttribute("value"),P=null==R?void 0:R.split("x"),D=E(P,2),L=D[0],V=D[1],!j){e.next=46;break}if(j.getAttribute("media"),U=j.getAttribute("timescale"),_=(U?S/U:S)/(L*V),q=M.getAttribute("id"),z=Math.round(v/_),W=Math.ceil(z/(L*V)),G=j.getAttribute("media"),parseInt(j.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],g=0;g<W;g++)K="/"==(J=G)[0]?new URL(a).origin:a+"/",H.push({duration:_,layout:R,uri:K+J.replace("$Time$",T+g*S).replace("$RepresentationID$",q)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=y.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=E(ee,2),re=te[0],ne=te[1],!j){e.next=69;break}if(j.getAttribute("media"),ie=j.getAttribute("duration"),le=j.getAttribute("timescale"),ae=(le?ie/le:ie)/(re*ne),oe=Q.getAttribute("id"),ue=Math.round(v/ae),se=Math.ceil(ue/(re*ne)),ce=j.getAttribute("media"),de=parseInt(j.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=F(ce),g=0;g<se;g++)ve=me?X(me,g+de):ce,pe.push({duration:ae,layout:Z,uri:h+ve.replace("$Number$",g+de).replace("$RepresentationID$",oe)});return e.abrupt("return",pe);case 69:g++,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 F(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function X(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function q(){return(q=j(w.mark(function e(t){var r,n,i,l,a,o,u,s,c,d,p,m,v,h,b,g;return w.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=f(t),u=o.currentSource(),s=u.src,s=null!==(r=s)&&void 0!==r&&r.includes("blob")?null===(n=window)||void 0===n||null===(i=n.player)||void 0===i?void 0:i.getSource():s,null===(l=s)||void 0===l||!l.includes("m3u8")){e.next=19;break}return e.next=6,B(s,t);case 6:if(!((null==(c=e.sent)?void 0:c.length)>0)){e.next=17;break}return d=(null==c?void 0:c[0])||null,p=d.uri,m=s.substring(0,s.lastIndexOf("/"))+"/",e.next=12,V(m,p);case 12:return v=e.sent,e.next=15,D(v);case 15:h=e.sent,o.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(a=s)||void 0===a||!a.includes("mpd")){e.next=28;break}return e.next=22,U(s,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,D(b);case 26:g=e.sent,o.thumbnails(g);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function z(n,i){var l=f(n);l&&(l.on("loadeddata",function(){var r,a,o,u,s,c,d;(null===(r=b(n))||void 0===r?void 0:r.length)>0&&e(n,i),(null===(a=g(n))||void 0===a?void 0:a.length)>0&&t(n,i),!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(s=u.app_data)&&void 0!==s&&null!==(c=s.appcmsMain)&&void 0!==c&&null!==(d=c.features)&&void 0!==d&&d.auto_play)||null!=i&&i.liveVideo||y(n,i),function(e,t){var r,n=Math.floor(e/60),i=null===(r=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===r?void 0:r[0];i&&(i.style.marginRight=n>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(l.duration(),(null==i?void 0:i.liveVideo)||!1),null!=i&&i.liveVideo||A()||function(e){q.apply(this,arguments)}(n)}),l.one("play",function(){var e,t,i,l;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&r(n,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}function W(e,t){f(e).addClass("skin_defaultv2"),function(){"Chrome"==C()&&import("./chromett-a3cbb2e1.js").then(function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)});import("./skin-e4b35c14.js").then(function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)})}(),z(e,t),function(e,t){var r,n,i,l,a,o,u=f(e);null==u||null===(r=u.controlBar)||void 0===r||null===(n=r.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(h(c(window.controlsColor))),null==u||null===(l=u.controlBar)||void 0===l||null===(a=l.getChild("FullscreenToggle"))||void 0===a||null===(o=a.el())||void 0===o||o.appendChild(h(d(window.controlsColor)));var s=document.getElementsByClassName("vjs-time-control");t.liveVideo&&s[0]&&(s[0].style.display="none")}(e,t),function(e,t){var r,c,d,v,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&n(e,"defaultV2",p());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",m());t.liveVideo||l(e);(null==t||null===(r=t.relatedVideos)||void 0===r||null===(c=r.content)||void 0===c?void 0:c.length)>0&&a(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&o(e,null==t?void 0:t.streams);(null==t||null===(v=t.playlist)||void 0===v||null===(f=v.content)||void 0===f?void 0:f.length)>0&&u(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&s(e,t)}(e,t),x(e,t)}export{W as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as s,d as i,e as o}from"./features-
|
|
1
|
+
import{a as e,b as t,c as s,d as i,e as o}from"./features-0ccf9856.js";import{i as r}from"./index-c50e1261.js";import{S as n,M as l,a,N as m,b as d,R as p}from"./icons-0676e9c7.js";import{g as u,b as c}from"./skin-58b9263c.js";import{d as b}from"./generic-76d748e7.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-6323832e.js";import"./localisation-0bf399a1.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"./util-80257541.js";import"./captions-b7fd8308.js";import"./resolution-fcace655.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-d4613b36.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"ua-parser-js";function v(v,h){u(v).addClass("skin_default"),r(v,h),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&i(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&o(e,"default",p())}(v,h),function(i,o){var r=u(i),l=(null==o?void 0:o.sres)||null;r.on("loadeddata",function(){e(i,"default",n()),l&&import("./nextEpisodeButton-df6e9d73.js").then(function(e){e.initaliseFunctionality(o.sres.seasons,b())})}),r.one("loadedmetadata",function(){var e;l&&(t(i,null==o||null===(e=o.sres)||void 0===e?void 0:e.seasons,o),s(o.sres,o.res,i))})}(v,h),function(e,t){var s,i,o,r,n=u(e),d=document.getElementsByClassName("vjs-current-time")[0],p=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),p&&(p.style.display="none"),b&&(b.style.display="none"));null===(s=n.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(i=s.el())||void 0===i||i.appendChild(c(l(window.controlsColor))),null===(o=n.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(r=o.el())||void 0===r||r.appendChild(c(a(window.controlsColor)));var v=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var h=document.createElement("div");h.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(h,v.querySelector(".vjs-menu-item"))}(v,h)}export{v as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,h as l,o as i,p as e,q as r}from"./features-0ccf9856.js";import{g as n}from"./skin-58b9263c.js";import{a,b as t}from"./index-810dc03a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import"videojs-contrib-quality-menu";import{S as s}from"./icons-0676e9c7.js";import d from"video.js";import{i as u,s as p}from"./index-c50e1261.js";import{e as v,d as m,j as c}from"./generic-76d748e7.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-6323832e.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-613b5bf9.js";import"./util-80257541.js";import"@babel/runtime/helpers/typeof";import"video.js/dist/video-js.min.css";import"./captions-b7fd8308.js";import"./resolution-fcace655.js";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-d4613b36.js";import"axios";import"js-cookie";import"ua-parser-js";function b(d,b){n(d).addClass("skin_vlone"),function(i,e){var r=n(i);r&&(r.on("loadeddata",function(){var l,r,n,t,d;o(i,"vl_one",s()),!(null!=e&&null!==(l=e.series)&&void 0!==l&&l.enable||null!==(r=window)&&void 0!==r&&null!==(n=r.app_data)&&void 0!==n&&null!==(t=n.appcmsMain)&&void 0!==t&&null!==(d=t.features)&&void 0!==d&&d.auto_play)||null!=e&&e.liveVideo||a(i,e)}),r.one("play",function(){var o,e,r,n;null!==(o=window)&&void 0!==o&&null!==(e=o.customData)&&void 0!==e&&e.iframeOverlayUrl&&l(i,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}(d,b),function(o,l){var n,a,s,d,b,y,g,f,h,j,C,w,B=v(null==l?void 0:l.res,o)||{};B.src,(null==l||null===(n=l.relatedVideos)||void 0===n||null===(a=n.content)||void 0===a?void 0:a.length)>0&&i(o,null==l?void 0:l.relatedVideos);null!=l&&null!==(s=l.series)&&void 0!==s&&s.enable&&e(o,l);(null==l||null===(d=l.streams)||void 0===d?void 0:d.length)>1&&r(o,null==l?void 0:l.streams);if(t(o,l),u(o,l),"MEDIA_TAILOR"==(null===(b=window)||void 0===b||null===(y=b.app_data)||void 0===y||null===(g=y.appcmsMain)||void 0===g||null===(f=g.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)&&null!==(h=window)&&void 0!==h&&null!==(j=h.app_data)&&void 0!==j&&null!==(C=j.appcmsMain)&&void 0!==C&&null!==(w=C.adsConfig)&&void 0!==w&&w.vodAdClientSideTracking){var k,_=null;if(null!=l&&null!==(k=l.series)&&void 0!==k&&k.enable){var T,A,M,x=null===(T=m())||void 0===T||null===(A=T.video)||void 0===A||null===(M=A.gist)||void 0===M?void 0:M.id,P=c(),R=(null==P?void 0:P.get(x))||{t:0,p:0},O=R.t;R.p<95&&(_=O)}else{var V=l.watchHistoryResumeTime;l.watchedPercentage<95&&(_=V)}p(o,_)}}(d,b),y(d,b)}var y=function(o,l){var i,e,r,a,t,s,u,p,v,m,c,b,y=n(o),g=(null==l?void 0:l.theme)||{},f=d.dom.$(".vjs-play-progress"),h=d.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(i=window)||void 0===i||null===(e=i.app_data)||void 0===e||null===(r=e.appcmsMain)||void 0===r||null===(a=r.brand)||void 0===a||null===(t=a.cta)||void 0===t||null===(s=t.primary)||void 0===s?void 0:s.backgroundColor)),f&&(f.style.background="".concat(null===(u=window)||void 0===u||null===(p=u.app_data)||void 0===p||null===(v=p.appcmsMain)||void 0===v||null===(m=v.brand)||void 0===m||null===(c=m.cta)||void 0===c||null===(b=c.primary)||void 0===b?void 0:b.backgroundColor));var j=y.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&f&&(f.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&j&&(j.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{b as initialiseSkin};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=require("./skin-3544db58.js");exports.getRenditions=function(i){var n,t=l.getPlayer(i),e=[];if((null==t||null===(n=t.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==t||null===(o=t.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(e=null==u?void 0:u.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var v,r,h=null==t||null===(v=t.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(e=null==h?void 0:h.sort(function(l,i){return i.height-l.height}))}return e};
|
package/cjs/skin-817f015b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-0febaf22.js"),l=require("./skin-3544db58.js"),r=require("./index-b0ccbe15.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray"),require("videojs-contrib-quality-menu");var i=require("video.js"),o=require("./index-c119a661.js"),n=require("./generic-77c1578a.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-fed22c12.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-948fb789.js"),require("./util-ef2cd61e.js"),require("./icons-0ea2e662.js"),require("@babel/runtime/helpers/typeof"),require("video.js/dist/video-js.min.css"),require("./captions-07bd3069.js"),require("./resolution-e46c9615.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-77c57718.js"),require("axios"),require("js-cookie"),require("ua-parser-js");function a(i,o){var n=l.getPlayer(i);n&&(n.on("loadeddata",function(){var e,n,a,u,d;!function(e){var r=l.getPlayer(e);r&&(null==r||r.qualityMenu,r.qualityMenu({useResolutionLabels:!0}))}(i),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(n=window)&&void 0!==n&&null!==(a=n.app_data)&&void 0!==a&&null!==(u=a.appcmsMain)&&void 0!==u&&null!==(d=u.features)&&void 0!==d&&d.auto_play)||null!=o&&o.liveVideo||r.addNextEpPreview(i,o)}),n.one("play",function(){var l,r,o,n;null!==(l=window)&&void 0!==l&&null!==(r=l.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(i,null===(o=window)||void 0===o||null===(n=o.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var u=function(e,r){var o,n,a,u,d,t,s,v,p,c,b,y,m=l.getPlayer(e),q=(null==r?void 0:r.theme)||{},g=i.dom.$(".vjs-play-progress"),h=i.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(o=window)||void 0===o||null===(n=o.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a||null===(u=a.brand)||void 0===u||null===(d=u.cta)||void 0===d||null===(t=d.primary)||void 0===t?void 0:t.backgroundColor)),g&&(g.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.brand)||void 0===c||null===(b=c.cta)||void 0===b||null===(y=b.primary)||void 0===y?void 0:y.backgroundColor));var j=m.getChild("BigPlayButton")||null;(null==q?void 0:q.progressBarColor)&&g&&(g.style.background=q.progressBarColor),(null==q?void 0:q.playButtonBackgroundColor)&&j&&(j.el().style.background=q.playButtonBackgroundColor),(null==q?void 0:q.playButtonColor)&&h&&(h.style.color=q.playButtonColor),(null==q?void 0:q.playButtonType)&&("square"==(null==q?void 0:q.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(i,d){l.getPlayer(i).addClass("skin_vlone"),a(i,d),function(l,i){var a,u,d,t,s,v,p,c,b,y,m,q,g=n.getSource(null==i?void 0:i.res,l)||{};g.src,(null==i||null===(a=i.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&e.addSeriesSelectorV2(l,i);(null==i||null===(t=i.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);if(r.addTVProviderImage(l,i),o.initialiseKeyboardEvents(l,i),"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(b=window)&&void 0!==b&&null!==(y=b.app_data)&&void 0!==y&&null!==(m=y.appcmsMain)&&void 0!==m&&null!==(q=m.adsConfig)&&void 0!==q&&q.vodAdClientSideTracking){var h,j=0;if(null!=i&&null!==(h=i.series)&&void 0!==h&&h.enable){var f,C,w,k=null===(f=n.getCurrentVideo())||void 0===f||null===(C=f.video)||void 0===C||null===(w=C.gist)||void 0===w?void 0:w.id,B=n.getSeriesWatchMap(),M=(null==B?void 0:B.get(k))||{t:0,p:0},P=M.t;M.p<95&&(j=P)}else{var S=i.watchHistoryResumeTime;i.watchedPercentage<95&&(j=S)}o.setupAdvertisementMarkers(l,j)}}(i,d),u(i,d)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as l}from"./skin-58b9263c.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var d,v,e=null==o||null===(d=o.tech_)||void 0===d||null===(v=d.vhs)||void 0===v?void 0:v.representations();(null==e?void 0:e.length)>0&&(t=null==e?void 0:e.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort(function(l,i){return i.height-l.height}))}return t};export{i as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{g as r,p as c}from"./skin-58b9263c.js";import{d as u}from"./browser-d4613b36.js";function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var m=s.getComponent("Component"),p=function(){o(f,m);var r,p,g=(r=f,p=h(),function(){var e,t=d(r);if(p){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),o=g.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",function(e){var t=s.dom.createEl("div",{className:"font hideCustomFonts"}),n=s.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});s.dom.appendContent(t,n);var i=s.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map(function(e,t){var n=s.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",function(e){var t=e.target.id;o.changeFontSize(t)}),s.dom.appendContent(i,n)}),s.dom.appendContent(t,i),s.dom.appendContent(e,t)}),l(i(o),"resetRenditions",function(){e(document.getElementsByClassName("rendition")).map(function(e){s.dom.removeClass(e,"selected")})}),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(f,[{key:"toggleContentOnHover",value:function(e,t){var n=s.dom.$(".setting-icon",e);n.addEventListener("mouseover",function(){s.dom.removeClass(t,"resolution_hidden")}),t.addEventListener("mouseover",function(){s.dom.removeClass(t,"resolution_hidden")}),n.addEventListener("mouseout",function(){s.dom.addClass(t,"resolution_hidden")}),t.addEventListener("mouseout",function(){s.dom.addClass(t,"resolution_hidden")})}},{key:"changeFontSize",value:function(e){var t=s.dom.$(".renditions",this.contentEl()),n=s.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=s.dom.$(".setting-icon",this.el()),o=c(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=s.dom.createEl("div",{className:"content resolution_hidden"}),l=s.dom.createEl("div",{innerHTML:"Quality",className:"title"}),r=s.dom.createEl("div",{className:"resolution"});s.dom.appendContent(r,l),this.toggleContentOnHover(n,d);var h=s.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map(function(e,n){var i,o,a=s.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var r=s.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});s.dom.appendContent(a,r),s.dom.appendContent(h,a),r.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(t.playerId,e.target),s.dom.addClass(r,"selected"))})}),this.addAutoRendition("nondrm",h),"Safari"!=u()&&this.addDynamicSwitchIfAuto()):(e.map(function(e,n){var i=s.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=s.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});s.dom.appendContent(i,d),s.dom.appendContent(h,i),d.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,v(t.playerId,e.target),s.dom.addClass(d,"selected"))})}),this.addAutoRendition("drm",h)),s.dom.appendContent(r,h),s.dom.appendContent(d,r),s.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,s,r,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(s=l.resolution)||void 0===s?void 0:s.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(r=o.value)||void 0===r||null===(c=r.resolution)||void 0===c?void 0:c.height}})}},{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"container"}),t=s.dom.createEl("div",{className:"setting-icon"});return s.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,r=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=s.dom.createEl("div",{className:"relative"}),u=s.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:r,res:l});u.addEventListener("click",function(e){window.height!==e.target.res&&(n.resetRenditions(),s.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(n.playerId,null,!0))}),s.dom.appendContent(c,u),s.dom.appendContent(t,c)}else{var h=s.dom.createEl("div",{className:"relative"}),m=s.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",function(e){n.resetRenditions(),s.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,v(n.playerId,null,!0)}),s.dom.appendContent(h,m),s.dom.appendContent(t,h)}}}]),f}(),v=function(e,t,n){var i,o=r(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach(function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)}),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(d)},100);var l=s.dom.$(".content");l&&s.dom.addClass(l,"resolution_hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(f)},100);var w=s.dom.$(".content");w&&s.dom.addClass(w,"resolution_hidden")}}};export{p as default,v as playSelectedResolution};
|
package/esm/skin-2bcbd8b9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as o,o as l,p as i,q as e}from"./features-a845d93b.js";import{g as r}from"./skin-58b9263c.js";import{a as n,b as a}from"./index-810dc03a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import"videojs-contrib-quality-menu";import t from"video.js";import{i as s,s as d}from"./index-27af77eb.js";import{e as u,d as p,j as v}from"./generic-76d748e7.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-4c09c626.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-613b5bf9.js";import"./util-80257541.js";import"./icons-0676e9c7.js";import"@babel/runtime/helpers/typeof";import"video.js/dist/video-js.min.css";import"./captions-b7fd8308.js";import"./resolution-920515d1.js";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-d4613b36.js";import"axios";import"js-cookie";import"ua-parser-js";function m(l,i){var e=r(l);e&&(e.on("loadeddata",function(){var o,e,a,t,s;!function(o){var l=r(o);l&&(null==l||l.qualityMenu,l.qualityMenu({useResolutionLabels:!0}))}(l),!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(e=window)&&void 0!==e&&null!==(a=e.app_data)&&void 0!==a&&null!==(t=a.appcmsMain)&&void 0!==t&&null!==(s=t.features)&&void 0!==s&&s.auto_play)||null!=i&&i.liveVideo||n(l,i)}),e.one("play",function(){var i,e,r,n;null!==(i=window)&&void 0!==i&&null!==(e=i.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(l,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}function c(o,n){r(o).addClass("skin_vlone"),m(o,n),function(o,r){var n,t,m,c,b,y,g,f,h,j,C,w,B=u(null==r?void 0:r.res,o)||{};B.src,(null==r||null===(n=r.relatedVideos)||void 0===n||null===(t=n.content)||void 0===t?void 0:t.length)>0&&l(o,null==r?void 0:r.relatedVideos);null!=r&&null!==(m=r.series)&&void 0!==m&&m.enable&&i(o,r);(null==r||null===(c=r.streams)||void 0===c?void 0:c.length)>1&&e(o,null==r?void 0:r.streams);if(a(o,r),s(o,r),"MEDIA_TAILOR"==(null===(b=window)||void 0===b||null===(y=b.app_data)||void 0===y||null===(g=y.appcmsMain)||void 0===g||null===(f=g.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)&&null!==(h=window)&&void 0!==h&&null!==(j=h.app_data)&&void 0!==j&&null!==(C=j.appcmsMain)&&void 0!==C&&null!==(w=C.adsConfig)&&void 0!==w&&w.vodAdClientSideTracking){var k,M=0;if(null!=r&&null!==(k=r.series)&&void 0!==k&&k.enable){var T,_,A,R=null===(T=p())||void 0===T||null===(_=T.video)||void 0===_||null===(A=_.gist)||void 0===A?void 0:A.id,q=v(),x=(null==q?void 0:q.get(R))||{t:0,p:0},P=x.t;x.p<95&&(M=P)}else{var O=r.watchHistoryResumeTime;r.watchedPercentage<95&&(M=O)}d(o,M)}}(o,n),b(o,n)}var b=function(o,l){var i,e,n,a,s,d,u,p,v,m,c,b,y=r(o),g=(null==l?void 0:l.theme)||{},f=t.dom.$(".vjs-play-progress"),h=t.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(i=window)||void 0===i||null===(e=i.app_data)||void 0===e||null===(n=e.appcmsMain)||void 0===n||null===(a=n.brand)||void 0===a||null===(s=a.cta)||void 0===s||null===(d=s.primary)||void 0===d?void 0:d.backgroundColor)),f&&(f.style.background="".concat(null===(u=window)||void 0===u||null===(p=u.app_data)||void 0===p||null===(v=p.appcmsMain)||void 0===v||null===(m=v.brand)||void 0===m||null===(c=m.cta)||void 0===c||null===(b=c.primary)||void 0===b?void 0:b.backgroundColor));var j=y.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&f&&(f.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&j&&(j.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{c as initialiseSkin};
|