@viewlift/player-backup 2.0.322-backup → 2.0.324-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 +1038 -1035
- package/cjs/{index-7872810d.js → index-92b1574f.js} +1 -1
- package/cjs/index-c6fd92ce.js +1 -0
- package/cjs/index-e8aa3719.js +1 -0
- package/cjs/index-ebdfbf69.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{skin-ede3604c.js → skin-03fe0216.js} +1 -1
- package/cjs/skin-46f381f0.js +1 -0
- package/cjs/{skin-9aa305cd.js → skin-4bf43856.js} +1 -1
- package/cjs/skin-72d4ff37.js +1 -0
- package/cjs/{skin-183b653f.js → skin-951abe43.js} +1 -1
- package/cjs/{skin-b8d3d8eb.js → skin-c307c196.js} +1 -1
- package/cjs/skin-c4b71f1f.js +1 -0
- package/cjs/skin-ca4f6915.js +1 -0
- package/cjs/skin-d4dcf3c8.js +1 -0
- package/cjs/skin-e562cdac.js +1 -0
- package/esm/bundle.css +1038 -1035
- package/esm/{index-9064019b.js → index-09831f16.js} +1 -1
- package/esm/index-3dd901f7.js +1 -0
- package/esm/index-608ce5e5.js +1 -0
- package/esm/index-ae256416.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{skin-85e53acf.js → skin-148dfa94.js} +1 -1
- package/esm/{skin-80480af1.js → skin-51700a89.js} +1 -1
- package/esm/{skin-120caa60.js → skin-5b384947.js} +1 -1
- package/esm/skin-63b9171a.js +1 -0
- package/esm/{skin-f685cb99.js → skin-661853df.js} +1 -1
- package/esm/skin-71506822.js +1 -0
- package/esm/skin-ab1fb777.js +1 -0
- package/esm/skin-bb16c3bf.js +1 -0
- package/esm/skin-bfa54532.js +1 -0
- package/esm/skin-e8976cd5.js +1 -0
- package/package.json +2 -4
- package/cjs/index-01027798.js +0 -1
- package/cjs/skin-723fa423.js +0 -1
- package/esm/index-76ed817b.js +0 -1
- package/esm/skin-020af4ff.js +0 -1
package/cjs/index-01027798.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t,n,i,a=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-66dce245.js"),r=require("./generic-54cf8a68.js"),o=require("./autoNextVideo-e243e37b.js"),d=require("./relatedVideosManager-0a220d05.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=[],m=!1,v=null,p=!1,f=null,g=null,h=null,x=null,y=null,C=function(){null!=v&&(clearInterval(v),v=null),p=!1},E="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,i,a,l,r;(null==(n=t)||null===(i=n.gist)||void 0===i||null===(a=i.imageGist)||void 0===a?void 0:a.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r||r.fallbackImage;var o=e.getElementsByClassName(E)[0];o||((o=document.createElement("div")).className=E,o.setAttribute("aria-hidden","true"),e.appendChild(o))}},N=function(e,t){if(e){var n=e.getElementsByClassName(E)[0];n&&(n.style.visibility=t?"visible":"hidden")}},b=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var i=document.createElement("span");return i.className="next-ep-duration",i.textContent="10",t.append(n,i),e.append(t),e},A=function(e,t,n,i){var a,r,o,d,u,s=null!=e&&e.isClip?null==e?void 0:e.seriesTitle:null==e?void 0:e.title,c=(null==e||null===(a=e.gist)||void 0===a?void 0:a.description)||(null==e?void 0:e.description)||"",v=document.createElement("div");v.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(r=e.gist)||void 0===r||null===(o=r.imageGist)||void 0===o?void 0:o.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.fallbackImage);var g=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),i=t%60;return"".concat(n,":").concat(String(i).padStart(2,"0"))}(null==e?void 0:e.runtime),h=document.createElement("div");h.className="next-ep-thumb-runtime",h.textContent=g,g||h.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(h);var x=document.createElement("div");x.className="next-ep-meta";var y=document.createElement("div");y.className="next-ep-title",y.textContent="".concat(s||"");var E=document.createElement("div");E.className="next-ep-desc",E.textContent=c||"",String(c||"").trim()||E.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var N=document.createElement("span");N.className="next-ep-badge";var b=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);N.textContent=b,b||N.classList.add("next-ep-badge--empty");var A=document.createElement("span");A.className="next-ep-episode",A.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var I=document.createElement("div");I.className="next-ep-meta-row-left",I.appendChild(N),I.appendChild(A);var B=document.createElement("img");B.className="next-ep-network-logo",B.alt="";var S=function(e){var t,n,i;if(e){var a=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(i=n.appcmsMain)||void 0===i?void 0:i.networks;if(e&&a){var l=null==a?void 0:a.find(function(t){if(t.identifier==e)return t});return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);S?B.src=S:B.classList.add("next-ep-network-logo--empty"),w.appendChild(I),x.appendChild(y),x.appendChild(E),x.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(x),P.appendChild(B),v.appendChild(p),v.appendChild(P),v.onclick=l.debounce(function(){C(),null==t||t.remove(),m=!0,L(n)},400),v},L=function(e,t){var n=l.getPlayer(e);if(n){var i=n.duration();if(Number.isFinite(i)&&!(i<=0)){n.pause(e);var a=r.getVideoIdx();o.switchToNext(a,e,c)}}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,i,a,l;for(i in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in a=t[i])a.hasOwnProperty(l)&&("object"===u(a[l])?n[l]=e(n[l],a[l]):n[l]=a[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},i=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(a){var l,r,o,d,u,s,c,m;function v(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",v),m()}r=t({},e,a),d=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=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=r[0].src,o.className="vjs-thumbnail",t(o.style,r[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),s=d.duration(),d.on("durationchange",function(e){s=d.duration()}),d.on("loadedmetadata",function(e){s=d.duration()}),(u=d.controlBar.progressControl).el().appendChild(l),c=function(e){var a,d,c,m,v,p,f,g,h,x;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=i(u.el()).getBoundingClientRect()).width||x.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),m=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m-=i(u.el()).getBoundingClientRect().left+h,a=Math.floor((m-u.el().offsetLeft)/u.width()*s),r)a>d&&(c=Math.max(c,d));(v=r[c]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),m+(g=function(e,t){var i;return t?parseFloat(t):"auto"!==(i=n(e)("clip"))&&"inherit"!==i&&4===(i=i.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(i[1])-parseFloat(i[3]):0}(o,v.width||r[0].width)/2)>f?m-=m+g-f:m<g&&(m=g),l.style.left=m+"px"},u.on("mousemove",c),u.on("touchmove",c),u.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",v)}),m=function(e){l.style.left="-1000px"},u.on("mouseout",m),u.on("touchcancel",m),u.on("touchend",m),d.on("userinactive",m)}),exports.addNextEpPreview=function e(t,n){var i;if(m=!1,x=t,y=n,h&&(h(),h=null),null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var o;c=[];var u=r.getCurrentSeries();null==u||u.map(function(e){var t;return(t=c).push.apply(t,a(e.episodes))}),null==n||null===(o=n.series)||void 0===o||o.cb}else{var s=d.relatedVideosManager.get();c=(null==s?void 0:s.content)||[],null==s||s.cb,h=d.relatedVideosManager.subscribe(function(){h&&(h(),h=null),x&&y&&e(x,y)})}var E=l.getPlayer(t);if(E){!function(e){e&&g&&(e.off("timeupdate",g),g=null)}(l.getPlayer(f)),C(),f=t,g=function(){var e,n;if(!m){var i=E.duration(),a=E.currentTime(),l=Number.isFinite(i)&&i>0?i-a:1/0,o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(t),u=r.getVideoIdx()<=(null===(n=c)||void 0===n?void 0:n.length)-1;if(l>1){if(null!=v||p){C();var s=null==o?void 0:o.querySelector(".next-ep-header .next-ep-duration");s&&(s.textContent="10")}return o&&(o.style.visibility="hidden"),void N(d,!1)}u?(o&&(o.style.visibility="visible"),N(d,!0),p||null!=v||(E.pause(t),p=!0,function(e){var t;if(null==v){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var a=10;i.textContent="10",v=setInterval(function(){a--,i.textContent=String(a),0===a&&(clearInterval(v),v=null,p=!1,c.filter(function(e,t){return t==r.getVideoIdx()}),L(e))},1e3)}}}(t))):N(d,!1)}},E.on("timeupdate",g);var I,B=c.filter(function(e,t){return t==r.getVideoIdx()});if((null==B?void 0:B.length)>0)if(null!==(I=document.getElementsByClassName("next-ep-preview"))&&void 0!==I&&I[0]){var S,P,q=null===(S=document.getElementsByClassName("next-ep-preview"))||void 0===S?void 0:S[0];q.style.visibility="hidden",null===(P=q.querySelector(".next-ep-preview-inner"))||void 0===P||P.remove(),Array.from(q.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var j=q.querySelector(".next-heading-wrapper");if(j){var k=j.querySelector(".next-ep-header"),M=null==k?void 0:k.querySelector(".next-ep-duration");if(!M&&k){k.textContent="";var V=document.createElement("span");V.className="next-ep-header-text",V.textContent="Next up in",(M=document.createElement("span")).className="next-ep-duration",M.textContent="10",k.append(V,M)}else M&&(M.textContent="10")}else j=b(),q.insertBefore(j,q.firstChild);q.appendChild(A(B[0],q,t));var T=document.getElementById(t);w(T,B[0]),N(T,!1)}else{var O=document.createElement("div");O.className="next-ep-preview",O.style.visibility="hidden";var F=document.getElementById(t);F.append(O);var X=b();O.append(X);var D=A(B[0],O,t);O.append(D),w(F,B[0]),N(F,!1)}}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="Provider Image",a.append(r),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"})}};
|
package/cjs/skin-723fa423.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-db5508ee.js"),l=require("./skin-66dce245.js"),i=require("./index-01027798.js"),r=require("./index-7872810d.js"),n=require("./browser-3670a923.js");require("videojs-contrib-quality-menu");var o=require("./relatedVideosManager-0a220d05.js"),u=require("video.js"),d=require("./generic-54cf8a68.js"),a=require("./icons-eb807ef0.js");require("@babel/runtime/helpers/defineProperty"),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-627bdfad.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-e243e37b.js"),require("./index-9b471ea5.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("md5"),require("js-cookie"),require("./captions-0ca41a03.js"),require("@viewlift/comscore/index.js");function t(u,d){var a,t=l.getPlayer(u),s=(null==d||null===(a=d.res)||void 0===a?void 0:a.siteId)||"";t&&(t.on("loadeddata",function(){var e,a,t,v,c,p,b,g;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(u);var y=(null===(e=o.relatedVideosManager.get())||void 0===e||null===(a=e.content)||void 0===a?void 0:a.length)>0;if(!(null!=d&&null!==(t=d.series)&&void 0!==t&&t.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(b=p.features)&&void 0!==b&&b.auto_play||y)||null!=d&&d.liveVideo){if(!(null!=d&&d.liveVideo||null!=d&&null!==(g=d.series)&&void 0!==g&&g.enable)){var m;m=o.relatedVideosManager.subscribe(function(e){var l;(null==e||null===(l=e.content)||void 0===l?void 0:l.length)>0&&(i.addNextEpPreview(u,d),m&&m())})}}else i.addNextEpPreview(u,d);null!=d&&d.liveVideo||n.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===s||r.initiateTrickplay(u)}),t.one("play",function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(u,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var s=function(e,i){var r,n,o,d,a,t,s,v,c,p,b,g,y=l.getPlayer(e),m=(null==i?void 0:i.theme)||{},q=u.dom.$(".vjs-play-progress"),h=u.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(d=o.brand)||void 0===d||null===(a=d.cta)||void 0===a||null===(t=a.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(b=p.cta)||void 0===b||null===(g=b.primary)||void 0===g?void 0:g.backgroundColor));var f=y.getChild("BigPlayButton")||null;(null==m?void 0:m.progressBarColor)&&q&&(q.style.background=m.progressBarColor),(null==m?void 0:m.playButtonBackgroundColor)&&f&&(f.el().style.background=m.playButtonBackgroundColor),(null==m?void 0:m.playButtonColor)&&h&&(h.style.color=m.playButtonColor),(null==m?void 0:m.playButtonType)&&("square"==(null==m?void 0:m.playButtonType)?f.el().style.borderRadius=".3em":f.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,n){l.getPlayer(r).addClass("skin_vlone"),t(r,n),function(r,n){var u,t,s,v,c,p,b,g=l.getPlayer(r),y=(null==n?void 0:n.liveVideo)||!1,m=(null==n||null===(u=n.res)||void 0===u?void 0:u.contentType)||"video",q=(null==n||null===(t=n.res)||void 0===t||null===(s=t[m])||void 0===s?void 0:s.isSSAIEnabled)||!1,h=d.getSource(null==n?void 0:n.res,r)||{};h.src;var f=(null==n?void 0:n.skin_settings)||{},k=(null==n||null===(v=n.customData)||void 0===v?void 0:v.ads)||{};if(y&&(null==n||!n.liveui)){var w,j,C=(null==g||null===(w=g.controlBar)||void 0===w||null===(j=w.getChild("LiveDisplay"))||void 0===j?void 0:j.el())||null;C&&(C.onclick=function(){try{var e;null==g||null===(e=g.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}})}null!=f&&f.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"VL_ONE",a.SkipSvgV2());(null!=f&&f.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(r,"VL_ONE",a.RewindSvgV2());var V,S=o.relatedVideosManager.get();(null==S||null===(c=S.content)||void 0===c?void 0:c.length)>0&&e.addVideoSelector(r,S);V=o.relatedVideosManager.subscribe(function(i){var n,o,u=l.getPlayer(r);(null==u||null===(n=u.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==i||null===(o=i.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector(r,i),V&&V())}),null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2(r,n);(null==n||null===(b=n.streams)||void 0===b?void 0:b.length)>1&&e.addMulticamSelector(r,null==n?void 0:n.streams);if(i.addTVProviderImage(r,n),d.initialiseKeyboardEvents(r,n),q&&y&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&!(null==k||!k.liveAdClientSideTracking))d.initializeTransmit(r,n);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&q)if(y)d.setupAdvertisementMarkersForLinear(r);else{var B,M=null;if(null!=n&&null!==(B=n.series)&&void 0!==B&&B.enable){var T,P,A,x,E,R=null===(T=d.getCurrentVideo())||void 0===T||null===(P=T.video)||void 0===P||null===(A=P.gist)||void 0===A?void 0:A.id,_=d.getSeriesWatchMap(),L=(null==_?void 0:_.get(R))||{t:0,p:0},O=L.t,I=L.p;"function"==typeof(null===(x=window)||void 0===x||null===(E=x.watchHistory)||void 0===E?void 0:E.cb)&&window.watchHistory.cb({watchedTime:O}),I<95&&(M=O)}else{var N=n.watchHistoryResumeTime;n.watchedPercentage<95&&(M=N)}d.setupAdvertisementMarkers(r,M)}}(r,n),s(r,n)};
|
package/esm/index-76ed817b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,d as n}from"./skin-3653c5b3.js";import{a4 as a,b as i}from"./generic-279952e4.js";import{s as l}from"./autoNextVideo-b094b4eb.js";import{r as o}from"./relatedVideosManager-81661348.js";import r from"@babel/runtime/helpers/typeof";import d from"video.js";var s,u,c,m,p=[],v=!1,f=null,h=!1,g=null,x=null,y=null,C=null,E=null,b=function(){null!=f&&(clearInterval(f),f=null),h=!1},w="next-ep-preview-player-thumb",N=function(e,t){if(e){var n,a,i,l,o;(null==(n=t)||null===(a=n.gist)||void 0===a||null===(i=a.imageGist)||void 0===i?void 0:i.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(o=l.customData)||void 0===o||o.fallbackImage;var r=e.getElementsByClassName(w)[0];r||((r=document.createElement("div")).className=w,r.setAttribute("aria-hidden","true"),e.appendChild(r))}},A=function(e,t){if(e){var n=e.getElementsByClassName(w)[0];n&&(n.style.visibility=t?"visible":"hidden")}},L=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var a=document.createElement("span");return a.className="next-ep-duration",a.textContent="10",t.append(n,a),e.append(t),e},B=function(e,t,a,i){var l,o,r,d,s,u=null!=e&&e.isClip?null==e?void 0:e.seriesTitle:null==e?void 0:e.title,c=(null==e||null===(l=e.gist)||void 0===l?void 0:l.description)||(null==e?void 0:e.description)||"",m=document.createElement("div");m.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(o=e.gist)||void 0===o||null===(r=o.imageGist)||void 0===r?void 0:r.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s?void 0:s.fallbackImage);var h=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),a=t%60;return"".concat(n,":").concat(String(a).padStart(2,"0"))}(null==e?void 0:e.runtime),g=document.createElement("div");g.className="next-ep-thumb-runtime",g.textContent=h,h||g.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(g);var x=document.createElement("div");x.className="next-ep-meta";var y=document.createElement("div");y.className="next-ep-title",y.textContent="".concat(u||"");var C=document.createElement("div");C.className="next-ep-desc",C.textContent=c||"",String(c||"").trim()||C.classList.add("next-ep-desc--empty");var E=document.createElement("div");E.className="next-ep-meta-row";var w=document.createElement("span");w.className="next-ep-badge";var N=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);w.textContent=N,N||w.classList.add("next-ep-badge--empty");var A=document.createElement("span");A.className="next-ep-episode",A.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var L=document.createElement("div");L.className="next-ep-meta-row-left",L.appendChild(w),L.appendChild(A);var B=document.createElement("img");B.className="next-ep-network-logo",B.alt="";var S=function(e){var t,n,a;if(e){var i=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a?void 0:a.networks;if(e&&i){var l=null==i?void 0:i.find(function(t){if(t.identifier==e)return t});return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);S?B.src=S:B.classList.add("next-ep-network-logo--empty"),E.appendChild(L),x.appendChild(y),x.appendChild(C),x.appendChild(E);var j=document.createElement("div");return j.className="next-ep-meta-with-logo",j.appendChild(x),j.appendChild(B),m.appendChild(p),m.appendChild(j),m.onclick=n(function(){b(),null==t||t.remove(),v=!0,I(a)},400),m},S=function n(l,r){var d;if(v=!1,C=l,E=r,y&&(y(),y=null),null!=r&&null!==(d=r.series)&&void 0!==d&&d.enable){var s;p=[];var u=i();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==r||null===(s=r.series)||void 0===s||s.cb}else{var c=o.get();p=(null==c?void 0:c.content)||[],null==c||c.cb,y=o.subscribe(function(){y&&(y(),y=null),C&&E&&n(C,E)})}var m=t(l);if(m){!function(e){e&&x&&(e.off("timeupdate",x),x=null)}(t(g)),b(),g=l,x=function(){var e,t;if(!v){var n=m.duration(),i=m.currentTime(),o=Number.isFinite(n)&&n>0?n-i:1/0,r=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(l),s=a()<=(null===(t=p)||void 0===t?void 0:t.length)-1;if(o>1){if(null!=f||h){b();var u=null==r?void 0:r.querySelector(".next-ep-header .next-ep-duration");u&&(u.textContent="10")}return r&&(r.style.visibility="hidden"),void A(d,!1)}s?(r&&(r.style.visibility="visible"),A(d,!0),h||null!=f||(m.pause(l),h=!0,function(e){var t;if(null==f){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var l=10;i.textContent="10",f=setInterval(function(){l--,i.textContent=String(l),0===l&&(clearInterval(f),f=null,h=!1,p.filter(function(e,t){return t==a()}),I(e))},1e3)}}}(l))):A(d,!1)}},m.on("timeupdate",x);var w,S=p.filter(function(e,t){return t==a()});if((null==S?void 0:S.length)>0)if(null!==(w=document.getElementsByClassName("next-ep-preview"))&&void 0!==w&&w[0]){var j,k,P=null===(j=document.getElementsByClassName("next-ep-preview"))||void 0===j?void 0:j[0];P.style.visibility="hidden",null===(k=P.querySelector(".next-ep-preview-inner"))||void 0===k||k.remove(),Array.from(P.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var M=P.querySelector(".next-heading-wrapper");if(M){var O=M.querySelector(".next-ep-header"),q=null==O?void 0:O.querySelector(".next-ep-duration");if(!q&&O){O.textContent="";var F=document.createElement("span");F.className="next-ep-header-text",F.textContent="Next up in",(q=document.createElement("span")).className="next-ep-duration",q.textContent="10",O.append(F,q)}else q&&(q.textContent="10")}else M=L(),P.insertBefore(M,P.firstChild);P.appendChild(B(S[0],P,l));var T=document.getElementById(l);N(T,S[0]),A(T,!1)}else{var X=document.createElement("div");X.className="next-ep-preview",X.style.visibility="hidden";var D=document.getElementById(l);D.append(X);var R=L();X.append(R);var G=B(S[0],X,l);X.append(G),N(D,S[0]),A(D,!1)}}},I=function(e,n){var i=t(e);if(i){var o=i.duration();if(Number.isFinite(o)&&!(o<=0)){i.pause(e);var r=a();l(r,e,p)}}};function j(e,n){var a=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",l.append(o),a.el().appendChild(l),a.on("useractive",function(){l.classList.remove("vjs-fade")}),a.on("userinactive",function(){a.paused()||l.classList.add("vjs-fade")}),a.on("fullscreenchange",function(){a.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}s={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,a,i,l;for(a in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[a])i.hasOwnProperty(l)&&("object"===r(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},c=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===c(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,a,i,l,o,r,d;function p(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",p),d()}n=u({},s,e),i=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=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",a=document.createElement("img"),t.appendChild(a),a.src=n[0].src,a.className="vjs-thumbnail",u(a.style,n[0].style),a.style.left||a.style.right||(a.onload=function(){a.style.left=-a.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,d,s,p,v,f,h,g,x;for(r in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=m(l.el()).getBoundingClientRect()).width||x.right)+g,v=e.pageX,e.changedTouches&&(v=e.changedTouches[0].pageX),s=v||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>r&&(d=Math.max(d,r));(p=n[d]).src&&a.src!=p.src&&(a.src=p.src),p.style&&a.style!=p.style&&u(a.style,p.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=c(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(a,p.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",p)}),d=function(e){t.style.left="-1000px"},l.on("mouseout",d),l.on("touchcancel",d),l.on("touchend",d),i.on("userinactive",d)});export{S as a,j as b};
|
package/esm/skin-020af4ff.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as l,d as o,e as i,o as e,p as n,q as r}from"./features-d1c0969b.js";import{g as t}from"./skin-3653c5b3.js";import{a,b as d}from"./index-76ed817b.js";import{i as u}from"./index-9064019b.js";import{a as s}from"./browser-de5f6a74.js";import"videojs-contrib-quality-menu";import{r as v}from"./relatedVideosManager-81661348.js";import p from"video.js";import{f as c,a3 as m,a7 as b,a8 as f,e as y,a9 as g,m as h}from"./generic-279952e4.js";import{c as j,d as w}from"./icons-262bef63.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"./renditions-620d93b3.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-b094b4eb.js";import"./index-7814cd08.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./captions-15915fce.js";import"@viewlift/comscore/index.js";function k(o,i){var e,n=t(o),r=(null==i||null===(e=i.res)||void 0===e?void 0:e.siteId)||"";n&&(n.on("loadeddata",function(){var l,e,n,d,p,c,m,b;!function(l){var o=t(l);o&&(null==o||o.qualityMenu,o.qualityMenu({useResolutionLabels:!0}))}(o);var f=(null===(l=v.get())||void 0===l||null===(e=l.content)||void 0===e?void 0:e.length)>0;if(!(null!=i&&null!==(n=i.series)&&void 0!==n&&n.enable||null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(c=p.appcmsMain)&&void 0!==c&&null!==(m=c.features)&&void 0!==m&&m.auto_play||f)||null!=i&&i.liveVideo){if(!(null!=i&&i.liveVideo||null!=i&&null!==(b=i.series)&&void 0!==b&&b.enable)){var y;y=v.subscribe(function(l){var e;(null==l||null===(e=l.content)||void 0===e?void 0:e.length)>0&&(a(o,i),y&&y())})}}else a(o,i);null!=i&&i.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===r||u(o)}),n.one("play",function(){var i,e,n,r;null!==(i=window)&&void 0!==i&&null!==(e=i.customData)&&void 0!==e&&e.iframeOverlayUrl&&l(o,null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function C(l,a){t(l).addClass("skin_vlone"),k(l,a),function(l,a){var u,s,p,k,C,B,T,A=t(l),V=(null==a?void 0:a.liveVideo)||!1,_=(null==a||null===(u=a.res)||void 0===u?void 0:u.contentType)||"video",M=(null==a||null===(s=a.res)||void 0===s||null===(p=s[_])||void 0===p?void 0:p.isSSAIEnabled)||!1,S=c(null==a?void 0:a.res,l)||{};S.src;var x=(null==a?void 0:a.skin_settings)||{},L=(null==a||null===(k=a.customData)||void 0===k?void 0:k.ads)||{};if(V&&(null==a||!a.liveui)){var R,q,E=(null==A||null===(R=A.controlBar)||void 0===R||null===(q=R.getChild("LiveDisplay"))||void 0===q?void 0:q.el())||null;E&&(E.onclick=function(){try{var l;null==A||null===(l=A.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}})}null!=x&&x.skipBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)&&o(l,"VL_ONE",j());(null!=x&&x.rewindBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)||1==(null==a?void 0:a.liveui))&&i(l,"VL_ONE",w());var O,P=v.get();(null==P||null===(C=P.content)||void 0===C?void 0:C.length)>0&&e(l,P);O=v.subscribe(function(o){var i,n,r=t(l);(null==r||null===(i=r.controlBar)||void 0===i||!i.getChild("videoSelector"))&&(null==o||null===(n=o.content)||void 0===n?void 0:n.length)>0&&(e(l,o),O&&O())}),null!=a&&null!==(B=a.series)&&void 0!==B&&B.enable&&n(l,a);(null==a||null===(T=a.streams)||void 0===T?void 0:T.length)>1&&r(l,null==a?void 0:a.streams);if(d(l,a),m(l,a),M&&V&&"TRANSMIT"==(null==L?void 0:L.liveAdSticherProvider)&&!(null==L||!L.liveAdClientSideTracking))b(l,a);else if("MEDIA_TAILOR"==(null==L?void 0:L.vodAdSticherProvider)&&null!=L&&L.vodAdClientSideTracking&&M)if(V)f(l);else{var D,I=null;if(null!=a&&null!==(D=a.series)&&void 0!==D&&D.enable){var H,N,G,U,$,F=null===(H=y())||void 0===H||null===(N=H.video)||void 0===N||null===(G=N.gist)||void 0===G?void 0:G.id,z=h(),J=(null==z?void 0:z.get(F))||{t:0,p:0},K=J.t,Q=J.p;"function"==typeof(null===(U=window)||void 0===U||null===($=U.watchHistory)||void 0===$?void 0:$.cb)&&window.watchHistory.cb({watchedTime:K}),Q<95&&(I=K)}else{var W=a.watchHistoryResumeTime;a.watchedPercentage<95&&(I=W)}g(l,I)}}(l,a),B(l,a)}var B=function(l,o){var i,e,n,r,a,d,u,s,v,c,m,b,f=t(l),y=(null==o?void 0:o.theme)||{},g=p.dom.$(".vjs-play-progress"),h=p.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===(r=n.brand)||void 0===r||null===(a=r.cta)||void 0===a||null===(d=a.primary)||void 0===d?void 0:d.backgroundColor)),g&&(g.style.background="".concat(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(v=s.appcmsMain)||void 0===v||null===(c=v.brand)||void 0===c||null===(m=c.cta)||void 0===m||null===(b=m.primary)||void 0===b?void 0:b.backgroundColor));var j=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&g&&(g.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{C as initialiseSkin};
|