@viewlift/player-backup 2.0.288-backup → 2.0.289-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-239e6cb2.js +1 -0
- package/cjs/browser-3670a923.js +1 -0
- package/cjs/bundle.css +629 -629
- package/cjs/{caption-settings-058ad013.js → caption-settings-544fd444.js} +1 -1
- package/cjs/{captions-d98c49d6.js → captions-80f6eb66.js} +1 -1
- package/cjs/{features-d42cd8c1.js → features-402fa2e8.js} +1 -1
- package/cjs/generic-8e50d8f7.js +1 -0
- package/cjs/{index-50e69a99.js → index-0cb8083b.js} +1 -1
- package/cjs/index-95891f8d.js +1 -0
- package/cjs/index-a631eb04.js +1 -0
- package/cjs/{index-1c0aa450.js → index-c2e6adb9.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-b1a591f5.js → multicamv2-87072484.js} +1 -1
- package/cjs/{multicamv2-1af47226.js → multicamv2-885879cc.js} +1 -1
- package/cjs/{nextEpisodeButton-f6da5f9e.js → nextEpisodeButton-d77393b9.js} +1 -1
- package/cjs/playlist-27b19350.js +1 -0
- package/cjs/{renditions-6554142b.js → renditions-d28715a3.js} +1 -1
- package/cjs/{resolution-4c007d14.js → resolution-dbd4c97b.js} +1 -1
- package/cjs/{series-c6abeb2a.js → series-323f1072.js} +1 -1
- package/cjs/series-v2-4a058098.js +1 -0
- package/cjs/series-v2-e069531a.js +1 -0
- package/cjs/{settings-icon-0dcc3788.js → settings-icon-f75ddcd4.js} +1 -1
- package/cjs/{skin-a904ce92.js → skin-36e129c8.js} +1 -1
- package/{esm/skin-ae76c8c8.js → cjs/skin-3eeb0733.js} +1 -1
- package/cjs/skin-48c03068.js +1 -0
- package/cjs/{skin-0a5108bb.js → skin-52f0c898.js} +1 -1
- package/cjs/{skin-034c0b96.js → skin-683154e1.js} +1 -1
- package/cjs/skin-8c8213a1.js +1 -0
- package/cjs/skin-a76a9e3b.js +1 -0
- package/cjs/{skin-e0cf4554.js → skin-c97f0eea.js} +1 -1
- package/cjs/{skin-dfd8c833.js → skin-eba79acb.js} +1 -1
- package/cjs/skin-fd7e23c5.js +1 -0
- package/cjs/videoSelector-a23f07f5.js +1 -0
- package/cjs/videoSelector-feb0adee.js +1 -0
- package/esm/autoNextVideo-bb4fd238.js +1 -0
- package/esm/browser-de5f6a74.js +1 -0
- package/esm/bundle.css +629 -629
- package/esm/{caption-settings-a9b6581e.js → caption-settings-106547c2.js} +1 -1
- package/esm/{captions-9659ee8f.js → captions-2b4caf69.js} +1 -1
- package/esm/components/auto-next-video/autoNextVideo.d.ts +0 -1
- package/esm/components/video-selector/videoSelector.d.ts +0 -4
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +0 -4
- package/esm/components/watch-history/handleWatchHistory.d.ts +1 -0
- package/esm/{features-93f642aa.js → features-d1322f6e.js} +1 -1
- package/esm/generic-73b0e9ce.js +1 -0
- package/esm/helpers/apiErrorTracker.d.ts +1 -0
- package/esm/helpers/browser.d.ts +1 -0
- package/esm/helpers/browser.test.d.ts +1 -0
- package/esm/helpers/skin.d.ts +1 -1
- package/esm/{icons-262bef63.js → icons-699e8cf0.js} +1 -1
- package/esm/index-0d91463f.js +1 -0
- package/esm/{index-b62e0f74.js → index-7f9c8eec.js} +1 -1
- package/esm/index-b0b1390e.js +1 -0
- package/esm/{index-311464f3.js → index-f97bbc8d.js} +1 -1
- package/esm/index.d.ts +0 -6
- package/esm/index.js +1 -1
- package/esm/{multicamv2-85a146f1.js → multicamv2-06db9831.js} +1 -1
- package/esm/{multicamv2-a74f52dc.js → multicamv2-aa9f9e9d.js} +1 -1
- package/esm/{nextEpisodeButton-4d4f981f.js → nextEpisodeButton-44ed30d4.js} +1 -1
- package/esm/playlist-dbb098e7.js +1 -0
- package/esm/{renditions-4eddc06a.js → renditions-19f0b3a9.js} +1 -1
- package/esm/{resolution-5926bb20.js → resolution-8cbda37b.js} +1 -1
- package/esm/{series-a6e346df.js → series-332db2cf.js} +1 -1
- package/esm/series-v2-21b6815f.js +1 -0
- package/esm/series-v2-4f24d834.js +1 -0
- package/esm/{settings-icon-c4e124b8.js → settings-icon-d7dfe9a5.js} +1 -1
- package/esm/{skin-07c5b42b.js → skin-258fbb7f.js} +1 -1
- package/esm/skin-282322d5.js +1 -0
- package/esm/skin-3b8708b3.js +1 -0
- package/esm/skin-4f84b841.js +1 -0
- package/esm/{skin-30c770e0.js → skin-79728108.js} +1 -1
- package/esm/{skin-5fd8f1a1.js → skin-baf572ed.js} +1 -1
- package/esm/skin-c1e46b1a.js +1 -0
- package/esm/skin-d63d83ae.js +1 -0
- package/esm/{skin-132a3fbe.js → skin-d99946df.js} +1 -1
- package/esm/skin-e32ff970.js +1 -0
- package/esm/videoSelector-389fa889.js +1 -0
- package/esm/videoSelector-f5336468.js +1 -0
- package/package.json +4 -1
- package/cjs/autoNextVideo-6cab8d20.js +0 -1
- package/cjs/browser-77c57718.js +0 -1
- package/cjs/features-f7498f6e.js +0 -1
- package/cjs/generic-9239e4ef.js +0 -1
- package/cjs/index-5daec8dc.js +0 -1
- package/cjs/index-63575bc4.js +0 -1
- package/cjs/index-add7cff5.js +0 -1
- package/cjs/index-ce95deae.js +0 -1
- package/cjs/index-ff74dc4f.js +0 -1
- package/cjs/playlist-25247b47.js +0 -1
- package/cjs/relatedVideosManager-88017db2.js +0 -1
- package/cjs/relatedVideosManager-eeeaf32c.js +0 -1
- package/cjs/series-v2-370da4d6.js +0 -1
- package/cjs/series-v2-a347f3f7.js +0 -1
- package/cjs/skin-15813134.js +0 -1
- package/cjs/skin-35bae058.js +0 -1
- package/cjs/skin-47343a57.js +0 -1
- package/cjs/skin-56d77491.js +0 -1
- package/cjs/skin-5d92ab3f.js +0 -1
- package/cjs/skin-71dbfc33.js +0 -1
- package/cjs/skin-7556b856.js +0 -1
- package/cjs/skin-83a765a8.js +0 -1
- package/cjs/skin-89ad761c.js +0 -1
- package/cjs/skin-a25a2457.js +0 -1
- package/cjs/skin-cebece82.js +0 -1
- package/cjs/skin-dd9ff331.js +0 -1
- package/cjs/skin-ed8bad19.js +0 -1
- package/cjs/skin-f26ba21b.js +0 -1
- package/cjs/skin-f3a5fe3d.js +0 -1
- package/cjs/skin-f70eedce.js +0 -1
- package/cjs/skin-fa940389.js +0 -1
- package/cjs/util-9e6f986e.js +0 -1
- package/cjs/videoSelector-24f40272.js +0 -1
- package/cjs/videoSelector-d96b4516.js +0 -1
- package/cjs/videoSelector-f49496de.js +0 -1
- package/cjs/videoSelector-fac5fff5.js +0 -1
- package/esm/autoNextVideo-be06e737.js +0 -1
- package/esm/browser-d4613b36.js +0 -1
- package/esm/features-4a5d71b3.js +0 -1
- package/esm/generic-5fc25fa4.js +0 -1
- package/esm/index-10a24e6e.js +0 -1
- package/esm/index-32ca07d6.js +0 -1
- package/esm/index-4e64ac09.js +0 -1
- package/esm/index-c9e6b4b1.js +0 -1
- package/esm/index-d83589e3.js +0 -1
- package/esm/playlist-de8dcaf0.js +0 -1
- package/esm/relatedVideosManager-33634c11.js +0 -1
- package/esm/relatedVideosManager-8dd9aa24.js +0 -1
- package/esm/series-v2-58f8f89a.js +0 -1
- package/esm/series-v2-8e6a3475.js +0 -1
- package/esm/skin-0b038d52.js +0 -1
- package/esm/skin-4312bdbe.js +0 -1
- package/esm/skin-4f5a0ac7.js +0 -1
- package/esm/skin-5aa3c707.js +0 -1
- package/esm/skin-80a68255.js +0 -1
- package/esm/skin-876554ba.js +0 -1
- package/esm/skin-882d6b96.js +0 -1
- package/esm/skin-900c1bca.js +0 -1
- package/esm/skin-97dd73c4.js +0 -1
- package/esm/skin-9921582e.js +0 -1
- package/esm/skin-ab1ca6e2.js +0 -1
- package/esm/skin-bc21a783.js +0 -1
- package/esm/skin-c081d535.js +0 -1
- package/esm/skin-d8398bf5.js +0 -1
- package/esm/skin-dbb8c692.js +0 -1
- package/esm/skin-e2592aa4.js +0 -1
- package/esm/skin-fdc5aef1.js +0 -1
- package/esm/util-8d51abc3.js +0 -1
- package/esm/utilities/relatedVideosManager.d.ts +0 -11
- package/esm/videoSelector-11ca5611.js +0 -1
- package/esm/videoSelector-38875a2f.js +0 -1
- package/esm/videoSelector-65842ebe.js +0 -1
- package/esm/videoSelector-6ca1f79b.js +0 -1
package/esm/skin-dbb8c692.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,r as i,d as e,e as n,j as o,k as t,l as r,m as s}from"./features-4a5d71b3.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-e2592aa4.js";import{g as C}from"./renditions-4eddc06a.js";import{a as c,b as p}from"./index-4e64ac09.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{r as h}from"./relatedVideosManager-33634c11.js";import{a1 as m,a2 as f,e as g,a3 as b,m as L}from"./generic-5fc25fa4.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"./autoNextVideo-be06e737.js";import"./util-8d51abc3.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-9659ee8f.js";import"@viewlift/comscore/index.js";function B(B,y){d(B).addClass("skin_news_live"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,r,s,a,d,u,v,p;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||m)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe(function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(i,e),f&&f())})}}else c(i,e)})}(B,y),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,g,b,L,B,y,j,w,E,V,x,M,k,S,T,Z,A,P,_=d(l);null===(e=_.controlBar)||void 0===e||e.removeChild("PlayToggle");var H=null==_||null===(n=_.controlBar)||void 0===n||null===(o=n.el())||void 0===o||null===(t=o.children)||void 0===t?void 0:t[2],N=document.createElement("div");N.className="vjs-play-toggle-container",N.append(null==_||null===(r=_.controlBar)||void 0===r||null===(s=r.addChild("PlayToggle"))||void 0===s?void 0:s.el()),null==_||null===(a=_.controlBar)||void 0===a||null===(C=a.el())||void 0===C||C.insertBefore(N,H),null==_||null===(c=_.controlBar)||void 0===c||c.removeChild("VolumePanel"),null==_||null===(p=_.controlBar)||void 0===p||p.addChild("VolumePanel",{inline:!0},1);var I=null==_||null===(h=_.controlBar)||void 0===h?void 0:h.getChild("ProgressControl");null===(m=_.controlBar)||void 0===m||m.removeChild("SeekToLive"),null===(f=_.controlBar)||void 0===f||f.addChild("SeekToLive",{inline:!1},2);var q=null===(g=_.controlBar)||void 0===g||null===(b=g.getChild("SeekToLive"))||void 0===b?void 0:b.el();q&&(q.onclick=function(){if(_.paused())try{_.play()}catch(l){console.log(l)}});var O=document.createElement("div");O.className="custom-spaced-progress-bar",I&&O.append(I.el());null===(L=_.controlBar)||void 0===L||null===(B=L.el())||void 0===B||B.append(O);var R='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';_.el().insertBefore(u(R),null!==(y=_.el().firstChild)&&void 0!==y?y:null);var D=(null==_||null===(j=_.controlBar)||void 0===j||null===(w=j.getChild("PlayToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(D){D.style.height="18px",D.style.width="18px";var F=v(D,_.paused()?"#vjs-icon-play":"#vjs-icon-pause");_.on("pause",function(){return F.setAttributeNS(null,"href","#vjs-icon-play")}),_.on("play",function(){return F.setAttributeNS(null,"href","#vjs-icon-pause")})}var G=(null==_||null===(V=_.controlBar)||void 0===V||null===(x=V.getChild("FullscreenToggle"))||void 0===x||null===(M=x.el())||void 0===M?void 0:M.firstChild)||null;if(G){G.style.height="24px",G.style.width="24px";var z=v(G,"#vjs-icon-fullscreen");_.on("fullscreenchange",function(){var l=_.isFullscreen_;null==z||z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var J=(null==_||null===(k=_.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(J){var K=J.querySelector(".vjs-mute-control .vjs-icon-placeholder");K.classList.add("vjs-svg-icon"),K.style.height="24px",K.style.width="24px";var Q=v(K,_.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");_.on("volumechange",function(l){var i=_.volume();console.log(i,_.muted()),0==i||_.muted()?Q.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?Q.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?Q.setAttributeNS(null,"href","#vjs-icon-volume2"):Q.setAttributeNS(null,"href","#vjs-icon-volume3")})}var U=(null==_||null===(T=_.controlBar)||void 0===T||null===(Z=T.getChild("PictureInPictureToggle"))||void 0===Z?void 0:Z.el())||null;if(U){var W=null==U?void 0:U.querySelector(".vjs-icon-placeholder");W.style.height="25px",W.style.width="25px";var X=v(W,"#vjs-icon-pip");_.on("enterpictureinpicture",function(){X.setAttributeNS(null,"href","#vjs-icon-pip")})}var Y=(null==_||null===(A=_.controlBar)||void 0===A||null===(P=A.getChild("SubsCapsButton"))||void 0===P?void 0:P.el())||null;if(Y){var $=Y.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");$.classList.add("vjs-svg-icon"),$.style.height="29px",$.style.width="29px";var ll=v($,"#vjs-icon-caps");ll.setAttributeNS(null,"href","#vjs-icon-captions-off"),_.textTracks().on("change",function(l){for(var i=_.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?ll.setAttributeNS(null,"href","#vjs-icon-captions"):ll.setAttributeNS(null,"href","#vjs-icon-captions-off")})}_&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(_.liveTracker.on("liveedgechange",function(){nl(_)}),_.on("timeupdate",function(){nl(_)}));function il(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function el(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function nl(l){var i,e,n=l.liveTracker.atLiveEdge(),o=el(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=il(o)))}}}(B,y),function(l,u){var v,C,c,p,B,y,j,w,E,V=(null==u?void 0:u.liveVideo)||!1,x=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",M=(null==u||null===(C=u.res)||void 0===C||null===(c=C[x])||void 0===c?void 0:c.isSSAIEnabled)||!1,k=(null==u?void 0:u.skin_settings)||{};null==k||k.slowMoBtn;var S=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};i(l),null!=k&&k.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=k&&k.rewindBtn&&(0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&n(l,"VL_ONE",a());var T,Z=h.get();(null==Z||null===(B=Z.content)||void 0===B?void 0:B.length)>0&&o(l,Z);T=h.subscribe(function(i){var e,n,t=d(l);(null==t||null===(e=t.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(o(l,i),T&&T())}),(null==u||null===(y=u.streams)||void 0===y?void 0:y.length)>1&&t(l,null==u?void 0:u.streams);(null==u||null===(j=u.playlist)||void 0===j||null===(w=j.content)||void 0===w?void 0:w.length)>0&&r(l,null==u?void 0:u.playlist);null!=u&&null!==(E=u.series)&&void 0!==E&&E.enable&&s(l,u);if(M&&V&&"TRANSMIT"==(null==S?void 0:S.liveAdSticherProvider)&&null!=S&&S.liveAdClientSideTracking)m(l,u);else if("MEDIA_TAILOR"==(null==S?void 0:S.vodAdSticherProvider)&&null!=S&&S.vodAdClientSideTracking&&M)if(V)f(l);else{var A,P=null;if(null!=u&&null!==(A=u.series)&&void 0!==A&&A.enable){var _,H,N,I,q,O=null===(_=g())||void 0===_||null===(H=_.video)||void 0===H||null===(N=H.gist)||void 0===N?void 0:N.id,R=L(),D=(null==R?void 0:R.get(O))||{t:0,p:0},F=D.t,G=D.p;"function"==typeof(null===(I=window)||void 0===I||null===(q=I.watchHistory)||void 0===q?void 0:q.cb)&&window.watchHistory.cb({watchedTime:F}),G<95&&(P=F)}else{var z=u.watchHistoryResumeTime;u.watchedPercentage<95&&(P=z)}b(l,P)}}(B,y),p(B,y)}export{B as initialiseSkin};
|
package/esm/skin-e2592aa4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import n from"video.js";var t=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},i=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","news","mini","news_live"],o=function(e){return!i.includes(e)},r=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},l=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},a="http://www.w3.org/2000/svg";function u(e,n){if(!e)return null;e.classList.add("vjs-svg-icon");var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0 0 48 48",t=document.createElementNS(a,"svg");t.setAttribute("viewBox",n),t.setAttribute("preserveAspectRatio","xMidYMid meet");var i=document.createElementNS(a,"use");return i.setAttributeNS(null,"href",e),t.appendChild(i),{svg:t,use:i}}(n),i=t.svg,o=t.use;return e.appendChild(i),o}var d=function(e){return l(e)},s=function(n,i){if(i){var o,r,l=t(i);if(l&&"function"==typeof l.el&&null!=l&&null!==(o=l.el())&&void 0!==o&&null!==(r=o.classList)&&void 0!==r&&r.contains("skin_defaultv2"))return void c(n)}var a=e(document.querySelectorAll("[video-idx]"));console.log(a),a.map(function(e){var t=e.parentNode,i=e.getAttribute("video-idx");t.style.background=i==n?"gray":"none"})},c=function(n){e(document.querySelectorAll("[video-idx]")).map(function(e){var t=e.getAttribute("video-idx");e.style.border=t==n?"2px solid white":"none"})},v=function(){var n=e(document.getElementsByClassName("vjs-control vjs-button open"));null==n||n.map(function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()})},m=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":e},w="",f=function(e,n){var t,i=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&w!==t){var o=window.getComputedStyle(i,null).getPropertyValue("height");n&&(n.style.height="".concat(o)),w=t}}(e,n)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){i()},100)})},p=function(e,n){var i,o=t(e),r=t(e).el(),l=new ResizeObserver(function(){var t;null!==(t=n.classList)&&void 0!==t&&t.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){g(e,n)},300))});l.observe(r),o.on("dispose",function(){l.disconnect()}),o.on("fullscreenchange",function(){setTimeout(function(){g(e,n)},50)})},g=function(e,n){var t;if(n){var i=document.getElementById(e),o=null===(t=window.getComputedStyle(i,null))||void 0===t?void 0:t.height;n.style.height!==o&&(n.style.height="".concat(o))}},h=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)};function y(e,n){var t=null,i=null;return function(){for(var o=this,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];i?(clearTimeout(t),t=setTimeout(function(){Date.now()-i>=n&&(e.apply(o,l),i=Date.now())},n-(Date.now()-i))):(e.apply(this,l),i=Date.now())}}var b=function(e,n){var t;return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];var l=this;clearTimeout(t),t=setTimeout(function(){e.apply(l,o)},n)}};export{o as a,d as b,h as c,b as d,u as e,r as f,t as g,s as h,m as i,v as j,f as k,p as l,c as m,l as p,g as s,y as t};
|
package/esm/skin-fdc5aef1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-93f642aa.js";import{M as u,a as v,c as m,d as p}from"./icons-262bef63.js";import{g as c,b as h}from"./skin-e2592aa4.js";import{g as f}from"./renditions-4eddc06a.js";import{g as b}from"./captions-9659ee8f.js";import{a as g,b as C}from"./index-32ca07d6.js";import{i as j}from"./index-10a24e6e.js";import{i as y,d as w}from"./browser-d4613b36.js";import{r as V}from"./relatedVideosManager-8dd9aa24.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"./generic-5fc25fa4.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-be06e737.js";import"./util-8d51abc3.js";function B(B,k){c(B).addClass("skin_defaultv2"),function(){"Chrome"==w()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-46def1ff.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,t,r,a,d,s,u,v,m,p;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n);var c=(null===(r=V.get())||void 0===r||null===(a=r.content)||void 0===a?void 0:a.length)>0;if(!(null!=n&&null!==(d=n.series)&&void 0!==d&&d.enable||null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(v=u.appcmsMain)&&void 0!==v&&null!==(m=v.features)&&void 0!==m&&m.auto_play||c)||null!=n&&n.liveVideo){if(!(null!=n&&n.liveVideo||null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable)){var h;h=V.subscribe(function(l){var e;(null==l||null===(e=l.content)||void 0===e?void 0:e.length)>0&&(g(i,n),h&&h())})}}else g(i,n);null!=n&&n.liveVideo||y()||j(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(B,k),function(l,e){var o,i,n,t,r,a,d,s,m,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),w=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",j&&y&&w&&V.append(j.el(),y.el(),w.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(V),null==C||null===(s=C.controlBar)||void 0===s||null===(m=s.getChild("FullscreenToggle"))||void 0===m||null===(p=m.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(v(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(B,k),function(l,e){var o,u,v,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",m());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);var C,j=V.get();(null==j||null===(o=j.content)||void 0===o?void 0:o.length)>0&&r(l,j);C=V.subscribe(function(e){var o,i,n=c(l);(null==n||null===(o=n.controlBar)||void 0===o||!o.getChild("videoSelector"))&&(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(r(l,e),C&&C())}),(null==e||null===(u=e.streams)||void 0===u?void 0:u.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(v=e.playlist)||void 0===v||null===(h=v.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(B,k),C(B,k)}export{B as initialiseSkin};
|
package/esm/util-8d51abc3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import n from"@babel/runtime/helpers/typeof";import{e,v as t,Y as o}from"./generic-5fc25fa4.js";import{g as i}from"./skin-e2592aa4.js";var a=!1,r=function(n,e,t){var o=i(n);o?e>=0&&e<=o.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(e)}),o.currentTime(e)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(n,"'"))},c=function(n,e){var t=i(n);if(!t)return"Cannot find player with id: '".concat(n,"'");try{return t.playbackRate(e),"Playback speed set to ".concat(e,"x")}catch(n){return"Error: ".concat(n)}},u=function(n,r){var c=i(n);c?(c.on("ended",function(){return a=!0}),c.on("timeupdate",function(){if(!c.paused()&&a){var n,i,u=null===(n=e())||void 0===n||null===(i=n.video)||void 0===i?void 0:i.id;t.get(u)?(t.clear(),o.clear(),r(),t.set(u)):(t.clear(),t.set(u)),a=!1}})):r("Cannot find player with id: '".concat(n,"'"))},l=function(n,e){var t=i(n);t?t.on("timeupdate",function(){return e(t.currentTime())}):e("Cannot find player with id: '".concat(n,"'"))},s=function(n,e){var t=i(n);t?t.on("ended",function(){return e(!0)}):e("Cannot find player with id: '".concat(n,"'"))},d=function(n){var e=i(n);return e?e.duration():"Cannot find player with id: '".concat(n,"'")};function f(){var e=function(n,e){var t=i(n);if(!t)throw"Cannot find player with id: '".concat(n,"'");if("function"!=typeof e)throw"Callback function (cb) is missing or not a function";return t};return{onPlay:function(n,t){e(n,t).on("play",function(){return t()})},onPause:function(n,t){e(n,t).on("pause",function(){return t()})},onMute:function(n,t){var o=e(n,t);o.on("volumechange",function(){o.muted()?t({muted:!0}):t({muted:!1})})},onPictureInPictureChange:function(n,t){var o=e(n,t);o.on("enterpictureinpicture",function(){t({pip:!0})}),o.on("leavepictureinpicture",function(){t({pip:!1})})},onFullScreenChange:function(n,t){var o=e(n,t);o.on("fullscreenchange",function(n){o.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})})},onSetVolume:function(n,t){var o=e(n,t);o.on("volumechange",function(){var n=100*o.volume().toFixed(2);o.muted()?t({vol:0}):t({vol:n})})},onSeeked:function(n,t){var o=e(n,t);o.on("seeked",function(){t({seeked:o.currentTime()})})},onSubtitleEnable:function(n,t){var o=e(n,t);o.textTracks().on("change",function(n){console.log(o.textTracks());var e=o.textTracks().tracks_.filter(function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode});e.length>0&&t({enabled:e[0]})})},onDisableSubtitles:function(n,t){var o=e(n,t);o.textTracks().on("change",function(n){var e,i;console.log(o.textTracks()),(null==o||null===(e=o.textTracks())||void 0===e||null===(i=e.tracks_)||void 0===i?void 0:i.every(function(n){return"showing"!=n.mode}))&&t({captions_disabled:!0})})},onSubtitleCueChange:function(t,o){var i=e(t,o);i.on("loadeddata",function(){var e,t,a,r,c,u=i.textTracks();"object"==n(i.dash)&&null!=i.dash&&i.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(a=t.dashjs)||void 0===a||null===(r=a.MediaPlayer)||void 0===r||null===(c=r.events)||void 0===c?void 0:c.CAPTION_RENDERED,function(n){o(n)});for(var l=0;l<u.length;l++){var s=u[l];"metadata"===s.kind&&(s.mode="hidden",e=s)}e&&e.addEventListener("cuechange",function(){var n=e.activeCues;if(n&&n.length>0)for(var t=0;t<n.length;t++){var i=n[t];o(i)}else console.log("no active cue at this moment")})})},onError:function(n,t){var o=e(n,t);o.on("error",function(){var n,e;t({error:null==o||null===(n=o.error())||void 0===n?void 0:n.code,msg:null==o||null===(e=o.error())||void 0===e?void 0:e.message})})}}}export{s as a,c as b,u as c,d as g,l as o,f as p,r as s};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export namespace relatedVideosManager {
|
|
2
|
-
export { set };
|
|
3
|
-
export { get };
|
|
4
|
-
export { reset };
|
|
5
|
-
export { subscribe };
|
|
6
|
-
}
|
|
7
|
-
declare function set(videos: any): void;
|
|
8
|
-
declare function get(): any;
|
|
9
|
-
declare function reset(): void;
|
|
10
|
-
declare function subscribe(fn: any): () => void;
|
|
11
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as d,g as s}from"./icons-262bef63.js";import{M as r,a0 as c}from"./generic-5fc25fa4.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-e2592aa4.js";import{a as y,u as f}from"./autoNextVideo-be06e737.js";import{g as C}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-33634c11.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-9659ee8f.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-8d51abc3.js";function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(j,I);var N,k,x=(N=j,k=E(),function(){var e,t=l(N);if(k){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function j(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=x.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,f(i.videos),i._refreshList()}),i}return t(j,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,d,s,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(r=s.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(j,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:C("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(b);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,y),a.dom.appendContent(r,p),a.dom.appendContent(d,r)},u=0;u<this.videos.length;u++)c(u);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),b(this.playerId,e)}}]),j}();export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{M as s,a0 as c}from"./generic-5fc25fa4.js";import{m,j as u,s as v,k as p,l as h}from"./skin-e2592aa4.js";import{a as f,u as b}from"./autoNextVideo-be06e737.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-33634c11.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-9659ee8f.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-8d51abc3.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var N=l.getComponent("Component"),E=function(){i(I,N);var E,k,j=(E=I,k=C(),function(){var e,t=a(E);if(k){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function I(t){var o,i,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(n=j.call(this,t,a)).playerId=a.playerId,n.seriesData=a.sres,n.videos=a.related.content,n.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,n.autoNext=(null==a||null===(i=a.related)||void 0===i?void 0:i.autoNext)||!1,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.autoNext&&(c(0),f({playerId:n.playerId,content:n.videos,cb:n.cb})),n._unsubRelated=g.subscribe(function(e){var t;n.videos=(null==e?void 0:e.content)||n.videos,n.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:n.cb,b(n.videos),n._refreshList()}),n}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,i,n,a,r=this,d=l.dom.createEl("div",{className:"video -".concat(e)}),u=l.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=l.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),s(r.playerId,r.videos[e].id).then(function(e){r.cb&&r.cb(e)}).catch(function(e){r.cb&&r.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n?void 0:n.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var p=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return l.dom.appendContent(d,u),l.dom.appendContent(d,p),d}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){l.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)l.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,i,n){var l=o(a(1&n?e.prototype:e),t,i);return 2&n&&"function"==typeof l?function(e){return l.apply(i,e)}:l}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=o.classList)&&void 0!==i&&i.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var n=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(n),l.dom.appendContent(t,o),i.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),i=l.dom.createEl("div",{className:"video-selector-head"}),n=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=l.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),r=l.dom.createEl("div",{className:"video-selector-content"}),u=l.dom.createEl("div",{className:"video-container"}),v=function(e){var o,i,n,a,d,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){c(e+1);for(var o=l.dom.$$(".recommended"),i=0;i<o.length;i++)o[i].style.border="none";m(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.img)||(null===(n=window)||void 0===n||null===(a=n.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});l.dom.appendContent(v,p),l.dom.appendContent(v,f),l.dom.appendContent(u,v),l.dom.appendContent(r,u)},p=0;p<this.videos.length;p++)v(p);l.dom.appendContent(i,n),l.dom.appendContent(i,a),l.dom.appendContent(e,i),l.dom.appendContent(e,r),h(this.playerId,e)}}]),I}();export{E as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as d,g as s}from"./icons-262bef63.js";import{M as r,a0 as c}from"./generic-5fc25fa4.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-e2592aa4.js";import{a as y,u as f}from"./autoNextVideo-be06e737.js";import{g as C}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-8dd9aa24.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-9659ee8f.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-8d51abc3.js";function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(j,I);var N,k,x=(N=j,k=E(),function(){var e,t=l(N);if(k){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function j(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=x.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,f(i.videos),i._refreshList()}),i}return t(j,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,d,s,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(r=s.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(j,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:C("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(b);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,y),a.dom.appendContent(r,p),a.dom.appendContent(d,r)},u=0;u<this.videos.length;u++)c(u);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),b(this.playerId,e)}}]),j}();export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{M as s,a0 as c}from"./generic-5fc25fa4.js";import{m,j as u,s as v,k as p,l as h}from"./skin-e2592aa4.js";import{a as f,u as b}from"./autoNextVideo-be06e737.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-8dd9aa24.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-9659ee8f.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-8d51abc3.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var N=l.getComponent("Component"),E=function(){i(I,N);var E,k,j=(E=I,k=C(),function(){var e,t=a(E);if(k){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function I(t){var o,i,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(n=j.call(this,t,a)).playerId=a.playerId,n.seriesData=a.sres,n.videos=a.related.content,n.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,n.autoNext=(null==a||null===(i=a.related)||void 0===i?void 0:i.autoNext)||!1,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.autoNext&&(c(0),f({playerId:n.playerId,content:n.videos,cb:n.cb})),n._unsubRelated=g.subscribe(function(e){var t;n.videos=(null==e?void 0:e.content)||n.videos,n.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:n.cb,b(n.videos),n._refreshList()}),n}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,i,n,a,r=this,d=l.dom.createEl("div",{className:"video -".concat(e)}),u=l.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=l.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),s(r.playerId,r.videos[e].id).then(function(e){r.cb&&r.cb(e)}).catch(function(e){r.cb&&r.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n?void 0:n.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var p=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return l.dom.appendContent(d,u),l.dom.appendContent(d,p),d}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){l.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)l.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,i,n){var l=o(a(1&n?e.prototype:e),t,i);return 2&n&&"function"==typeof l?function(e){return l.apply(i,e)}:l}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=o.classList)&&void 0!==i&&i.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var n=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(n),l.dom.appendContent(t,o),i.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),i=l.dom.createEl("div",{className:"video-selector-head"}),n=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=l.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),r=l.dom.createEl("div",{className:"video-selector-content"}),u=l.dom.createEl("div",{className:"video-container"}),v=function(e){var o,i,n,a,d,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){c(e+1);for(var o=l.dom.$$(".recommended"),i=0;i<o.length;i++)o[i].style.border="none";m(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.img)||(null===(n=window)||void 0===n||null===(a=n.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});l.dom.appendContent(v,p),l.dom.appendContent(v,f),l.dom.appendContent(u,v),l.dom.appendContent(r,u)},p=0;p<this.videos.length;p++)v(p);l.dom.appendContent(i,n),l.dom.appendContent(i,a),l.dom.appendContent(e,i),l.dom.appendContent(e,r),h(this.playerId,e)}}]),I}();export{E as default};
|