@viewlift/player-backup 2.0.361-backup → 2.0.363-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/_commonjsHelpers-81c4d214.js +1 -0
- package/cjs/{autoNextVideo-2338f72b.js → autoNextVideo-b57fd94e.js} +1 -1
- package/cjs/browser-ab1ec3ab.js +1 -0
- package/cjs/bundle.css +909 -903
- package/cjs/caption-settings-50cfa585.js +1 -0
- package/cjs/captions-23ff3076.js +1 -0
- package/cjs/features-84532cac.js +1 -0
- package/cjs/generic-ca18a946.js +1 -0
- package/cjs/index-27a62060.js +1 -0
- package/cjs/index-62250ea0.js +1 -0
- package/cjs/index-66e473f7.js +1 -0
- package/cjs/index-91ceac93.js +1 -0
- package/cjs/index-d28c1d04.js +1 -0
- package/cjs/index-d9460e79.js +1 -0
- package/cjs/index-ee9cb57f.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-96472b7c.js +1 -0
- package/cjs/multicamv2-a3b15f57.js +1 -0
- package/cjs/nextEpisodeButton-0e7c699e.js +1 -0
- package/cjs/playlist-6dbaae47.js +1 -0
- package/cjs/relatedVideosManager-44ec6d59.js +1 -0
- package/cjs/renditions-05a85e06.js +1 -0
- package/cjs/resolution-059a4468.js +1 -0
- package/cjs/series-3754d0a9.js +1 -0
- package/cjs/series-v2-00ad95c3.js +1 -0
- package/cjs/series-v2-faf6c719.js +1 -0
- package/cjs/settings-icon-81e0bc78.js +1 -0
- package/cjs/skin-0220bbd7.js +1 -0
- package/cjs/skin-13c66191.js +1 -0
- package/cjs/skin-2b08e648.js +1 -0
- package/cjs/skin-55634dc6.js +1 -0
- package/cjs/skin-5e92eba9.js +1 -0
- package/cjs/skin-5f049521.js +1 -0
- package/cjs/skin-65a80a93.js +1 -0
- package/cjs/skin-8111bf49.js +1 -0
- package/cjs/skin-c211c3a9.js +1 -0
- package/cjs/skin-e3d5c1a7.js +1 -0
- package/cjs/{skin-56aa6df7.js → skin-eecb289d.js} +1 -1
- package/cjs/videoSelector-0bd954a8.js +1 -0
- package/cjs/videoSelector-99835c7d.js +1 -0
- package/cjs/videojs-dash5.es-0f92604f.js +1 -0
- package/esm/_commonjsHelpers-0307ea52.js +1 -0
- package/esm/{autoNextVideo-c38d98be.js → autoNextVideo-ca468d20.js} +1 -1
- package/esm/browser-8ea05bed.js +1 -0
- package/esm/bundle.css +909 -903
- package/esm/caption-settings-d0e2275a.js +1 -0
- package/esm/captions-4dea3682.js +1 -0
- package/esm/features-0d4290a8.js +1 -0
- package/esm/generic-6c14b09e.js +1 -0
- package/esm/index-23afe568.js +1 -0
- package/esm/index-4be0bb5b.js +1 -0
- package/esm/index-8b7ad7a7.js +1 -0
- package/esm/index-c276e2a6.js +1 -0
- package/esm/index-c4656b30.js +1 -0
- package/esm/index-e096af23.js +1 -0
- package/esm/index-eded6cb0.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-63047664.js +1 -0
- package/esm/multicamv2-7b8465e8.js +1 -0
- package/esm/nextEpisodeButton-a3ed5cde.js +1 -0
- package/esm/playlist-41378efa.js +1 -0
- package/esm/relatedVideosManager-93533a90.js +1 -0
- package/esm/remote/airplay/src/js/components/AirPlayButton.d.ts +2 -0
- package/esm/remote/airplay/src/js/enableAirPlay.d.ts +2 -0
- package/esm/remote/airplay/src/js/index.d.ts +2 -0
- package/esm/remote/airplay/src/js/lib/hasAirPlayAPISupport.d.ts +2 -0
- package/esm/remote/chromecast/src/js/chromecast/ChromecastSessionManager.d.ts +168 -0
- package/esm/remote/chromecast/src/js/components/ChromecastButton.d.ts +2 -0
- package/esm/remote/chromecast/src/js/enableChromecast.d.ts +2 -0
- package/esm/remote/chromecast/src/js/index.d.ts +2 -0
- package/esm/remote/chromecast/src/js/preloadWebComponents.d.ts +2 -0
- package/esm/remote/chromecast/src/js/tech/ChromecastTech.d.ts +2 -0
- package/esm/remote/chromecast/src/js/tech/ChromecastTechUI.d.ts +92 -0
- package/esm/renditions-28891b91.js +1 -0
- package/esm/resolution-ce4463bf.js +1 -0
- package/esm/series-b9736092.js +1 -0
- package/esm/series-v2-1d1e574d.js +1 -0
- package/esm/series-v2-768b237e.js +1 -0
- package/esm/settings-icon-8eaa7cc6.js +1 -0
- package/esm/skin-012028ab.js +1 -0
- package/esm/skin-05244e25.js +1 -0
- package/esm/skin-2a3ee818.js +1 -0
- package/esm/skin-30bed6f1.js +1 -0
- package/esm/skin-322d12ce.js +1 -0
- package/esm/skin-35b6305b.js +1 -0
- package/esm/{skin-ed2760bd.js → skin-5bafce20.js} +1 -1
- package/esm/skin-5dd350fb.js +1 -0
- package/esm/{skin-9b0258ae.js → skin-62c1d140.js} +1 -1
- package/esm/skin-9126d695.js +1 -0
- package/esm/skin-eb02f212.js +1 -0
- package/esm/{apis → src/apis}/index.d.ts +4 -4
- package/esm/{helpers → src/helpers}/token.d.ts +1 -1
- package/esm/{index.d.ts → src/index.d.ts} +1 -1
- package/esm/videoSelector-323e9112.js +1 -0
- package/esm/videoSelector-f3f07a76.js +1 -0
- package/esm/videojs-dash5.es-cfe95daa.js +1 -0
- package/package.json +10 -3
- package/cjs/browser-2807cc02.js +0 -1
- package/cjs/caption-settings-0d09a023.js +0 -1
- package/cjs/captions-4dfe293a.js +0 -1
- package/cjs/features-4822f920.js +0 -1
- package/cjs/generic-131b4d00.js +0 -1
- package/cjs/index-1347427d.js +0 -1
- package/cjs/index-58f88daa.js +0 -1
- package/cjs/index-8a058c51.js +0 -1
- package/cjs/index-94207847.js +0 -1
- package/cjs/index-e7cab57c.js +0 -1
- package/cjs/multicamv2-0e42db7a.js +0 -1
- package/cjs/multicamv2-5245f838.js +0 -1
- package/cjs/nextEpisodeButton-8a55766c.js +0 -1
- package/cjs/playlist-38eb1cb2.js +0 -1
- package/cjs/relatedVideosManager-0a220d05.js +0 -1
- package/cjs/renditions-627bdfad.js +0 -1
- package/cjs/resolution-687b9e26.js +0 -1
- package/cjs/series-d0c8930b.js +0 -1
- package/cjs/series-v2-0af081f5.js +0 -1
- package/cjs/series-v2-2b05e313.js +0 -1
- package/cjs/settings-icon-e94f47c1.js +0 -1
- package/cjs/skin-01291260.js +0 -1
- package/cjs/skin-0fafe807.js +0 -1
- package/cjs/skin-357cefed.js +0 -1
- package/cjs/skin-38523520.js +0 -1
- package/cjs/skin-4b068624.js +0 -1
- package/cjs/skin-66dce245.js +0 -1
- package/cjs/skin-75847791.js +0 -1
- package/cjs/skin-7d9d70d6.js +0 -1
- package/cjs/skin-8cf6ef56.js +0 -1
- package/cjs/skin-ff2b5b51.js +0 -1
- package/cjs/videoSelector-98193563.js +0 -1
- package/cjs/videoSelector-b237b11b.js +0 -1
- package/cjs/videojs-dash5.es-80bdd597.js +0 -1
- package/esm/browser-05efadfa.js +0 -1
- package/esm/caption-settings-e1a53633.js +0 -1
- package/esm/captions-1f931e14.js +0 -1
- package/esm/features-61f6f35b.js +0 -1
- package/esm/generic-6c20b38b.js +0 -1
- package/esm/index-85c4eeac.js +0 -1
- package/esm/index-9fb4d0bf.js +0 -1
- package/esm/index-a1c20dd9.js +0 -1
- package/esm/index-ae6b4732.js +0 -1
- package/esm/index-cd110bd0.js +0 -1
- package/esm/multicamv2-15e9b2f4.js +0 -1
- package/esm/multicamv2-c2c03192.js +0 -1
- package/esm/nextEpisodeButton-4c0b9754.js +0 -1
- package/esm/playlist-eb4ed43d.js +0 -1
- package/esm/relatedVideosManager-81661348.js +0 -1
- package/esm/renditions-620d93b3.js +0 -1
- package/esm/resolution-43f91f56.js +0 -1
- package/esm/series-15e3f963.js +0 -1
- package/esm/series-v2-6a0f3851.js +0 -1
- package/esm/series-v2-882590c0.js +0 -1
- package/esm/settings-icon-de1c6c28.js +0 -1
- package/esm/skin-1444eb87.js +0 -1
- package/esm/skin-3653c5b3.js +0 -1
- package/esm/skin-3ba43c8b.js +0 -1
- package/esm/skin-45ab9db1.js +0 -1
- package/esm/skin-8af645ca.js +0 -1
- package/esm/skin-93e24d96.js +0 -1
- package/esm/skin-d0093419.js +0 -1
- package/esm/skin-e5ccb4cc.js +0 -1
- package/esm/skin-eae68539.js +0 -1
- package/esm/videoSelector-0146bf91.js +0 -1
- package/esm/videoSelector-6c903f38.js +0 -1
- package/esm/videojs-dash5.es-45c88e15.js +0 -1
- /package/esm/{assets → src/assets}/icons.d.ts +0 -0
- /package/esm/{components → src/components}/advertisement/advertisement.d.ts +0 -0
- /package/esm/{components → src/components}/auto-next-video/autoNextVideo.d.ts +0 -0
- /package/esm/{components → src/components}/big-mute-btn/index.d.ts +0 -0
- /package/esm/{components → src/components}/broadcaster_image/index.d.ts +0 -0
- /package/esm/{components → src/components}/caption-settings/caption-settings.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/bootstrap.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/events.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/index.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/markers.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/offsets.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/store.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/timelineMapper.d.ts +0 -0
- /package/esm/{components → src/components}/dvr-seekbar/index.d.ts +0 -0
- /package/esm/{components → src/components}/multicam/multicam.d.ts +0 -0
- /package/esm/{components → src/components}/multicam-v2/multicamv2.d.ts +0 -0
- /package/esm/{components → src/components}/multicam-v2_TEMP/multicamv2.d.ts +0 -0
- /package/esm/{components → src/components}/next-ep-preview/next-ep-preview.d.ts +0 -0
- /package/esm/{components → src/components}/next-episode/nextEpisodeButton.d.ts +0 -0
- /package/esm/{components → src/components}/playlist-tray/playlist.d.ts +0 -0
- /package/esm/{components → src/components}/quality-selector/index.d.ts +0 -0
- /package/esm/{components → src/components}/resolution/resolution.d.ts +0 -0
- /package/esm/{components → src/components}/series/series.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2/helper.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2/series-v2.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2_TEMP/helper.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2_TEMP/series-v2.d.ts +0 -0
- /package/esm/{components → src/components}/settings-icon/settings-icon.d.ts +0 -0
- /package/esm/{components → src/components}/subs-caps-button/subs-caps-button.d.ts +0 -0
- /package/esm/{components → src/components}/text-track-settings/text-track-settings.d.ts +0 -0
- /package/esm/{components → src/components}/timer/index.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/constants.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/index.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/session.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/transmitAd.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/transmitAdManager.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/utils.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/helper.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/index.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/videojs.thumbnails.d.ts +0 -0
- /package/esm/{components → src/components}/video-selector/videoSelector.d.ts +0 -0
- /package/esm/{components → src/components}/video-selector_TEMP/videoSelector.d.ts +0 -0
- /package/esm/{components → src/components}/watch-history/handleWatchHistory.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/epg.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/external.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/index.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/series.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/vod.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/firePlayer.d.ts +0 -0
- /package/esm/{core → src/core}/captions.d.ts +0 -0
- /package/esm/{core → src/core}/generic.d.ts +0 -0
- /package/esm/{core → src/core}/player_instance.d.ts +0 -0
- /package/esm/{core → src/core}/renditions.d.ts +0 -0
- /package/esm/{core → src/core}/util.d.ts +0 -0
- /package/esm/{core → src/core}/volume.d.ts +0 -0
- /package/esm/{dash → src/dash}/dashHandler.d.ts +0 -0
- /package/esm/{dash → src/dash}/linear_ssai.d.ts +0 -0
- /package/esm/{dash → src/dash}/sgai.d.ts +0 -0
- /package/esm/{features → src/features}/scheduleWindow/index.d.ts +0 -0
- /package/esm/{features.d.ts → src/features.d.ts} +0 -0
- /package/esm/{globalPlayerEvents.d.ts → src/globalPlayerEvents.d.ts} +0 -0
- /package/esm/{helpers → src/helpers}/accessibility.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/apiErrorTracker.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/browser.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/browser.test.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/currentVideoInfo.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/drmErrorDetection.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/errorHandling.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/loader.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/localisation.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/playerControlEvents.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/scriptLoader.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/secondary-switching.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/skin.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/sourceRetriever.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/ssaiEventHandler.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/chromecast.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/comscore_dist/index.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/index.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/library.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/videojs-dash5.es.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/videojs_contrib_dash.d.ts +0 -0
- /package/esm/{skin → src/skin}/carousel/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/cn_news/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/default/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/default/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/defaultV2/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/defaultV2/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/index.d.ts +0 -0
- /package/esm/{skin → src/skin}/mini/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/mini/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/minimalist/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/multiplayer/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/multiplayer/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/news/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/news/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/news_live/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/news_live/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/vl_one/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/vl_one/skin.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/analytics.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/beacon.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/castCommands.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/comscore.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/controlsColor.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/conviva.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/keyboardShortcuts.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/manager.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/qualityLabels.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/relatedVideosManager.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/replaceMacros.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/sse.d.ts +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export = ChromecastSessionManager;
|
|
2
|
+
/** @lends ChromecastSessionManager.prototype **/
|
|
3
|
+
declare class ChromecastSessionManager {
|
|
4
|
+
static hasConnected: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether or not the current Chromecast API is available (that is,
|
|
7
|
+
* `window.chrome`, `window.chrome.cast`, and `window.cast` exist).
|
|
8
|
+
*
|
|
9
|
+
* @static
|
|
10
|
+
* @returns {boolean} true if the Chromecast API is available
|
|
11
|
+
*/
|
|
12
|
+
static isChromecastAPIAvailable(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether or not there is a current CastSession and it is connected.
|
|
15
|
+
*
|
|
16
|
+
* @static
|
|
17
|
+
* @returns {boolean} true if the current CastSession exists and is connected
|
|
18
|
+
*/
|
|
19
|
+
static isChromecastConnected(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Stores the state of the current Chromecast session and its associated objects such
|
|
22
|
+
* as the
|
|
23
|
+
* [RemotePlayerController](https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayerController),
|
|
24
|
+
* and the
|
|
25
|
+
* [RemotePlayer](https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayer).
|
|
26
|
+
*
|
|
27
|
+
* WARNING: Do not instantiate this class until the
|
|
28
|
+
* [CastContext](https://developers.google.com/cast/docs/reference/chrome/cast.framework.CastContext)
|
|
29
|
+
* has been configured.
|
|
30
|
+
*
|
|
31
|
+
* For an undocumented (and thus unknown) reason, RemotePlayer and
|
|
32
|
+
* RemotePlayerController instances created before the cast context has been configured
|
|
33
|
+
* or after requesting a session or loading media will not stay in sync with media
|
|
34
|
+
* items that are loaded later.
|
|
35
|
+
*
|
|
36
|
+
* For example, the first item that you cast will work as expected: events on
|
|
37
|
+
* RemotePlayerController will fire and the state (currentTime, duration, etc) of the
|
|
38
|
+
* RemotePlayer instance will update as the media item plays. However, if a new media
|
|
39
|
+
* item is loaded via a `loadMedia` request, the media item will play, but the
|
|
40
|
+
* remotePlayer will be in a "media unloaded" state where the duration is 0, the
|
|
41
|
+
* currentTime does not update, and no change events are fired (except, strangely,
|
|
42
|
+
* displayStatus updates).
|
|
43
|
+
*
|
|
44
|
+
* @param player {object} Video.js Player
|
|
45
|
+
* @constructs ChromecastSessionManager
|
|
46
|
+
*/
|
|
47
|
+
constructor(player: object);
|
|
48
|
+
player: any;
|
|
49
|
+
_sessionListener: any;
|
|
50
|
+
_castListener: any;
|
|
51
|
+
remotePlayer: any;
|
|
52
|
+
remotePlayerController: any;
|
|
53
|
+
/**
|
|
54
|
+
* Add event listeners for events triggered on the current CastContext.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
private _addCastContextEventListeners;
|
|
59
|
+
/**
|
|
60
|
+
* Keeps the player's source cache from being overwritten with the `blob:` URL that
|
|
61
|
+
* MSE-based source handlers (dash.js, VHS) attach to the media element.
|
|
62
|
+
*
|
|
63
|
+
* `_reloadTech` re-sets the same sources on every cast connect/disconnect. Video.js
|
|
64
|
+
* only ignores a tech `sourceset` with a `blob:` URL when the player source differs
|
|
65
|
+
* from the previous one, so on a same-URL reload `currentSources()` is replaced by
|
|
66
|
+
* `{ src: 'blob:...', type: '' }`. That drops `type` and the DRM options, so the next
|
|
67
|
+
* cast sends no license data and the next reload fails with
|
|
68
|
+
* MEDIA_ERR_SRC_NOT_SUPPORTED.
|
|
69
|
+
*
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
private _preserveSourceCacheOnMediaSourceAttach;
|
|
73
|
+
/**
|
|
74
|
+
* Remove event listeners that were added in {@link
|
|
75
|
+
* ChromecastSessionManager#_addCastContextEventListeners}.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private _removeCastContextEventListeners;
|
|
80
|
+
/**
|
|
81
|
+
* Handle the CastContext's SessionState change event.
|
|
82
|
+
*
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private _onSessionStateChange;
|
|
86
|
+
/**
|
|
87
|
+
* Rejoins a CastSession that is already running when this player loads, which is what
|
|
88
|
+
* happens when the page is refreshed while casting. The Cast SDK restores the session
|
|
89
|
+
* on its own, but `hasConnected` is in-memory state that a refresh resets, so without
|
|
90
|
+
* this the Chromecast Tech reports itself unavailable and the player starts playing
|
|
91
|
+
* the item locally while the receiver is still playing it.
|
|
92
|
+
*
|
|
93
|
+
* Only a session that is already playing this player's current source is adopted, so
|
|
94
|
+
* that a session started from another tab or by another app is left alone.
|
|
95
|
+
*
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
private _resumeExistingSession;
|
|
99
|
+
/**
|
|
100
|
+
* Returns whether the given MediaSession is playing the item that this player
|
|
101
|
+
* currently has loaded.
|
|
102
|
+
*
|
|
103
|
+
* @private
|
|
104
|
+
* @param mediaSession {object} a Chromecast MediaSession
|
|
105
|
+
* @return {boolean} true if the receiver is playing this player's current source
|
|
106
|
+
*/
|
|
107
|
+
private _isPlayingCurrentSource;
|
|
108
|
+
/**
|
|
109
|
+
* Handle the CastContext's CastState change event.
|
|
110
|
+
*
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
private _onCastStateChange;
|
|
114
|
+
/**
|
|
115
|
+
* Triggers player events that notifies listeners that Chromecast devices are
|
|
116
|
+
* either available or unavailable.
|
|
117
|
+
*
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private _notifyPlayerOfDevicesAvailabilityChange;
|
|
121
|
+
/**
|
|
122
|
+
* Returns whether or not there are Chromecast devices available to cast to.
|
|
123
|
+
*
|
|
124
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework#.CastState
|
|
125
|
+
* @param {String} castState
|
|
126
|
+
* @return {boolean} true if there are Chromecast devices available to cast to.
|
|
127
|
+
*/
|
|
128
|
+
hasAvailableDevices(castState: string): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Opens the Chromecast casting menu by requesting a CastSession. Does nothing if the
|
|
131
|
+
* Video.js player does not have a source.
|
|
132
|
+
*/
|
|
133
|
+
openCastMenu(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Reloads the Video.js player's Tech. This causes the player to re-evaluate which
|
|
136
|
+
* Tech should be used for the current source by iterating over available Tech and
|
|
137
|
+
* calling `Tech.isSupported` and `Tech.canPlaySource`. Video.js uses the first
|
|
138
|
+
* Tech that returns true from both of those functions. This is what allows us to
|
|
139
|
+
* switch back and forth between the Chromecast Tech and other available Tech when a
|
|
140
|
+
* CastSession is connected or disconnected.
|
|
141
|
+
*
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private _reloadTech;
|
|
145
|
+
_resumingSession: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Returns whether the Tech that is currently being loaded should adopt the media that
|
|
148
|
+
* the receiver is already playing, rather than loading the source itself.
|
|
149
|
+
*
|
|
150
|
+
* @return {boolean} true while a rejoined session is being handed to the Tech
|
|
151
|
+
*/
|
|
152
|
+
isResumingSession(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.CastContext
|
|
155
|
+
* @returns {object} the current CastContext, if one exists
|
|
156
|
+
*/
|
|
157
|
+
getCastContext(): object;
|
|
158
|
+
/**
|
|
159
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayer
|
|
160
|
+
* @returns {object} the current RemotePlayer, if one exists
|
|
161
|
+
*/
|
|
162
|
+
getRemotePlayer(): object;
|
|
163
|
+
/**
|
|
164
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayerController
|
|
165
|
+
* @returns {object} the current RemotePlayerController, if one exists
|
|
166
|
+
*/
|
|
167
|
+
getRemotePlayerController(): object;
|
|
168
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export = ChromecastTechUI;
|
|
2
|
+
/**
|
|
3
|
+
* This class represents the UI that is shown in the player while the Chromecast Tech is
|
|
4
|
+
* active. The UI has a single root DOM element that displays the poster image of the
|
|
5
|
+
* current item and title and subtitle. This class receives updates to the poster, title
|
|
6
|
+
* and subtitle when the media item that the player is playing changes.
|
|
7
|
+
*
|
|
8
|
+
* @class ChromecastTechUI
|
|
9
|
+
*/
|
|
10
|
+
declare class ChromecastTechUI {
|
|
11
|
+
_el: DOMElement;
|
|
12
|
+
/**
|
|
13
|
+
* Creates and returns a single DOMElement that contains the UI. This implementation
|
|
14
|
+
* of the Chromecast Tech's UI displays a poster image, a title and a subtitle.
|
|
15
|
+
*
|
|
16
|
+
* @private
|
|
17
|
+
* @returns {DOMElement}
|
|
18
|
+
*/
|
|
19
|
+
private _createDOMElement;
|
|
20
|
+
/**
|
|
21
|
+
* A helper method for creating DOMElements of the given type and with the given class
|
|
22
|
+
* name(s).
|
|
23
|
+
*
|
|
24
|
+
* @param type {string} the kind of DOMElement to create (ex: 'div')
|
|
25
|
+
* @param className {string} the class name(s) to give to the DOMElement. May also be
|
|
26
|
+
* a space-delimited list of class names.
|
|
27
|
+
* @returns {DOMElement}
|
|
28
|
+
*/
|
|
29
|
+
_createElement(type: string, className: string): DOMElement;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the root DOMElement to be shown in the player's UI.
|
|
32
|
+
*
|
|
33
|
+
* @returns {DOMElement}
|
|
34
|
+
*/
|
|
35
|
+
getDOMElement(): DOMElement;
|
|
36
|
+
/**
|
|
37
|
+
* Finds the poster's DOMElement in the root UI element.
|
|
38
|
+
*
|
|
39
|
+
* @private
|
|
40
|
+
* @returns {DOMElement}
|
|
41
|
+
*/
|
|
42
|
+
private _findPosterEl;
|
|
43
|
+
/**
|
|
44
|
+
* Finds the poster's <img> DOMElement in the root UI element.
|
|
45
|
+
*
|
|
46
|
+
* @private
|
|
47
|
+
* @returns {DOMElement}
|
|
48
|
+
*/
|
|
49
|
+
private _findPosterImageEl;
|
|
50
|
+
/**
|
|
51
|
+
* Finds the title's DOMElement in the root UI element.
|
|
52
|
+
*
|
|
53
|
+
* @private
|
|
54
|
+
* @returns {DOMElement}
|
|
55
|
+
*/
|
|
56
|
+
private _findTitleEl;
|
|
57
|
+
/**
|
|
58
|
+
* Finds the subtitle's DOMElement in the root UI element.
|
|
59
|
+
*
|
|
60
|
+
* @private
|
|
61
|
+
* @returns {DOMElement}
|
|
62
|
+
*/
|
|
63
|
+
private _findSubtitleEl;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the current poster image URL and updates the poster image DOMElement with the
|
|
66
|
+
* new poster image URL.
|
|
67
|
+
*
|
|
68
|
+
* @param poster {string} a URL for a poster image
|
|
69
|
+
*/
|
|
70
|
+
updatePoster(poster: string): void;
|
|
71
|
+
_poster: string;
|
|
72
|
+
/**
|
|
73
|
+
* Gets the current poster image URL.
|
|
74
|
+
*
|
|
75
|
+
* @returns {string} the URL for th current poster image
|
|
76
|
+
*/
|
|
77
|
+
getPoster(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Sets the current title and updates the title's DOMElement with the new text.
|
|
80
|
+
*
|
|
81
|
+
* @param title {string} a title to show
|
|
82
|
+
*/
|
|
83
|
+
updateTitle(title: string): void;
|
|
84
|
+
_title: string;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the current subtitle and updates the subtitle's DOMElement with the new text.
|
|
87
|
+
*
|
|
88
|
+
* @param subtitle {string} a subtitle to show
|
|
89
|
+
*/
|
|
90
|
+
updateSubtitle(subtitle: string): void;
|
|
91
|
+
_subtitle: string;
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as l}from"./skin-2a3ee818.js";var i=function(i){var n,o=l(i),e=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var t,d,v=null==o||null===(t=o.tech_)||void 0===t||null===(d=t.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(e=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getRepresentationsByType("video");(null==r?void 0:r.length)>0&&(e=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return e};export{i as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{g as s,p as c}from"./skin-2a3ee818.js";import{p as u,d as m}from"./browser-8ea05bed.js";var v=function(){var e;return(null===(e=u.getConfig())||void 0===e?void 0:e.qualityLabels)||{}},p=function(e){var t;if(null==e||"Auto"===e)return null;var n=v(),i=null!==(t=n[e])&&void 0!==t?t:n[String(e)];return null==i||""===i?null:i},h=function(){var e=v().auto;return null!=e&&""!==e?e:"Auto"},f=function(){return v().enhanced||""};function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}var b=r.getComponent("Component"),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bitRate,i=t.includeBitrate,o=p(e);if(null!=o)return o;var a=function(e){return e>719&&e<1081?"<span>HD</span>":e>1081&&e<1500?"<span>2K (HD)</span>":e>1501?"<span>4K (HD)</span>":""}(e);return i?"".concat(e,"p @ ").concat(n,"mbps ").concat(a):"".concat(e,"p ").concat(a)},y=function(){o(p,b);var s,u,v=(s=p,u=g(),function(){var e,t=d(s);if(u){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function p(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,p),o=v.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;o.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(o),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(p,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"resolution_hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"resolution_hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"resolution_hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"resolution_hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),o=c(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content resolution_hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(s,l),this.toggleContentOnHover(n,d);var u=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l=w(e.height,{bitRate:d,includeBitrate:!0}),s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(u,a),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,C(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",u),"Safari"!=m()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a=w(e.height,{bitRate:o,includeBitrate:Boolean(window.enableResolutionsBitrate)}),d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(u,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,C(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",u)),r.dom.appendContent(s,u),r.dom.appendContent(d,s),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null,o=h();e&&e.on("cuechange",(function(){var t,n,a=e.activeCues[0];if(console.log((null==a||null===(t=a.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),a&&document.querySelector(".auto.selected")){var d,l,r,s,c,u,m,v;if(null!=a&&null!==(d=a.value)&&void 0!==d&&null!==(l=d.resolution)&&void 0!==l&&l.height&&i!==(null==a||null===(r=a.value)||void 0===r||null===(s=r.resolution)||void 0===s?void 0:s.height))document.querySelector(".auto.selected").textContent="".concat(o," ").concat(null==a||null===(m=a.value)||void 0===m||null===(v=m.resolution)||void 0===v?void 0:v.height,"p");i=null==a||null===(c=a.value)||void 0===c||null===(u=c.resolution)||void 0===u?void 0:u.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this,i=h();if("nondrm"==e){var o,a,d,l,s=null===(o=this.player_)||void 0===o||null===(a=o.tech_)||void 0===a?void 0:a.vhs.selectPlaylist().attributes.RESOLUTION.height,c=null===(d=this.player_)||void 0===d||null===(l=d.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=r.dom.createEl("div",{className:"relative"}),m=r.dom.createEl("p",{innerHTML:"".concat(i," ").concat(s,"p"),className:"rendition auto selected",bandwidth:c,res:s});m.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(m,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,C(n.playerId,null,!0))})),r.dom.appendContent(u,m),r.dom.appendContent(t,u)}else{var v=r.dom.createEl("div",{className:"relative"}),p=r.dom.createEl("p",{innerHTML:i,className:"rendition selected",qualityIndex:"auto"});p.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(p,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,C(n.playerId,null,!0)})),r.dom.appendContent(v,p),r.dom.appendContent(t,v)}}}]),p}(),C=function(e,t,n){var i,o=s(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"resolution_hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,m;null==o||null===(u=o.dash)||void 0===u||null===(m=u.mediaPlayer)||void 0===m||m.resetSettings()}else{var v,p,h,f;null==o||null===(v=o.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),null==o||null===(h=o.dash)||void 0===h||null===(f=h.mediaPlayer)||void 0===f||f.setRepresentationForTypeByIndex("video",c,!0);var g=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(g)}),100);var b=r.dom.$(".content");b&&r.dom.addClass(b,"resolution_hidden")}}},E=Object.freeze({__proto__:null,playSelectedResolution:C,default:y});export{p as a,f as b,E as c,C as p,h as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{ae as d,R as p,U as u,h as v,Q as m}from"./generic-6c14b09e.js";import{E as f}from"./icons-262bef63.js";import{f as h}from"./skin-2a3ee818.js";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var t,i=o(e);if(l){var n=o(this).constructor;t=Reflect.construct(i,arguments,n)}else t=i.apply(this,arguments);return r(this,t)});function d(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),i=c.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,y=s.playerId,j(i.el(),i.seriesData),i.loadCSS(),i}return i(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();function L(){return(L=e(l.mark((function e(t,i,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,i).then((function(e){v(e.response),m(y)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return L.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function j(e,t){for(var i='<div class="hover-div"></div>\n '.concat(f(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{j as customSeasonList,k as handleSeasonChange,w as seriesModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";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 r,g as d,B as c}from"./icons-262bef63.js";import{n as u,af as m,ag as v,U as p,b as h,M as f}from"./generic-6c14b09e.js";import{j as y,s as g,p as b,l as C,g as E,i as k}from"./skin-2a3ee818.js";import{a as N}from"./autoNextVideo-ca468d20.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-c276e2a6.js";import"./localisation-0bf399a1.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}var S=a.getComponent("Component"),I=function(){n(T,S);var I,w,L=(I=T,w=x(),function(){var e,t=l(I);if(w){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function T(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,T),(d=L.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,y,g=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,b=[];g.map((function(t){b.push.apply(b,e(t.episodes))})),m(b),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(y=f.video)||void 0===y?void 0:y.id),N({playerId:d.playerId,content:b,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(T,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-f6d0f5ce.js").then((function(e){var t=document.getElementById("series-v2");t||((t=document.createElement("style")).id="series-v2",document.head.appendChild(t)),t.textContent="".concat(e.default)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(y(),e.classList.remove("hidden"),e.hidden=!1,s.classList.add("open"),g(this.playerId,e)):(e.classList.add("hidden"),e.hidden=!0,s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t,s=this,o=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var n=0;n<(null==o?void 0:o.length);n++)o[n]&&(o[n].tabIndex=-1);for(var i=(null===(t=this.el())||void 0===t?void 0:t.querySelectorAll(".series-container"))||[],l=0;l<i.length;l++)i[l].tabIndex=-1;this._suppressToggleClick=!0,setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus({preventScroll:!0}),setTimeout((function(){s._suppressToggleClick=!1}),300)}),100)}},{key:"focusFirstSeason",value:function(){var e=a.dom.$(".season-holder",this.el())||a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"focusFirstEpisode",value:function(){var e=a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});s.setAttribute("aria-labelledby","seasons"),s.hidden=!0;var o=a.dom.$(".series-selector-icon",this.el());o.onpointerdown=function(){e._allowToggle=!0},o.onmousedown=function(){e._allowToggle=!0},o.onkeydown=function(t){"Enter"!==t.key&&" "!==t.key||(e._allowToggle=!0)},o.onclick=function(){if(!e._suppressToggleClick){var t=s.classList.contains("hidden");t&&!e._allowToggle||(e._allowToggle=!1,e.toggleOpenClose(s),t?(e.handleTabIndexSelector(),s.classList.contains("hidden")||e.focusFirstSeason()):e.handleCloseTabIndex())}};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),t.hidden=!0,s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=b(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),C(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.tabIndex=-1,d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(k(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),h.ariaHidden=!0,a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=b(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1),this.focusFirstEpisode()}}]),T}();export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";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{E as r,g as d,B as c}from"./icons-262bef63.js";import{n as m,af as u,ag as p,b as v,M as h,U as f}from"./generic-6c14b09e.js";import{j as C,p as g,g as y}from"./skin-2a3ee818.js";import{a as b}from"./autoNextVideo-ca468d20.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-c276e2a6.js";import"./localisation-0bf399a1.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(o){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,o,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=m(),null!==(a=s(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,g=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,y=[];g.map((function(t){y.push.apply(y,e(t.episodes))})),u(y),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:y,cb:d.cb,series:null==c?void 0:c.sres})}return d}return o(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var s=document.getElementById(this.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(n,"px"),a.dom.appendContent(t,o),s.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),s=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var s=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(s,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=g(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(s,n),a.dom.appendContent(s,i),a.dom.appendContent(e,s),a.dom.appendContent(e,l),y(this.playerId).on("fullscreenchange",(function(){var o=document.getElementById(t.playerId);if(o){var s=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;y(this.playerId);for(var t=v(),o=a.dom.createEl("div",{className:"season-container"}),s=function(s){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(n=t[s])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==s&&(r.checked=!0),r.onclick=function(t){h.set(s),e.showSeasonDetails(s)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},n=0;n<t.length;n++)s(n);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var s=this;t=t.map((function(e){var t,o,n,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(o=e.gist)||void 0===o||null===(n=o.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var n=function(n){var i,l,r,d,c,m,u,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,g),a.dom.appendContent(v,h),a.dom.appendContent(o,v);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(u=t[n])||void 0===u?void 0:u.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(v,y),a.dom.appendContent(o,v),y.onclick=function(e){var o;e.stopPropagation(),p(null===(o=t[n])||void 0===o?void 0:o.id),f(s.playerId,t[n].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var o,s,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=v()[e].episodes;this.getSeasonDetailsContainer(o,t);var s=a.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var n=g(c());s.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{h as r,g as d,T as s}from"./icons-262bef63.js";import{j as c,s as u,k as p,l as m,g as h,f as v,p as f}from"./skin-2a3ee818.js";import{g}from"./renditions-28891b91.js";import{p as y,a as C,r as b,b as E}from"./resolution-ce4463bf.js";import{g as N}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/defineProperty";import"./browser-8ea05bed.js";function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(k=function(){return!!e})()}var I=l.getComponent("Component"),L=function(){n(j,I);var L,M,T=(L=j,M=k(),function(){var e,t=o(L);if(M){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function j(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,j),(a=T.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(j,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=l.dom.createEl("div",{className:"selection-container hidden"});l.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),l.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=l.dom.createEl("div",{className:"settings-selector-head"}),n=l.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=l.dom.createEl("div",{className:"settings-selector-title",innerHTML:N("settingsTitle")||"Settings"}),o=l.dom.createEl("div",{className:"settings-selector-content"}),r=l.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();l.dom.appendContent(r,s);var c=this.createAudioQualityContainer();l.dom.appendContent(r,c),l.dom.appendContent(a,n),l.dom.appendContent(a,i),l.dom.appendContent(e,a),l.dom.appendContent(e,o),l.dom.appendContent(o,r),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=l.dom.createEl("div",{className:"audio-language-container"}),n=l.dom.createEl("div",{className:"audio-language-container-title",innerHTML:N("audioLanguageText")||"Audio Language"});l.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var r=l.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},l.dom.appendContent(i,r),l.dom.appendContent(i,o),l.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=l.dom.createEl("div",{className:"video-quality-container"}),n=l.dom.createEl("div",{className:"video-quality-container-title",innerHTML:N("videoQualityText")||"Video Quality"});l.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o=document.createElement("label"),r=document.createElement("div"),d=document.createElement("div");d.className="video-quality-bitrate-label",r.className="video-quality-holder",o.className="video-quality-label-container",o.setAttribute("for","quality".concat(e));var c=document.createElement("div");c.className="video-quality - ".concat(e);var u=null==i||null===(n=i[e])||void 0===n?void 0:n.height,p="Auto"==u,m=p?null:C(u);if(p)for(var h=v(b());null!=h&&h.firstChild;)c.appendChild(h.firstChild);else if(null!=m)for(var g=v(m);null!=g&&g.firstChild;)c.appendChild(g.firstChild);else if(c.appendChild(document.createTextNode("".concat(u,"p"))),u>=720)for(var N=v("<span class='hd-rendition'> HD </span>");null!=N&&N.firstChild;)c.appendChild(N.firstChild);var k="".concat(t.isEnhancedBitrate(i[e])?E():""),I=document.createTextNode(k);d.appendChild(I);var L=l.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});L.setAttribute("type","radio"),L.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var M=document.createElement("span");M.className=k?"check-mark center":"check-mark";var T=f(s());M.appendChild(T),r.appendChild(L),r.appendChild(M),r.appendChild(c),l.dom.appendContent(o,r),o.appendChild(d),l.dom.appendContent(a,o)},r=0;r<i.length;r++)o(r);return a}}]),j}();export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as t,c as o,d as s,e as i}from"./features-0d4290a8.js";import{e as r,a7 as n}from"./generic-6c14b09e.js";import{S as l,M as a,a as m,N as d,b as u,R as p}from"./icons-262bef63.js";import{g as c,b}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-28891b91.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(v,f){c(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",u());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",p())}(v,f),function(s,i){var n=c(s),a=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",l()),a&&import("./nextEpisodeButton-a3ed5cde.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,r())}))})),n.one("loadedmetadata",(function(){var e;a&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,r,n=c(e),l=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],p=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(l&&(l.style.display="none"),u&&(u.style.display="none"),p&&(p.style.display="none"));null===(o=n.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(b(a(window.controlsColor))),null===(i=n.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(r=i.el())||void 0===r||r.appendChild(b(m(window.controlsColor)));var v=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(d()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./skin-2a3ee818.js";import{f as r,n as t}from"./features-0d4290a8.js";import{g as o}from"./renditions-28891b91.js";import{b as i}from"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-6c14b09e.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-c4d10b91.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,s){e(t).on("loadeddata",(function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)}))}(s,n),function(r){var o=e(r);o.controls(!1),t(r)}(s),function(r){var t=e(r);t.addChild("SubsCapsButton")}(s)}export{s as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
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","CN_NEWS"],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: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))}},y=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 h(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,y 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,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
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-0d4290a8.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-2a3ee818.js";import{g as C}from"./renditions-28891b91.js";import"@babel/runtime/helpers/toConsumableArray";import{a as c,b as p}from"./index-eded6cb0.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import{r as h}from"./relatedVideosManager-93533a90.js";import{ab as m,ac as f,e as g,ad as b,n as L}from"./generic-6c14b09e.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-ca468d20.js";import"./index-c276e2a6.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.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 K=v(G,"#vjs-icon-fullscreen");_.on("fullscreenchange",(function(){var l=_.isFullscreen_;null==K||K.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var z=(null==_||null===(k=_.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(z){var J=z.querySelector(".vjs-mute-control .vjs-icon-placeholder");J.classList.add("vjs-svg-icon"),J.style.height="24px",J.style.width="24px";var Q=v(J,_.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 K=u.watchHistoryResumeTime;u.watchedPercentage<95&&(P=K)}b(l,P)}}(B,y),p(B,y)}export{B as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
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-0d4290a8.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-2a3ee818.js";import{g as C}from"./renditions-28891b91.js";import"@babel/runtime/helpers/toConsumableArray";import{a as c,b as p}from"./index-eded6cb0.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import{r as h}from"./relatedVideosManager-93533a90.js";import{ab as m,ac as f,e as b,ad as g,n as y}from"./generic-6c14b09e.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-ca468d20.js";import"./index-c276e2a6.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@viewlift/comscore/index.js";function L(L,B){d(L).addClass("skin_news"),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)}))}(L,B),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,b,g,y,L,B,w=d(l);if(null!=i&&i.liveVideo){var j,E,V,x,M,k,S=null===(j=w.controlBar)||void 0===j||null===(E=j.getChild("TimeDivider"))||void 0===E?void 0:E.el(),T=null===(V=w.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),Z=null===(M=w.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),T&&(T.style.display="none"),Z&&(Z.style.display="none")}var A=null===(e=w.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=w.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(w.paused())try{w.play()}catch(l){console.log(l)}});var _=document.createElement("div");_.className="custom-spaced-progress-bar",A&&_.append(A.el());null===(t=w.controlBar)||void 0===t||null===(r=t.el())||void 0===r||r.append(_);var N='<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>';w.el().insertBefore(u(N),null!==(s=w.el().firstChild)&&void 0!==s?s:null);var P=(null==w||null===(a=w.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=v(P,w.paused()?"#vjs-icon-play":"#vjs-icon-pause");w.on("pause",(function(){return D.setAttributeNS(null,"href","#vjs-icon-play")})),w.on("play",(function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")}))}var I=(null==w||null===(p=w.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(I){I.style.height="24px",I.style.width="24px";var q=v(I,"#vjs-icon-fullscreen");w.on("fullscreenchange",(function(){var l=w.isFullscreen_;null==q||q.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var O=(null==w||null===(f=w.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(O){var R=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");R.classList.add("vjs-svg-icon"),R.style.height="24px",R.style.width="24px";var F=v(R,w.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");w.on("volumechange",(function(l){var i=w.volume();console.log(i,w.muted()),0==i||w.muted()?F.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?F.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?F.setAttributeNS(null,"href","#vjs-icon-volume2"):F.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var G=(null==w||null===(g=w.controlBar)||void 0===g||null===(y=g.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(G){var K=null==G?void 0:G.querySelector(".vjs-icon-placeholder");K.style.height="25px",K.style.width="25px";var z=v(K,"#vjs-icon-pip");w.on("enterpictureinpicture",(function(){z.setAttributeNS(null,"href","#vjs-icon-pip")}))}var J=(null==w||null===(L=w.controlBar)||void 0===L||null===(B=L.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(J){var Q=J.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=v(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),w.textTracks().on("change",(function(l){for(var i=w.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?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}w&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(w.liveTracker.on("liveedgechange",(function(){Y(w)})),w.on("timeupdate",(function(){Y(w)})));function W(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 X(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 Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(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=W(o)))}}}(L,B),function(l,u){var v,C,c,p,L,B,w,j,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===(L=Z.content)||void 0===L?void 0:L.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===(B=u.streams)||void 0===B?void 0:B.length)>1&&t(l,null==u?void 0:u.streams);(null==u||null===(w=u.playlist)||void 0===w||null===(j=w.content)||void 0===j?void 0:j.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,H=null;if(null!=u&&null!==(A=u.series)&&void 0!==A&&A.enable){var _,N,P,D,I,q=null===(_=b())||void 0===_||null===(N=_.video)||void 0===N||null===(P=N.gist)||void 0===P?void 0:P.id,O=y(),R=(null==O?void 0:O.get(q))||{t:0,p:0},F=R.t,G=R.p;"function"==typeof(null===(D=window)||void 0===D||null===(I=D.watchHistory)||void 0===I?void 0:I.cb)&&window.watchHistory.cb({watchedTime:F}),G<95&&(H=F)}else{var K=u.watchHistoryResumeTime;u.watchedPercentage<95&&(H=K)}g(l,H)}}(L,B),p(L,B)}export{L as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,d as l,e as n,o as i,p as o,q as t}from"./features-0d4290a8.js";import{g as r}from"./skin-2a3ee818.js";import{a,b as u}from"./index-eded6cb0.js";import{i as d}from"./index-4be0bb5b.js";import{p as v,a as s}from"./browser-8ea05bed.js";import c from"@babel/runtime/helpers/defineProperty";import p from"@babel/runtime/helpers/toConsumableArray";import f from"video.js";import"videojs-contrib-quality-menu";import{r as b,a as m,b as y}from"./resolution-ce4463bf.js";import{r as g}from"./relatedVideosManager-93533a90.js";import{f as h,a7 as j,ab as w,ac as _,e as L,ad as C,n as B}from"./generic-6c14b09e.js";import{c as T,d as k}from"./icons-262bef63.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-28891b91.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-ca468d20.js";import"./index-c276e2a6.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/assertThisInitialized";import"axios";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@viewlift/comscore/index.js";function E(e,l){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);l&&(i=i.filter((function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),n.push.apply(n,i)}return n}function O(e){for(var l=1;l<arguments.length;l++){var n=null!=arguments[l]?arguments[l]:{};l%2?E(Object(n),!0).forEach((function(l){c(e,l,n[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(n,l))}))}return e}var I=function(e,l){var n,i;if(e&&null!=l){e.options_.label=l;var o=null===(n=e.el())||void 0===n||null===(i=n.querySelector)||void 0===i?void 0:i.call(n,".vjs-menu-item-text");o&&(o.innerHTML=l)}},A=function(e){var l,n;return null!==(l=null!==(n=null==e?void 0:e.bitrate)&&void 0!==n?n:null==e?void 0:e.bandwidth)&&void 0!==l?l:0},P=function(e){var l=y();return l?"".concat(e," ").concat(l):e},R=function(e){var l,n=null===(l=v.getConfig())||void 0===l?void 0:l.qualityLabels,i=b();if(null!=n&&n.auto&&"function"==typeof f.addLanguage){var o="function"==typeof e.language&&e.language()||"en";f.addLanguage(o,{Auto:n.auto})}var t=function(e){var l,n=e.getChild("controlBar");return n&&(n.getChild("QualityMenuButton")||(null===(l=n.children())||void 0===l?void 0:l.find((function(e){return"QualityMenuButton"===(null==e?void 0:e.name_)}))))||null}(e);if(t&&!t._qualityLabelsPatched){if(t._qualityLabelsPatched=!0,"function"==typeof t.groupByResolution_){var r=t.groupByResolution_.bind(t);t.groupByResolution_=function(){var e=this;return r().reduce((function(l,n){return l.concat(function(e,l){var n,i=p(l.levels||[]).sort((function(l,n){return A(e[n])-A(e[l])})),o=m(null==e||null===(n=e[i[0]])||void 0===n?void 0:n.height),t=null!=o?o:l.label,r=null!=o?"":l.subLabel,a=A(e[i[i.length-1]]);return A(e[i[0]])===a?[O(O({},l),{},{label:t,subLabel:r})]:i.map((function(n){return O(O({},l),{},{levels:[n],active:e.selectedIndex===n,label:A(e[n])>a?P(t):t,subLabel:r})}))}(e.qualityLevels_,n))}),[])}}if("function"==typeof t.createItems){var a=t.createItems.bind(t);t.createItems=function(){var e=a();return e.forEach((function(e){var l;return I(e,null===(l=e.options_)||void 0===l?void 0:l.label)})),this.autoMenuItem_&&null!=n&&n.auto&&I(this.autoMenuItem_,i),e}}"function"==typeof t.update&&t.update()}},S=function(e){var l=r(e);if(l){var n=function(e){var l,n,i,o,t,r=null==e||null===(l=e.dash)||void 0===l?void 0:l.mediaPlayer;if(r&&"function"==typeof e.qualityLevels&&e._dashQualityLevelsFor!==r){var a=(null===(n=r.getRepresentationsByType)||void 0===n?void 0:n.call(r,"video"))||[];if(a.length){e._dashQualityLevelsFor=r;for(var u=e.qualityLevels();u.length;)u.removeQualityLevel(u[0]);var d=function(e){return(null==e?void 0:e.bandwidth)||1e3*((null==e?void 0:e.bitrateInKbit)||0)},v=a.map((function(){return!0})),s=!1,c=function(){s=!1;var e=a.filter((function(e,l){return v[l]}));if(e.length&&e.length!==a.length){var l=e.reduce((function(e,l){return d(l)>d(e)?l:e}));r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),r.setRepresentationForTypeById("video",l.id,!0)}else r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})};a.forEach((function(e,l){u.addQualityLevel({id:String(e.id),width:e.width,height:e.height,bandwidth:d(e),enabled:function(e){if("boolean"!=typeof e)return v[l];v[l]=e,s||(s=!0,Promise.resolve().then(c))}})}));var p=function(e){var l=a.findIndex((function(l){return l.id===(null==e?void 0:e.id)}));l<0||u.selectedIndex===l||(u.selectedIndex_=l,u.trigger({type:"change",selectedIndex:l}))},f=null===(i=window)||void 0===i||null===(o=i.dashjs)||void 0===o||null===(t=o.MediaPlayer)||void 0===t?void 0:t.events;return null!=f&&f.QUALITY_CHANGE_RENDERED&&r.on(f.QUALITY_CHANGE_RENDERED,(function(e){var l=e.mediaType,n=e.newRepresentation;"video"===l&&p(n)})),function(){var e;return p(null===(e=r.getCurrentRepresentationForType)||void 0===e?void 0:e.call(r,"video"))}}}}(l);"function"==typeof l.qualityMenu&&l.qualityMenu({useResolutionLabels:!0}),l.ready((function(){R(l),n&&n()})),l.on("loadstart",(function(){l.ready((function(){return R(l)}))}))}};function x(v,c){r(v).addClass("skin_vlone"),function(l,n){var i,o=r(l),t=(null==n||null===(i=n.res)||void 0===i?void 0:i.siteId)||"";o&&(o.on("loadeddata",(function(){var e,i,o,r,u,v,c,p;S(l);var f=(null===(e=g.get())||void 0===e||null===(i=e.content)||void 0===i?void 0:i.length)>0;if(!(null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null!==(r=window)&&void 0!==r&&null!==(u=r.app_data)&&void 0!==u&&null!==(v=u.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play||f)||null!=n&&n.liveVideo){if(!(null!=n&&n.liveVideo||null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable)){var b;b=g.subscribe((function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(a(l,n),b&&b())}))}}else a(l,n);null!=n&&n.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||d(l)})),o.one("play",(function(){var n,i,o,t;null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(l,null===(o=window)||void 0===o||null===(t=o.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(v,c),function(e,a){var d,v,s,c,p,f,b,m=r(e),y=(null==a?void 0:a.liveVideo)||!1,E=(null==a||null===(d=a.res)||void 0===d?void 0:d.contentType)||"video",O=(null==a||null===(v=a.res)||void 0===v||null===(s=v[E])||void 0===s?void 0:s.isSSAIEnabled)||!1,I=h(null==a?void 0:a.res,e)||{};I.src;var A=(null==a?void 0:a.skin_settings)||{},P=(null==a||null===(c=a.customData)||void 0===c?void 0:c.ads)||{};if(y&&(null==a||!a.liveui)){var R,S=null==m||null===(R=m.controlBar)||void 0===R?void 0:R.getChild("LiveDisplay"),x=(null==S?void 0:S.el())||null,q=null==x?void 0:x.querySelector(".vjs-live-display");if(x&&q){var M,D,V=document.createElement("button");V.type="button",V.className="vjs-live-display",V.setAttribute("aria-label","live"),V.textContent="LIVE";var N=function(){try{var e;null==m||null===(e=m.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};V.addEventListener("click",N),q.replaceWith(V),S&&(S.contentEl_=V);var Q=live_button_el.querySelector(".vjs-live-display")||live_button_el,H=function(){var e,l,n,i=null===(e=null==m||null===(l=m.liveTracker)||void 0===l||null===(n=l.atLiveEdge)||void 0===n?void 0:n.call(l))||void 0===e||e;Q.classList.toggle("vjs-behind-live",!i)};null==m||null===(M=m.liveTracker)||void 0===M||null===(D=M.on)||void 0===D||D.call(M,"liveedgechange",H),H(),x.removeAttribute("tabindex"),x.removeAttribute("role"),x.removeAttribute("aria-label")}}null!=A&&A.skipBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)&&l(e,"VL_ONE",T());(null!=A&&A.rewindBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)||1==(null==a?void 0:a.liveui))&&n(e,"VL_ONE",k());var F,U=g.get();(null==U||null===(p=U.content)||void 0===p?void 0:p.length)>0&&i(e,U);F=g.subscribe((function(l){var n,o,t=r(e);(null==t||null===(n=t.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(i(e,l),F&&F())})),null!=a&&null!==(f=a.series)&&void 0!==f&&f.enable&&o(e,a);(null==a||null===(b=a.streams)||void 0===b?void 0:b.length)>1&&t(e,null==a?void 0:a.streams);if(u(e,a),j(e,a),O&&y&&"TRANSMIT"==(null==P?void 0:P.liveAdSticherProvider)&&!(null==P||!P.liveAdClientSideTracking))w(e,a);else if("MEDIA_TAILOR"==(null==P?void 0:P.vodAdSticherProvider)&&null!=P&&P.vodAdClientSideTracking&&O)if(y)_(e);else{var G,K=null;if(null!=a&&null!==(G=a.series)&&void 0!==G&&G.enable){var Y,$,z,J,W,X=null===(Y=L())||void 0===Y||null===($=Y.video)||void 0===$||null===(z=$.gist)||void 0===z?void 0:z.id,Z=B(),ee=(null==Z?void 0:Z.get(X))||{t:0,p:0},le=ee.t,ne=ee.p;"function"==typeof(null===(J=window)||void 0===J||null===(W=J.watchHistory)||void 0===W?void 0:W.cb)&&window.watchHistory.cb({watchedTime:le}),ne<95&&(K=le)}else{var ie=a.watchHistoryResumeTime;a.watchedPercentage<95&&(K=ie)}C(e,K)}}(v,c),q(v,c)}var q=function(e,l){var n,i,o,t,a,u,d,v,s,c,p,b,m=r(e),y=(null==l?void 0:l.theme)||{},g=f.dom.$(".vjs-play-progress"),h=f.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(u=a.primary)||void 0===u?void 0:u.backgroundColor)),g&&(g.style.background="".concat(null===(d=window)||void 0===d||null===(v=d.app_data)||void 0===v||null===(s=v.appcmsMain)||void 0===s||null===(c=s.brand)||void 0===c||null===(p=c.cta)||void 0===p||null===(b=p.primary)||void 0===b?void 0:b.backgroundColor));var j=m.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&g&&(g.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{x as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,R as r}from"./generic-
|
|
1
|
+
import{Q as e,R as r}from"./generic-6c14b09e.js";import{g as t}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):r(o)}))},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
|