@viewlift/player-backup 2.0.132-backup → 2.0.134-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/{autoNextVideo-40069678.js → autoNextVideo-772aa1e4.js} +1 -1
- package/cjs/bundle.css +9 -3
- package/cjs/{caption-settings-a3939365.js → caption-settings-2d0d80c2.js} +1 -1
- package/cjs/{features-f264a3d3.js → features-fff92547.js} +1 -1
- package/cjs/{generic-c2b13fd4.js → generic-16dcb8e7.js} +1 -1
- package/cjs/{index-dfebe5a6.js → index-b3479822.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-a59a8f96.js → multicamv2-783da52d.js} +1 -1
- package/cjs/{multicamv2-6e413c21.js → multicamv2-fa881b68.js} +1 -1
- package/cjs/{nextEpisodeButton-70084c28.js → nextEpisodeButton-38890c08.js} +1 -1
- package/cjs/{playlist-b830ba87.js → playlist-b5587b2f.js} +1 -1
- package/cjs/{series-17e0238d.js → series-cd8f762b.js} +1 -1
- package/cjs/{series-v2-91f1ef7b.js → series-v2-670b8f73.js} +1 -1
- package/cjs/{series-v2-5f56f01e.js → series-v2-80092887.js} +1 -1
- package/cjs/{settings-icon-341b6115.js → settings-icon-f35e989f.js} +1 -1
- package/cjs/{skin-2c5c69a4.js → skin-0db26a7d.js} +1 -1
- package/cjs/{skin-70fe772b.js → skin-20f0f6c5.js} +1 -1
- package/cjs/{skin-5ddc2655.js → skin-21c3313e.js} +1 -1
- package/cjs/{skin-33140afc.js → skin-406293b2.js} +1 -1
- package/cjs/skin-71b7d779.js +1 -0
- package/cjs/skin-bb33dcf4.js +1 -0
- package/cjs/{skin-b1a4c276.js → skin-cb63c905.js} +1 -1
- package/cjs/{skin-980204b6.js → skin-f8559cff.js} +1 -1
- package/cjs/{videoSelector-2d3226c6.js → videoSelector-ee40c7e3.js} +1 -1
- package/cjs/{videoSelector-ea3af129.js → videoSelector-fb8c423f.js} +1 -1
- package/esm/{autoNextVideo-b7280cee.js → autoNextVideo-3119b978.js} +1 -1
- package/esm/bundle.css +9 -3
- package/esm/{caption-settings-85f54d85.js → caption-settings-850c76a6.js} +1 -1
- package/esm/{features-2749a5a0.js → features-b7f426dd.js} +1 -1
- package/esm/{generic-fca15610.js → generic-98fe3bd4.js} +1 -1
- package/esm/helpers/skin.d.ts +1 -0
- package/esm/index-f26fa7e0.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-1f2fe600.js → multicamv2-54ebe614.js} +1 -1
- package/esm/{multicamv2-0bab928b.js → multicamv2-62592145.js} +1 -1
- package/esm/{nextEpisodeButton-e0f822ce.js → nextEpisodeButton-97eeb5ee.js} +1 -1
- package/esm/{playlist-4aa96dc2.js → playlist-b8fdb344.js} +1 -1
- package/esm/{series-257674ac.js → series-05b92686.js} +1 -1
- package/esm/{series-v2-89ddc2c7.js → series-v2-17645dff.js} +1 -1
- package/esm/{series-v2-9b91da48.js → series-v2-f1805d30.js} +1 -1
- package/esm/{settings-icon-336390f5.js → settings-icon-6869ef37.js} +1 -1
- package/esm/skin-0011e48b.js +1 -0
- package/esm/{skin-0f689204.js → skin-1d47c799.js} +1 -1
- package/esm/{skin-0a1af37f.js → skin-5cc720f0.js} +1 -1
- package/esm/{skin-d6b909e3.js → skin-96ebd5c5.js} +1 -1
- package/esm/{skin-7ac9cfb2.js → skin-96feaf2c.js} +1 -1
- package/esm/{skin-cf77e6b5.js → skin-dfcd9af1.js} +1 -1
- package/esm/{skin-56dce0de.js → skin-e56481e1.js} +1 -1
- package/esm/{skin-51029463.js → skin-eaf97827.js} +1 -1
- package/esm/{videoSelector-4dbd340e.js → videoSelector-1ac97464.js} +1 -1
- package/esm/{videoSelector-c8b6f855.js → videoSelector-7d35bbe5.js} +1 -1
- package/package.json +1 -1
- package/cjs/skin-63ae6607.js +0 -1
- package/cjs/skin-95e7a3a5.js +0 -1
- package/esm/index-ff05a97c.js +0 -1
- package/esm/skin-35ffc862.js +0 -1
package/cjs/skin-63ae6607.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("./player_instance-fcf6a8fb.js"),n=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","news"],i=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},r="http://www.w3.org/2000/svg";var o=function(t){e(document.querySelectorAll("[video-idx]")).map(function(e){var n=e.getAttribute("video-idx");e.style.border=n==t?"2px solid white":"none"})},l="",a=function(e,t){var n;if(t){var i=document.getElementById(e),r=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==r&&(t.style.height="".concat(r))}};exports.clearEventListeners=function(){window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler)},exports.closeOpenDrawers=function(){var t=e(document.getElementsByClassName("vjs-control vjs-button open"));null==t||t.map(function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()})},exports.createIconMarkup=function(e){return i(e)},exports.detectOrientationChange=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&l!==n){var r=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(r)),l=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(n),n=setTimeout(function(){i()},100)})},exports.handleDrawerResizing=function(e,n){var i,r=t.getPlayer(e),o=t.getPlayer(e).el(),l=new ResizeObserver(function(){var t;null!==(t=n.classList)&&void 0!==t&&t.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){a(e,n)},300))});l.observe(o),r.on("dispose",function(){l.disconnect()}),r.on("fullscreenchange",function(){setTimeout(function(){a(e,n)},50)})},exports.highlightVideo=function(n,i){if(i){var r,l,a=t.getPlayer(i);if(a&&"function"==typeof a.el&&null!=a&&null!==(r=a.el())&&void 0!==r&&null!==(l=r.classList)&&void 0!==l&&l.contains("skin_defaultv2"))return void o(n)}var u=e(document.querySelectorAll("[video-idx]"));console.log(u),u.map(function(e){var t=e.parentNode,i=e.getAttribute("video-idx");t.style.background=i==n?"gray":"none"})},exports.highlightVideo_DEFAULTV2_TEMP=o,exports.impolicy16x9=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},exports.injectSVG=function(e,t){if(!e)return null;e.classList.add("vjs-svg-icon");var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0 0 48 48",n=document.createElementNS(r,"svg");n.setAttribute("viewBox",t),n.setAttribute("preserveAspectRatio","xMidYMid meet");var i=document.createElementNS(r,"use");return i.setAttributeNS(null,"href",e),n.appendChild(i),{svg:n,use:i}}(t),i=n.svg,o=n.use;return e.appendChild(i),o},exports.isNotAValidSkin=function(e){return!n.includes(e)},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=i,exports.setUpdatedElHeight=a,exports.throttle=function(e,t){var n=null,i=null;return function(){for(var r=this,o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];i?(clearTimeout(n),n=setTimeout(function(){Date.now()-i>=t&&(e.apply(r,l),i=Date.now())},t-(Date.now()-i))):(e.apply(this,l),i=Date.now())}};
|
package/cjs/skin-95e7a3a5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-f264a3d3.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("./index-dfebe5a6.js"),l=require("./generic-c2b13fd4.js");require("videojs-contrib-quality-menu");var n=require("video.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/regenerator"),o=require("./icons-2609dbe4.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("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-63ae6607.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-40069678.js"),require("./util-a3ed1133.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("./captions-bf891620.js");var u={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function d(){return(d=t(a.mark(function e(i,l){var n,t,o,u,d,v;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=r.getPlayer(i),(t=n.seekable())&&t.length>0&&(o=t.start(0),u=t.end(t.length-1),d=u-o,n.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:d||0}),n.markers.initializeMarker(),v=s(l,d),n.markers.add(v));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function s(e,r){var i=(new Date).getTime(),l=new Date(i-1e3*r).getTime();return e.filter(function(e){var r=new Date(e.formatted_startdate).getTime();return r>=l&&r<=i}).map(function(e){var r=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:r/1e3}})}function v(n,t){var a=r.getPlayer(n);a&&(a.on("loadeddata",function(){var e,o,u,s,v,c,p,m,y,k=(null==t||null===(e=t.dvrConfig)||void 0===e?void 0:e.programs)||[];a.qualityLevels()&&a.qualityLevels().length&&function(e){var i=r.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(s=u.app_data)&&void 0!==s&&null!==(v=s.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play)||null!=t&&t.liveVideo||i.addNextEpPreview(n,t),null!=t&&t.liveVideo||l.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||i.initiateTrickplay(n);var g=(null==t||null===(p=t.epg)||void 0===p?void 0:p.programSubType)||"";null!=t&&null!==(m=t.dvrConfig)&&void 0!==m&&m.enable&&null!=t&&t.isDvrEnabled&&null!=t&&null!==(y=t.epg)&&void 0!==y&&y.enable&&"LIVE"===(null==g?void 0:g.toUpperCase())&&k&&k.length&&function(e,r){d.apply(this,arguments)}(n,k)}),a.one("play",function(){var r,i,l,t;null!==(r=window)&&void 0!==r&&null!==(i=r.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(n,null===(l=window)||void 0===l||null===(t=l.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}n.registerPlugin("markers",function(e){var r=n.mergeOptions(u,e),i={},l=[],t=this,a=null;function o(){l.sort(function(e,i){return r.markerTip.time(e)-r.markerTip.time(i)})}function d(e){e.forEach(function(e){t.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=n.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":r.markerTip.time(e)});return v(e,l),l.addEventListener("click",function(l){var n=!1;if("function"==typeof r.onMarkerClick&&(n=!1===r.onMarkerClick(e)),!n){var a=this.getAttribute("data-marker-key");t.currentTime(r.markerTip.time(i[a]))}}),r.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=i[e.getAttribute("data-marker-key")];a&&(r.markerTip.html?a.querySelector(".vjs-tip-inner").innerHTML=r.markerTip.html(l):a.querySelector(".vjs-tip-inner").innerText=r.markerTip.text(l),a.style.left=s(l)+"%",a.style.visibility="visible")}),e.addEventListener("mouseout",function(){a&&(a.style.visibility="hidden")})}(l),l}(e)),i[e.key]=e,l.push(e)}),o()}function s(e){return r.markerTip.time(e)/r.duration*100}function v(e,i){i.className="vjs-marker ".concat(e.class||""),Object.keys(r.markerStyle).forEach(function(e){i.style[e]=r.markerStyle[e]});var l=e.time/r.duration;(l<0||l>1)&&(i.style.display="none");var n=s(e);n>=99.5&&(n=99.5),i.style.left=n+"%"}t.markers={getMarkers:function(){return l},initializeMarker:function(){a=n.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),t.el().querySelector(".vjs-progress-holder").appendChild(a)},add:function(e){d(e)},update:function(e,i){!function(e,i){e.forEach(function(e){var l=t.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),n=r.markerTip.time(e);l?(i||l.getAttribute("data-marker-time")!==n)&&(v(e,l),l.setAttribute("data-marker-time",n)):d([e])}),o()}(e,i)}}});var c=function(e,i){var l,t,a,o,u,d,s,v,c,p,m,y,k=r.getPlayer(e),g=(null==i?void 0:i.theme)||{},b=n.dom.$(".vjs-play-progress"),f=n.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");f&&(f.style.color="".concat(null===(l=window)||void 0===l||null===(t=l.app_data)||void 0===t||null===(a=t.appcmsMain)||void 0===a||null===(o=a.brand)||void 0===o||null===(u=o.cta)||void 0===u||null===(d=u.primary)||void 0===d?void 0:d.backgroundColor)),b&&(b.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===(m=p.cta)||void 0===m||null===(y=m.primary)||void 0===y?void 0:y.backgroundColor));var h=k.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&b&&(b.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&h&&(h.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&f&&(f.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(n,t){r.getPlayer(n).addClass("skin_vlone"),v(n,t),function(r,n){var t,a,u,d,s,v,c,p,m,y,k,g,b,f,h,q=(null==n||null===(t=n.res)||void 0===t||null===(a=t.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,T=l.getSource(null==n?void 0:n.res,r)||{};T.src;var w=(null==n?void 0:n.skin_settings)||{};null!=w&&w.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"VL_ONE",o.SkipSvgV2());(null!=w&&w.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",o.RewindSvgV2());(null==n||null===(u=n.relatedVideos)||void 0===u||null===(d=u.content)||void 0===d?void 0:d.length)>0&&e.addVideoSelector(r,null==n?void 0:n.relatedVideos);null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2(r,n);(null==n||null===(v=n.streams)||void 0===v?void 0:v.length)>1&&e.addMulticamSelector(r,null==n?void 0:n.streams);if(i.addTVProviderImage(r,n),l.initialiseKeyboardEvents(r,n),"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(p=c.app_data)||void 0===p||null===(m=p.appcmsMain)||void 0===m||null===(y=m.adsConfig)||void 0===y?void 0:y.vodAdSticherProvider)&&null!==(k=window)&&void 0!==k&&null!==(g=k.app_data)&&void 0!==g&&null!==(b=g.appcmsMain)&&void 0!==b&&null!==(f=b.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking&&q){var C,j=null;if(null!=n&&null!==(C=n.series)&&void 0!==C&&C.enable){var S,B,M,E=null===(S=l.getCurrentVideo())||void 0===S||null===(B=S.video)||void 0===B||null===(M=B.gist)||void 0===M?void 0:M.id,V=l.getSeriesWatchMap(),L=(null==V?void 0:V.get(E))||{t:0,p:0},_=L.t;L.p<95&&(j=_)}else{var P=n.watchHistoryResumeTime;n.watchedPercentage<95&&(j=P)}l.setupAdvertisementMarkers(r,j)}if(null!=n&&null!==(h=n.dvrConfig)&&void 0!==h&&h.enable&&null!=n&&n.isDvrEnabled){var A,x,D=(null==n||null===(A=n.epg)||void 0===A?void 0:A.programSubType)||"";null!=n&&null!==(x=n.epg)&&void 0!==x&&x.enable?"LIVE"===(null==D?void 0:D.toUpperCase())&&(e.addStartFromBeginningButton(r,n),e.addWatchLiveButton(r,n)):(e.addStartFromBeginningButton(r,n),e.addWatchLiveButton(r,n))}}(n,t),c(n,t)};
|
package/esm/index-ff05a97c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{V as n,b as r,e as i}from"./generic-fca15610.js";import{s as a}from"./autoNextVideo-b7280cee.js";import{e as o}from"./icons-37daa6b3.js";import{p as l,t as u}from"./skin-0f689204.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(i,a){var u;if(x=!1,null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable){var s;y=[];var c=r();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(i);m.on("timeupdate",function(){var e,t;if(!x){var r=Math.floor(m.currentTime()),i=m.duration(),a=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=y)||void 0===t?void 0:t.length)-1?a&&(a.style.visibility="visible"):a&&(a.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==n()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,O,T,I;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var B=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],L=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),L.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(O=f[0])||void 0===O?void 0:O.img)||(null===(T=window)||void 0===T||null===(I=T.customData)||void 0===I?void 0:I.fallbackImage),S.onclick=function(){return E(i)}}else{var P,R,D,$,X,F,U,_,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var G=document.createElement("div");G.className="next-heading-wrapper";var V=document.createElement("div");V.className="next-ep-header",V.textContent="Next up";var W=document.createElement("div");W.className="next-ep-close",W.onclick=function(){q.style.visibility="hidden",x=!0},W.appendChild(l(o())),G.append(V),G.append(W);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(U=F.customData)||void 0===U?void 0:U.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(_=z)||void 0===_?void 0:_.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(i)},q.append(G),q.append(Y)}},E=function(e,r){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=n();a(l,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,a,o,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=g({},f,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",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",g(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(a=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(a.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(a.el()).getBoundingClientRect().left+v,i=Math.floor((s-a.el().offsetLeft)/a.width()*o),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&g(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},a.on("mousemove",l),a.on("touchmove",l),a.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},a.on("mouseout",u),a.on("touchcancel",u),a.on("touchend",u),i.on("userinactive",u)});var k="my-player";function j(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function C(){return(C=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function O(e,t){return T.apply(this,arguments)}function T(){return(T=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(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 I(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=t(k);if(i&&a){var o=i.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*a.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function B(e){return L.apply(this,arguments)}function L(){return(L=d(p.mark(function e(t){var n,r,i,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",u(function(e){return I(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return I(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,P,R,X,F,U,_,q,G,V,W,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,a=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==a?void 0:a.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),F=X[0],U=X[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),q=(_?B/_:B)/(F*U),G=L.getAttribute("id"),V=Math.round(b/q),W=Math.ceil(V/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<W;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:q,layout:P,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",G)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),ae=N.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:oe,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,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 D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function X(e){return F.apply(this,arguments)}function F(){return(F=d(p.mark(function e(n){var r,i,a,o,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(a=i.player)||void 0===a?void 0:a.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,O(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,B(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,B(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",a.append(o),r.el().appendChild(a),r.on("useractive",function(){a.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||a.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}}export{w as a,U as b,X as i};
|
package/esm/skin-35ffc862.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,d as i,e as r,o as l,p as n,q as t,r as o,s as a}from"./features-2749a5a0.js";import{g as u}from"./player_instance-34118a5b.js";import{a as d,i as s,b as v}from"./index-ff05a97c.js";import{U as p,f as m,T as c,e as f,Y as y,k}from"./generic-fca15610.js";import"videojs-contrib-quality-menu";import b from"video.js";import g from"@babel/runtime/helpers/asyncToGenerator";import h from"@babel/runtime/regenerator";import{c as T,d as j}from"./icons-37daa6b3.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"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-0f689204.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-b7280cee.js";import"./util-28923483.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-b619441b.js";var C={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function w(){return(w=g(h.mark(function e(i,r){var l,n,t,o,a,d;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=u(i),(n=l.seekable())&&n.length>0&&(t=n.start(0),o=n.end(n.length-1),a=o-t,l.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:a||0}),l.markers.initializeMarker(),d=E(r,a),l.markers.add(d));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function E(e,i){var r=(new Date).getTime(),l=new Date(r-1e3*i).getTime();return e.filter(function(e){var i=new Date(e.formatted_startdate).getTime();return i>=l&&i<=r}).map(function(e){var i=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:i/1e3}})}function M(i,r){var l=u(i);l&&(l.on("loadeddata",function(){var e,n,t,o,a,v,m,c,f,y=(null==r||null===(e=r.dvrConfig)||void 0===e?void 0:e.programs)||[];l.qualityLevels()&&l.qualityLevels().length&&function(e){var i=u(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(i),!(null!=r&&null!==(n=r.series)&&void 0!==n&&n.enable||null!==(t=window)&&void 0!==t&&null!==(o=t.app_data)&&void 0!==o&&null!==(a=o.appcmsMain)&&void 0!==a&&null!==(v=a.features)&&void 0!==v&&v.auto_play)||null!=r&&r.liveVideo||d(i,r),null!=r&&r.liveVideo||p()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||s(i);var k=(null==r||null===(m=r.epg)||void 0===m?void 0:m.programSubType)||"";null!=r&&null!==(c=r.dvrConfig)&&void 0!==c&&c.enable&&null!=r&&r.isDvrEnabled&&null!=r&&null!==(f=r.epg)&&void 0!==f&&f.enable&&"LIVE"===(null==k?void 0:k.toUpperCase())&&y&&y.length&&function(e,i){w.apply(this,arguments)}(i,y)}),l.one("play",function(){var r,l,n,t;null!==(r=window)&&void 0!==r&&null!==(l=r.customData)&&void 0!==l&&l.iframeOverlayUrl&&e(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function S(e,d){u(e).addClass("skin_vlone"),M(e,d),function(e,u){var d,s,p,b,g,h,C,w,E,M,S,B,_,L,q,A=(null==u||null===(d=u.res)||void 0===d||null===(s=d.video)||void 0===s?void 0:s.isSSAIEnabled)||!1,V=m(null==u?void 0:u.res,e)||{};V.src;var x=(null==u?void 0:u.skin_settings)||{};null!=x&&x.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&i(e,"VL_ONE",T());(null!=x&&x.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&r(e,"VL_ONE",j());(null==u||null===(p=u.relatedVideos)||void 0===p||null===(b=p.content)||void 0===b?void 0:b.length)>0&&l(e,null==u?void 0:u.relatedVideos);null!=u&&null!==(g=u.series)&&void 0!==g&&g.enable&&n(e,u);(null==u||null===(h=u.streams)||void 0===h?void 0:h.length)>1&&t(e,null==u?void 0:u.streams);if(v(e,u),c(e,u),"MEDIA_TAILOR"==(null===(C=window)||void 0===C||null===(w=C.app_data)||void 0===w||null===(E=w.appcmsMain)||void 0===E||null===(M=E.adsConfig)||void 0===M?void 0:M.vodAdSticherProvider)&&null!==(S=window)&&void 0!==S&&null!==(B=S.app_data)&&void 0!==B&&null!==(_=B.appcmsMain)&&void 0!==_&&null!==(L=_.adsConfig)&&void 0!==L&&L.vodAdClientSideTracking&&A){var D,I=null;if(null!=u&&null!==(D=u.series)&&void 0!==D&&D.enable){var O,P,R,N=null===(O=f())||void 0===O||null===(P=O.video)||void 0===P||null===(R=P.gist)||void 0===R?void 0:R.id,U=k(),z=(null==U?void 0:U.get(N))||{t:0,p:0},H=z.t;z.p<95&&(I=H)}else{var $=u.watchHistoryResumeTime;u.watchedPercentage<95&&(I=$)}y(e,I)}if(null!=u&&null!==(q=u.dvrConfig)&&void 0!==q&&q.enable&&null!=u&&u.isDvrEnabled){var G,Y,F=(null==u||null===(G=u.epg)||void 0===G?void 0:G.programSubType)||"";null!=u&&null!==(Y=u.epg)&&void 0!==Y&&Y.enable?"LIVE"===(null==F?void 0:F.toUpperCase())&&(o(e,u),a(e,u)):(o(e,u),a(e,u))}}(e,d),B(e,d)}b.registerPlugin("markers",function(e){var i=b.mergeOptions(C,e),r={},l=[],n=this,t=null;function o(){l.sort(function(e,r){return i.markerTip.time(e)-i.markerTip.time(r)})}function a(e){e.forEach(function(e){n.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=b.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":i.markerTip.time(e)});return d(e,l),l.addEventListener("click",function(l){var t=!1;if("function"==typeof i.onMarkerClick&&(t=!1===i.onMarkerClick(e)),!t){var o=this.getAttribute("data-marker-key");n.currentTime(i.markerTip.time(r[o]))}}),i.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=r[e.getAttribute("data-marker-key")];t&&(i.markerTip.html?t.querySelector(".vjs-tip-inner").innerHTML=i.markerTip.html(l):t.querySelector(".vjs-tip-inner").innerText=i.markerTip.text(l),t.style.left=u(l)+"%",t.style.visibility="visible")}),e.addEventListener("mouseout",function(){t&&(t.style.visibility="hidden")})}(l),l}(e)),r[e.key]=e,l.push(e)}),o()}function u(e){return i.markerTip.time(e)/i.duration*100}function d(e,r){r.className="vjs-marker ".concat(e.class||""),Object.keys(i.markerStyle).forEach(function(e){r.style[e]=i.markerStyle[e]});var l=e.time/i.duration;(l<0||l>1)&&(r.style.display="none");var n=u(e);n>=99.5&&(n=99.5),r.style.left=n+"%"}n.markers={getMarkers:function(){return l},initializeMarker:function(){t=b.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),n.el().querySelector(".vjs-progress-holder").appendChild(t)},add:function(e){a(e)},update:function(e,r){!function(e,r){e.forEach(function(e){var l=n.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),t=i.markerTip.time(e);l?(r||l.getAttribute("data-marker-time")!==t)&&(d(e,l),l.setAttribute("data-marker-time",t)):a([e])}),o()}(e,r)}}});var B=function(e,i){var r,l,n,t,o,a,d,s,v,p,m,c,f=u(e),y=(null==i?void 0:i.theme)||{},k=b.dom.$(".vjs-play-progress"),g=b.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(r=window)||void 0===r||null===(l=r.app_data)||void 0===l||null===(n=l.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(o=t.cta)||void 0===o||null===(a=o.primary)||void 0===a?void 0:a.backgroundColor)),k&&(k.style.background="".concat(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(v=s.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(c=m.primary)||void 0===c?void 0:c.backgroundColor));var h=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&k&&(k.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&h&&(h.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&g&&(g.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};export{S as initialiseSkin};
|