@gcorevideo/player 2.25.9 → 2.26.0
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/dist/core.js +23 -78
- package/dist/index.css +1193 -1193
- package/dist/index.embed.js +89 -153
- package/dist/index.js +112 -249
- package/dist/player.d.ts +2798 -2785
- package/docs/api/player.bigmutebutton.md +0 -3
- package/docs/api/player.bottomgear.additem.md +0 -3
- package/docs/api/player.bottomgear.md +2 -5
- package/docs/api/player.bottomgear.refresh.md +0 -3
- package/docs/api/player.clapprstats._constructor_.md +0 -3
- package/docs/api/player.clapprstats.clearmetrics.md +0 -3
- package/docs/api/player.clapprstats.exportmetrics.md +1 -4
- package/docs/api/player.clapprstats.md +2 -7
- package/docs/api/player.clapprstatsbitratetrack.md +0 -3
- package/docs/api/player.clapprstatschronograph.md +0 -13
- package/docs/api/player.clapprstatscounter.md +0 -25
- package/docs/api/player.clapprstatsevents.md +1 -4
- package/docs/api/player.clapprstatsmetrics.md +0 -3
- package/docs/api/player.clapprstatssettings.md +1 -4
- package/docs/api/player.clapprstatssettings.runeach.md +0 -3
- package/docs/api/player.clicktopause.md +0 -3
- package/docs/api/player.clips.destroy.md +0 -3
- package/docs/api/player.clips.disable.md +0 -3
- package/docs/api/player.clips.enable.md +0 -3
- package/docs/api/player.clips.gettext.md +0 -3
- package/docs/api/player.clips.md +1 -16
- package/docs/api/player.clips.render.md +0 -3
- package/docs/api/player.clips.supportedversion.md +0 -3
- package/docs/api/player.clips.version.md +0 -3
- package/docs/api/player.clipspluginsettings.md +1 -4
- package/docs/api/player.clipspluginsettings.text.md +0 -3
- package/docs/api/player.closedcaptions.hide.md +0 -3
- package/docs/api/player.closedcaptions.md +6 -5
- package/docs/api/player.closedcaptions.show.md +0 -3
- package/docs/api/player.closedcaptionspluginsettings.md +0 -3
- package/docs/api/player.cmcdconfig._constructor_.md +0 -3
- package/docs/api/player.cmcdconfig.exportids.md +0 -3
- package/docs/api/player.cmcdconfig.md +2 -5
- package/docs/api/player.cmcdconfigoptions.contentid.md +0 -3
- package/docs/api/player.cmcdconfigoptions.md +2 -5
- package/docs/api/player.cmcdconfigoptions.sessionid.md +0 -3
- package/docs/api/player.dvrcontrols.md +0 -3
- package/docs/api/player.extendedevents.md +0 -7
- package/docs/api/player.favicon.md +0 -3
- package/docs/api/player.faviconpluginsettings.faviconcolor.md +0 -3
- package/docs/api/player.faviconpluginsettings.md +1 -4
- package/docs/api/player.gearevents.md +1 -4
- package/docs/api/player.md +24 -43
- package/docs/api/player.mediacontrol.defaultsettings.md +5 -1
- package/docs/api/player.mediacontrol.getavailablepopupheight.md +20 -0
- package/docs/api/player.mediacontrol.md +14 -0
- package/docs/api/player.menuoption.md +0 -3
- package/docs/api/player.nerdstats._constructor_.md +0 -3
- package/docs/api/player.nerdstats.md +1 -4
- package/docs/api/player.pictureinpicture.attributes.md +0 -3
- package/docs/api/player.pictureinpicture.md +2 -7
- package/docs/api/player.playbackrateoption.md +0 -3
- package/docs/api/player.playbackratesettings.md +0 -3
- package/docs/api/player.poster.disable.md +0 -3
- package/docs/api/player.poster.enable.md +0 -3
- package/docs/api/player.poster.md +2 -5
- package/docs/api/player.posterpluginsettings.custom.md +0 -3
- package/docs/api/player.posterpluginsettings.md +4 -7
- package/docs/api/player.posterpluginsettings.showfornoop.md +0 -3
- package/docs/api/player.posterpluginsettings.showonvideoend.md +0 -3
- package/docs/api/player.posterpluginsettings.url.md +0 -3
- package/docs/api/player.qualitylevels.events.md +0 -3
- package/docs/api/player.qualitylevels.md +0 -5
- package/docs/api/player.qualitylevelspluginsettings.labels.md +0 -3
- package/docs/api/player.qualitylevelspluginsettings.md +2 -5
- package/docs/api/player.qualitylevelspluginsettings.restrictresolution.md +0 -3
- package/docs/api/player.skiptime.container.md +0 -3
- package/docs/api/player.skiptime.md +0 -9
- package/docs/api/player.skiptime.name.md +0 -3
- package/docs/api/player.skiptime.supportedversion.md +0 -3
- package/docs/api/player.volumefadeevents.md +0 -5
- package/docs/api/player.volumefadesettings.md +0 -3
- package/docs/api/player.zeptoresult.md +0 -3
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +0 -29
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +0 -18
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +0 -10
- package/lib/playback/hls-playback/HlsPlayback.d.ts +0 -1
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +22 -20
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +1 -3
- package/lib/plugins/bottom-gear/BottomGear.d.ts +2 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +4 -8
- package/lib/plugins/clappr-nerd-stats/NerdStats.d.ts +1 -1
- package/lib/plugins/clappr-nerd-stats/NerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/NerdStats.js +3 -5
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +3 -3
- package/lib/plugins/clappr-stats/ClapprStats.js +2 -2
- package/lib/plugins/clappr-stats/types.d.ts +5 -5
- package/lib/plugins/clappr-stats/types.js +3 -3
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +3 -7
- package/lib/plugins/clips/Clips.d.ts +2 -2
- package/lib/plugins/clips/Clips.d.ts.map +1 -1
- package/lib/plugins/clips/Clips.js +2 -6
- package/lib/plugins/cmcd-config/CmcdConfig.d.ts +2 -2
- package/lib/plugins/cmcd-config/CmcdConfig.js +1 -1
- package/lib/plugins/context-menu/ContextMenu.d.ts +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +3 -4
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +0 -3
- package/lib/plugins/favicon/Favicon.d.ts +2 -2
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/level-selector/QualityLevels.d.ts +2 -2
- package/lib/plugins/level-selector/QualityLevels.d.ts.map +1 -1
- package/lib/plugins/level-selector/QualityLevels.js +3 -11
- package/lib/plugins/media-control/MediaControl.d.ts +2 -5
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +4 -6
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +3 -3
- package/lib/plugins/picture-in-picture/PictureInPicture.js +3 -3
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +2 -2
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +0 -10
- package/lib/plugins/poster/Poster.d.ts +2 -2
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +3 -19
- package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -1
- package/lib/plugins/seek-time/SeekTime.js +1 -6
- package/lib/plugins/skip-time/SkipTime.d.ts +1 -1
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
- package/lib/plugins/skip-time/SkipTime.js +3 -15
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +0 -5
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +2 -18
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +10 -2
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +12 -2
- package/lib/plugins/volume-fade/VolumeFade.d.ts +2 -2
- package/lib/plugins/volume-fade/VolumeFade.js +1 -1
- package/lib/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/Player.ts +0 -30
- package/src/playback/HTML5Video.ts +0 -18
- package/src/playback/dash-playback/DashPlayback.ts +0 -11
- package/src/playback/hls-playback/HlsPlayback.ts +22 -29
- package/src/plugins/big-mute-button/BigMuteButton.ts +1 -4
- package/src/plugins/bottom-gear/BottomGear.ts +4 -8
- package/src/plugins/clappr-nerd-stats/NerdStats.ts +3 -5
- package/src/plugins/clappr-stats/ClapprStats.ts +3 -3
- package/src/plugins/clappr-stats/types.ts +5 -5
- package/src/plugins/click-to-pause/ClickToPause.ts +3 -8
- package/src/plugins/clips/Clips.ts +4 -7
- package/src/plugins/cmcd-config/CmcdConfig.ts +2 -2
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +3 -4
- package/src/plugins/error-screen/ErrorScreen.ts +0 -3
- package/src/plugins/favicon/Favicon.ts +2 -2
- package/src/plugins/level-selector/QualityLevels.ts +4 -12
- package/src/plugins/media-control/MediaControl.ts +4 -10
- package/src/plugins/picture-in-picture/PictureInPicture.ts +3 -3
- package/src/plugins/playback-rate/PlaybackRate.ts +2 -14
- package/src/plugins/poster/Poster.ts +4 -21
- package/src/plugins/seek-time/SeekTime.ts +2 -6
- package/src/plugins/skip-time/SkipTime.ts +3 -15
- package/src/plugins/source-controller/SourceController.ts +0 -5
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +2 -18
- package/src/plugins/subtitles/ClosedCaptions.ts +13 -3
- package/src/plugins/volume-fade/VolumeFade.ts +2 -2
- package/src/types.ts +1 -1
- package/temp/player.api.json +157 -152
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.mediacontrolpluginsettings.md +0 -13
package/dist/index.js
CHANGED
|
@@ -12680,7 +12680,7 @@ var PlaybackEvents;
|
|
|
12680
12680
|
// https://github.com/clappr/clappr/blob/8752995ea439321ac7ca3cd35e8c64de7a3c3d17/LICENSE
|
|
12681
12681
|
const AUTO$1 = -1;
|
|
12682
12682
|
const { now: now$2 } = Utils;
|
|
12683
|
-
const T$
|
|
12683
|
+
const T$d = 'playback.dash';
|
|
12684
12684
|
class DashPlayback extends BasePlayback {
|
|
12685
12685
|
_levels = null;
|
|
12686
12686
|
_currentLevel = null;
|
|
@@ -12954,10 +12954,9 @@ class DashPlayback extends BasePlayback {
|
|
|
12954
12954
|
}
|
|
12955
12955
|
_onPlaybackError = (event) => {
|
|
12956
12956
|
// TODO
|
|
12957
|
-
trace(`${T$
|
|
12957
|
+
trace(`${T$d} _onPlaybackError`, { event });
|
|
12958
12958
|
};
|
|
12959
12959
|
_onDASHJSSError = (event) => {
|
|
12960
|
-
trace(`${T$o} _onDASHJSSError`, { event });
|
|
12961
12960
|
this._stopTimeUpdateTimer();
|
|
12962
12961
|
// Note that the other error types are deprecated
|
|
12963
12962
|
const e = event.error;
|
|
@@ -12992,7 +12991,6 @@ class DashPlayback extends BasePlayback {
|
|
|
12992
12991
|
}
|
|
12993
12992
|
};
|
|
12994
12993
|
triggerError(error) {
|
|
12995
|
-
trace(`${T$o} triggerError`, { error });
|
|
12996
12994
|
// this triggers Events.ERROR to be handled by the UI
|
|
12997
12995
|
this.trigger(Events$1.PLAYBACK_ERROR, this.createError(error, {
|
|
12998
12996
|
useCodePrefix: false,
|
|
@@ -13031,14 +13029,8 @@ class DashPlayback extends BasePlayback {
|
|
|
13031
13029
|
}
|
|
13032
13030
|
get dvrEnabled() {
|
|
13033
13031
|
if (!this._dash) {
|
|
13034
|
-
trace(`${T$o} dvrEnable no dash player instance`);
|
|
13035
13032
|
return false;
|
|
13036
13033
|
}
|
|
13037
|
-
trace(`${T$o} get.dvrEnabled`, {
|
|
13038
|
-
dvrWindowSize: this._dash?.getDVRWindowSize(),
|
|
13039
|
-
minDvrSize: this._minDvrSize,
|
|
13040
|
-
playbackType: this.getPlaybackType(),
|
|
13041
|
-
});
|
|
13042
13034
|
return (this._dash?.getDVRWindowSize() >= this._minDvrSize &&
|
|
13043
13035
|
this.getPlaybackType() === Playback.LIVE);
|
|
13044
13036
|
}
|
|
@@ -13056,7 +13048,6 @@ class DashPlayback extends BasePlayback {
|
|
|
13056
13048
|
this.trigger(Events$1.PLAYBACK_PROGRESS, progress, {});
|
|
13057
13049
|
}
|
|
13058
13050
|
play() {
|
|
13059
|
-
trace(`${T$o} play`, { dash: !!this._dash });
|
|
13060
13051
|
!this._dash && this._setup();
|
|
13061
13052
|
super.play();
|
|
13062
13053
|
this._startTimeUpdateTimer();
|
|
@@ -13142,7 +13133,6 @@ class DashPlayback extends BasePlayback {
|
|
|
13142
13133
|
}
|
|
13143
13134
|
// @ts-expect-error
|
|
13144
13135
|
get currentAudioTrack() {
|
|
13145
|
-
trace(`${T$o} get currentAudioTrack`);
|
|
13146
13136
|
assert.ok(this._dash, 'DASH.js MediaPlayer is not initialized');
|
|
13147
13137
|
const t = this._dash.getCurrentTrackFor('audio');
|
|
13148
13138
|
if (!t) {
|
|
@@ -41850,7 +41840,7 @@ const AUTO = -1;
|
|
|
41850
41840
|
const DEFAULT_RECOVER_ATTEMPTS = 16;
|
|
41851
41841
|
Events$1.register('PLAYBACK_FRAGMENT_CHANGED');
|
|
41852
41842
|
Events$1.register('PLAYBACK_FRAGMENT_PARSING_METADATA');
|
|
41853
|
-
const T$
|
|
41843
|
+
const T$c = 'playback.hls';
|
|
41854
41844
|
class HlsPlayback extends BasePlayback {
|
|
41855
41845
|
_ccIsSetup = false;
|
|
41856
41846
|
_ccTracksUpdated = false;
|
|
@@ -42082,7 +42072,6 @@ class HlsPlayback extends BasePlayback {
|
|
|
42082
42072
|
maxMaxBufferLength: 4,
|
|
42083
42073
|
autoStartLoad: false,
|
|
42084
42074
|
}, this.options.playback.hlsjsConfig);
|
|
42085
|
-
trace(`${T$n} _createHLSInstance`, { config });
|
|
42086
42075
|
this._hls = new Hls(config);
|
|
42087
42076
|
}
|
|
42088
42077
|
_attachHLSMedia() {
|
|
@@ -42124,9 +42113,9 @@ class HlsPlayback extends BasePlayback {
|
|
|
42124
42113
|
this._hls.on(Hls.Events.FRAG_LOADED, (evt, data) => this._onFragmentLoaded(evt, data));
|
|
42125
42114
|
this._hls.on(Hls.Events.FRAG_PARSING_METADATA, (evt, data) => this._onFragmentParsingMetadata(evt, data));
|
|
42126
42115
|
this._hls.on(Hls.Events.ERROR, (evt, data) => this._onHLSJSError(evt, data));
|
|
42127
|
-
// this._hls.on(HLSJS.Events.SUBTITLE_TRACK_LOADED, (
|
|
42128
|
-
this.
|
|
42129
|
-
|
|
42116
|
+
// this._hls.on(HLSJS.Events.SUBTITLE_TRACK_LOADED, () =>
|
|
42117
|
+
// this._onSubtitleLoaded(),
|
|
42118
|
+
// )
|
|
42130
42119
|
this._hls.on(Events.AUDIO_TRACKS_UPDATED, (evt, data) => this._onAudioTracksUpdated(evt, data));
|
|
42131
42120
|
this._hls.on(Events.AUDIO_TRACK_SWITCHED, (evt, data) => this._onAudioTrackSwitched(evt, data));
|
|
42132
42121
|
this.bindCustomListeners();
|
|
@@ -42175,7 +42164,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42175
42164
|
}
|
|
42176
42165
|
else {
|
|
42177
42166
|
Log.error('hlsjs: failed to recover', { evt, data });
|
|
42178
|
-
trace(`${T$
|
|
42167
|
+
trace(`${T$c} _recover failed to recover`, {
|
|
42179
42168
|
type: data.type,
|
|
42180
42169
|
details: data.details,
|
|
42181
42170
|
});
|
|
@@ -42261,7 +42250,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42261
42250
|
this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
|
|
42262
42251
|
}
|
|
42263
42252
|
_onHLSJSError(evt, data) {
|
|
42264
|
-
trace(`${T$
|
|
42253
|
+
trace(`${T$c} _onHLSJSError`, {
|
|
42265
42254
|
fatal: data.fatal,
|
|
42266
42255
|
type: data.type,
|
|
42267
42256
|
details: data.details,
|
|
@@ -42309,7 +42298,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42309
42298
|
evt,
|
|
42310
42299
|
data,
|
|
42311
42300
|
});
|
|
42312
|
-
trace(`${T$
|
|
42301
|
+
trace(`${T$c} _onHLSJSError trying to recover from network error`, {
|
|
42313
42302
|
details: data.details,
|
|
42314
42303
|
});
|
|
42315
42304
|
error.level = PlayerError.Levels.WARN;
|
|
@@ -42322,7 +42311,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42322
42311
|
evt,
|
|
42323
42312
|
data,
|
|
42324
42313
|
});
|
|
42325
|
-
trace(`${T$
|
|
42314
|
+
trace(`${T$c} _onHLSJSError trying to recover from media error`, {
|
|
42326
42315
|
details: data.details,
|
|
42327
42316
|
});
|
|
42328
42317
|
error.level = PlayerError.Levels.WARN;
|
|
@@ -42352,7 +42341,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42352
42341
|
return;
|
|
42353
42342
|
}
|
|
42354
42343
|
Log.warn('hlsjs: non-fatal error occurred', { evt, data });
|
|
42355
|
-
trace(`${T$
|
|
42344
|
+
trace(`${T$c} _onHLSJSError non-fatal error occurred`, {
|
|
42356
42345
|
type: data.type,
|
|
42357
42346
|
details: data.details,
|
|
42358
42347
|
});
|
|
@@ -42456,11 +42445,13 @@ class HlsPlayback extends BasePlayback {
|
|
|
42456
42445
|
this._playbackType = (data.details.live ? Playback.LIVE : Playback.VOD);
|
|
42457
42446
|
this._onLevelUpdated(evt, data);
|
|
42458
42447
|
// Live stream subtitle tracks detection hack (may not immediately available)
|
|
42459
|
-
if (
|
|
42460
|
-
|
|
42461
|
-
|
|
42462
|
-
|
|
42463
|
-
|
|
42448
|
+
// if (
|
|
42449
|
+
// this._ccTracksUpdated &&
|
|
42450
|
+
// this._playbackType === Playback.LIVE &&
|
|
42451
|
+
// this.hasClosedCaptionsTracks
|
|
42452
|
+
// ) {
|
|
42453
|
+
// this._onSubtitleLoaded()
|
|
42454
|
+
// }
|
|
42464
42455
|
if (prevPlaybackType !== this._playbackType) {
|
|
42465
42456
|
this._updateSettings();
|
|
42466
42457
|
}
|
|
@@ -42613,16 +42604,18 @@ class HlsPlayback extends BasePlayback {
|
|
|
42613
42604
|
_onFragmentLoaded(evt, data) {
|
|
42614
42605
|
this.trigger(Events$1.PLAYBACK_FRAGMENT_LOADED, data);
|
|
42615
42606
|
}
|
|
42616
|
-
_onSubtitleLoaded() {
|
|
42617
|
-
|
|
42618
|
-
|
|
42619
|
-
|
|
42620
|
-
|
|
42621
|
-
|
|
42622
|
-
|
|
42623
|
-
|
|
42624
|
-
|
|
42625
|
-
|
|
42607
|
+
// _onSubtitleLoaded() {
|
|
42608
|
+
// trace(`${T} _onSubtitleLoaded`)
|
|
42609
|
+
// // This event may be triggered multiple times
|
|
42610
|
+
// // Setup CC only once (disable CC by default)
|
|
42611
|
+
// if (!this._ccIsSetup) {
|
|
42612
|
+
// this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)
|
|
42613
|
+
// const trackId =
|
|
42614
|
+
// this._playbackType === Playback.LIVE ? -1 : this.closedCaptionsTrackId
|
|
42615
|
+
// this.closedCaptionsTrackId = trackId
|
|
42616
|
+
// this._ccIsSetup = true
|
|
42617
|
+
// }
|
|
42618
|
+
// }
|
|
42626
42619
|
_onLevelSwitch(evt, data) {
|
|
42627
42620
|
if (!this.levels.length) {
|
|
42628
42621
|
this._fillLevels();
|
|
@@ -42686,11 +42679,10 @@ class HlsPlayback extends BasePlayback {
|
|
|
42686
42679
|
this._hls.audioTrack = Number(id); // TODO or find index by .id == id?
|
|
42687
42680
|
}
|
|
42688
42681
|
_onAudioTracksUpdated(_, data) {
|
|
42689
|
-
trace(`${T$n} onAudioTracksUpdated`);
|
|
42690
42682
|
this.trigger(Events$1.PLAYBACK_AUDIO_AVAILABLE, data.audioTracks.map(toClapprTrack));
|
|
42691
42683
|
}
|
|
42692
42684
|
_onAudioTrackSwitched(_, data) {
|
|
42693
|
-
trace(`${T$
|
|
42685
|
+
trace(`${T$c} onAudioTrackSwitched`);
|
|
42694
42686
|
// @ts-ignore
|
|
42695
42687
|
const track = this._hls.audioTracks[data.id];
|
|
42696
42688
|
this.trigger(Events$1.PLAYBACK_AUDIO_CHANGED, toClapprTrack(track));
|
|
@@ -42711,7 +42703,7 @@ function toClapprTrack(t) {
|
|
|
42711
42703
|
};
|
|
42712
42704
|
}
|
|
42713
42705
|
|
|
42714
|
-
const T$
|
|
42706
|
+
const T$b = 'playback.html5_video';
|
|
42715
42707
|
const STALL_TIMEOUT = 15000;
|
|
42716
42708
|
class HTML5Video extends BasePlayback {
|
|
42717
42709
|
stallTimerId = null;
|
|
@@ -42719,9 +42711,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42719
42711
|
* @internal
|
|
42720
42712
|
*/
|
|
42721
42713
|
createError(errorData, options) {
|
|
42722
|
-
trace(`${T$m} createError`, {
|
|
42723
|
-
errorData: { ...errorData },
|
|
42724
|
-
});
|
|
42725
42714
|
const i18n = this.i18n ||
|
|
42726
42715
|
// @ts-ignore
|
|
42727
42716
|
(this.core && this.core.i18n) ||
|
|
@@ -42735,11 +42724,9 @@ class HTML5Video extends BasePlayback {
|
|
|
42735
42724
|
return super.createError(errorData, { ...options, useCodePrefix: false });
|
|
42736
42725
|
}
|
|
42737
42726
|
_onWaiting() {
|
|
42738
|
-
trace(`${T$m} _onWaiting`);
|
|
42739
42727
|
super._onWaiting();
|
|
42740
42728
|
}
|
|
42741
42729
|
_onEnded() {
|
|
42742
|
-
trace(`${T$m} _onEnded`);
|
|
42743
42730
|
if (this.stallTimerId) {
|
|
42744
42731
|
clearTimeout(this.stallTimerId);
|
|
42745
42732
|
this.stallTimerId = null;
|
|
@@ -42747,15 +42734,8 @@ class HTML5Video extends BasePlayback {
|
|
|
42747
42734
|
super._onEnded();
|
|
42748
42735
|
}
|
|
42749
42736
|
_handleBufferingEvents() {
|
|
42750
|
-
trace(`${T$m} _handleBufferingEvents`, {
|
|
42751
|
-
networkState: this.el.networkState,
|
|
42752
|
-
});
|
|
42753
42737
|
if (!this.stallTimerId) {
|
|
42754
42738
|
this.stallTimerId = setTimeout(() => {
|
|
42755
|
-
trace(`${T$m} _handleBufferingEvents stall timeout`, {
|
|
42756
|
-
buffering: this.buffering,
|
|
42757
|
-
ended: this.ended,
|
|
42758
|
-
});
|
|
42759
42739
|
this.stallTimerId = null;
|
|
42760
42740
|
const error = this.createError({
|
|
42761
42741
|
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
@@ -42770,7 +42750,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42770
42750
|
super._handleBufferingEvents();
|
|
42771
42751
|
}
|
|
42772
42752
|
_onPlaying() {
|
|
42773
|
-
trace(`${T$m} _onPlaying`);
|
|
42774
42753
|
if (this.stallTimerId) {
|
|
42775
42754
|
clearTimeout(this.stallTimerId);
|
|
42776
42755
|
this.stallTimerId = null;
|
|
@@ -42778,7 +42757,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42778
42757
|
super._onPlaying();
|
|
42779
42758
|
}
|
|
42780
42759
|
_onPause() {
|
|
42781
|
-
trace(`${T$m} _onPause`);
|
|
42782
42760
|
super._onPause();
|
|
42783
42761
|
if (this.stallTimerId) {
|
|
42784
42762
|
clearTimeout(this.stallTimerId);
|
|
@@ -42788,7 +42766,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42788
42766
|
get audioTracks() {
|
|
42789
42767
|
const tracks = this.el.audioTracks;
|
|
42790
42768
|
const supported = !!tracks;
|
|
42791
|
-
trace(`${T$m} get audioTracks`, { supported });
|
|
42792
42769
|
const retval = [];
|
|
42793
42770
|
if (supported) {
|
|
42794
42771
|
for (let i = 0; i < tracks.length; i++) {
|
|
@@ -42807,9 +42784,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42807
42784
|
get currentAudioTrack() {
|
|
42808
42785
|
const tracks = this.el.audioTracks;
|
|
42809
42786
|
const supported = !!tracks;
|
|
42810
|
-
trace(`${T$m} get currentAudioTrack`, {
|
|
42811
|
-
supported,
|
|
42812
|
-
});
|
|
42813
42787
|
if (supported) {
|
|
42814
42788
|
for (let i = 0; i < tracks.length; i++) {
|
|
42815
42789
|
const track = tracks[i];
|
|
@@ -42828,7 +42802,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42828
42802
|
switchAudioTrack(id) {
|
|
42829
42803
|
const tracks = this.el.audioTracks;
|
|
42830
42804
|
const supported = !!tracks;
|
|
42831
|
-
trace(`${T$
|
|
42805
|
+
trace(`${T$b} switchAudioTrack`, {
|
|
42832
42806
|
supported,
|
|
42833
42807
|
});
|
|
42834
42808
|
if (supported) {
|
|
@@ -42847,7 +42821,7 @@ function registerPlaybacks() {
|
|
|
42847
42821
|
Loader.registerPlayback(DashPlayback);
|
|
42848
42822
|
}
|
|
42849
42823
|
|
|
42850
|
-
const T$
|
|
42824
|
+
const T$a = 'gplayer';
|
|
42851
42825
|
const DEFAULT_OPTIONS = {
|
|
42852
42826
|
autoPlay: false,
|
|
42853
42827
|
debug: 'none',
|
|
@@ -42935,9 +42909,6 @@ class Player {
|
|
|
42935
42909
|
* ```
|
|
42936
42910
|
*/
|
|
42937
42911
|
attachTo(playerElement) {
|
|
42938
|
-
trace(`${T$l} attachTo`, {
|
|
42939
|
-
player: !!this.player,
|
|
42940
|
-
});
|
|
42941
42912
|
assert.ok(!this.player, 'Player already initialized');
|
|
42942
42913
|
assert.ok(playerElement, 'Player container element is required');
|
|
42943
42914
|
if (this.config.debug === 'all' || this.config.debug === 'clappr') {
|
|
@@ -42945,9 +42916,6 @@ class Player {
|
|
|
42945
42916
|
}
|
|
42946
42917
|
const coreOpts = this.buildCoreOptions(playerElement);
|
|
42947
42918
|
const { core, container } = Player.getRegisteredPlugins();
|
|
42948
|
-
trace(`${T$l} init`, {
|
|
42949
|
-
registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.prototype.name),
|
|
42950
|
-
});
|
|
42951
42919
|
coreOpts.plugins = {
|
|
42952
42920
|
core: Object.values(core),
|
|
42953
42921
|
container: Object.values(container),
|
|
@@ -42959,9 +42927,6 @@ class Player {
|
|
|
42959
42927
|
* Destroys the player, releasing all resources and unmounting its UI from the DOM.
|
|
42960
42928
|
*/
|
|
42961
42929
|
destroy() {
|
|
42962
|
-
trace(`${T$l} destroy`, {
|
|
42963
|
-
player: !!this.player,
|
|
42964
|
-
});
|
|
42965
42930
|
if (this.player) {
|
|
42966
42931
|
this.player.destroy();
|
|
42967
42932
|
this.player = null;
|
|
@@ -43146,12 +43111,6 @@ class Player {
|
|
|
43146
43111
|
this.config = $.extend(true, this.config, config);
|
|
43147
43112
|
}
|
|
43148
43113
|
initPlayer(coreOptions) {
|
|
43149
|
-
trace(`${T$l} initPlayer`, {
|
|
43150
|
-
autoPlay: coreOptions.autoPlay,
|
|
43151
|
-
sources: coreOptions.sources,
|
|
43152
|
-
player: !!this.player,
|
|
43153
|
-
// TODO selected options
|
|
43154
|
-
});
|
|
43155
43114
|
const player = new Player$1(coreOptions);
|
|
43156
43115
|
this.player = player;
|
|
43157
43116
|
this.bindCoreListeners();
|
|
@@ -43171,7 +43130,7 @@ class Player {
|
|
|
43171
43130
|
}
|
|
43172
43131
|
}
|
|
43173
43132
|
triggerAutoPlay() {
|
|
43174
|
-
trace(`${T$
|
|
43133
|
+
trace(`${T$a} triggerAutoPlay`);
|
|
43175
43134
|
setTimeout(() => {
|
|
43176
43135
|
this.player?.play({
|
|
43177
43136
|
autoPlay: true,
|
|
@@ -43189,7 +43148,7 @@ class Player {
|
|
|
43189
43148
|
// TODO test
|
|
43190
43149
|
events = {
|
|
43191
43150
|
onReady: () => {
|
|
43192
|
-
trace(`${T$
|
|
43151
|
+
trace(`${T$a} onReady`, {
|
|
43193
43152
|
ready: this.ready,
|
|
43194
43153
|
});
|
|
43195
43154
|
if (this.ready) {
|
|
@@ -43223,7 +43182,7 @@ class Player {
|
|
|
43223
43182
|
buildCoreOptions(rootNode) {
|
|
43224
43183
|
const sources = this.buildMediaSourcesList();
|
|
43225
43184
|
const source = sources[0];
|
|
43226
|
-
trace(`${T$
|
|
43185
|
+
trace(`${T$a} buildCoreOptions`, {
|
|
43227
43186
|
source,
|
|
43228
43187
|
sources,
|
|
43229
43188
|
});
|
|
@@ -43284,13 +43243,6 @@ class Player {
|
|
|
43284
43243
|
assert.ok(this.player, 'Player is not initialized');
|
|
43285
43244
|
const core = this.player.core;
|
|
43286
43245
|
core.on(Events$1.CORE_SCREEN_ORIENTATION_CHANGED, ({ orientation }) => {
|
|
43287
|
-
trace(`${T$l} on CORE_SCREEN_ORIENTATION_CHANGED`, {
|
|
43288
|
-
orientation,
|
|
43289
|
-
rootNode: {
|
|
43290
|
-
width: this.rootNode?.clientWidth,
|
|
43291
|
-
height: this.rootNode?.clientHeight,
|
|
43292
|
-
},
|
|
43293
|
-
});
|
|
43294
43246
|
if (Browser.isiOS && this.rootNode) {
|
|
43295
43247
|
core?.resize({
|
|
43296
43248
|
width: this.rootNode.clientWidth,
|
|
@@ -43299,22 +43251,15 @@ class Player {
|
|
|
43299
43251
|
}
|
|
43300
43252
|
}, null);
|
|
43301
43253
|
core.on(Events$1.CORE_RESIZE, ({ width, height }) => {
|
|
43302
|
-
trace(`${T$l} on CORE_RESIZE`, {
|
|
43303
|
-
width,
|
|
43304
|
-
height,
|
|
43305
|
-
});
|
|
43306
43254
|
this.safeTriggerEvent(PlayerEvent.Resize, { width, height });
|
|
43307
43255
|
}, null);
|
|
43308
43256
|
core.on(Events$1.CORE_FULLSCREEN, (isFullscreen) => {
|
|
43309
|
-
trace(`${T$l} CORE_FULLSCREEN`, {
|
|
43310
|
-
isFullscreen,
|
|
43311
|
-
});
|
|
43312
43257
|
this.safeTriggerEvent(PlayerEvent.Fullscreen, isFullscreen);
|
|
43313
43258
|
}, null);
|
|
43314
43259
|
}
|
|
43315
43260
|
}
|
|
43316
43261
|
|
|
43317
|
-
var version$1 = "2.
|
|
43262
|
+
var version$1 = "2.26.0";
|
|
43318
43263
|
|
|
43319
43264
|
var packages = {
|
|
43320
43265
|
"node_modules/@clappr/core": {
|
|
@@ -43650,10 +43595,10 @@ const INITIAL_SETTINGS = {
|
|
|
43650
43595
|
default: [],
|
|
43651
43596
|
seekEnabled: false,
|
|
43652
43597
|
};
|
|
43653
|
-
const T
|
|
43598
|
+
// const T = 'plugins.media_control'
|
|
43654
43599
|
/**
|
|
43655
43600
|
* Extended events for the {@link MediaControl} plugin
|
|
43656
|
-
* @
|
|
43601
|
+
* @public
|
|
43657
43602
|
*/
|
|
43658
43603
|
var ExtendedEvents;
|
|
43659
43604
|
(function (ExtendedEvents) {
|
|
@@ -43737,7 +43682,7 @@ class MediaControl extends UICorePlugin {
|
|
|
43737
43682
|
}
|
|
43738
43683
|
/**
|
|
43739
43684
|
* @returns Default media control layout settings
|
|
43740
|
-
* @
|
|
43685
|
+
* @remarks
|
|
43741
43686
|
* The method can be used to change the default dashboard layout, for example, removing the standard UI elements
|
|
43742
43687
|
* @example
|
|
43743
43688
|
* ```ts
|
|
@@ -43932,7 +43877,6 @@ class MediaControl extends UICorePlugin {
|
|
|
43932
43877
|
* Hides the media control UI
|
|
43933
43878
|
*/
|
|
43934
43879
|
disable() {
|
|
43935
|
-
trace(`${T$k} disable`);
|
|
43936
43880
|
this.userDisabled = true; // TODO distinguish between user and system (e.g., unplayable) disabled?
|
|
43937
43881
|
this.hide();
|
|
43938
43882
|
this.unbindKeyEvents();
|
|
@@ -43942,7 +43886,6 @@ class MediaControl extends UICorePlugin {
|
|
|
43942
43886
|
* Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
|
|
43943
43887
|
*/
|
|
43944
43888
|
enable() {
|
|
43945
|
-
trace(`${T$k} enable`);
|
|
43946
43889
|
if (this.options.chromeless) {
|
|
43947
43890
|
return;
|
|
43948
43891
|
}
|
|
@@ -45072,11 +45015,11 @@ class AudioTracks extends UICorePlugin {
|
|
|
45072
45015
|
|
|
45073
45016
|
const templateHtml$2 = "<div class=\"big-mute-icon-wrapper\" data-big-mute id=\"gplayer-big-mute-button\">\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon id=\"gplayer-big-mute-icon\"></div>\n</div>\n";
|
|
45074
45017
|
|
|
45075
|
-
const T$
|
|
45018
|
+
const T$9 = 'plugins.big_mute_button';
|
|
45076
45019
|
// TODO rewrite as a container plugin
|
|
45077
45020
|
/**
|
|
45078
45021
|
* `PLUGIN` that displays a big mute button over the video when it's being played muted.
|
|
45079
|
-
* @
|
|
45022
|
+
* @public
|
|
45080
45023
|
* @remarks
|
|
45081
45024
|
* When pressed, it unmutes the video.
|
|
45082
45025
|
* @example
|
|
@@ -45135,7 +45078,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45135
45078
|
if (autoPlay) {
|
|
45136
45079
|
this.autoPlay = true;
|
|
45137
45080
|
}
|
|
45138
|
-
trace(`${T$
|
|
45081
|
+
trace(`${T$9} onPlay`, {
|
|
45139
45082
|
autoPlay: this.autoPlay,
|
|
45140
45083
|
wasMuted,
|
|
45141
45084
|
volume,
|
|
@@ -45148,7 +45091,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45148
45091
|
}
|
|
45149
45092
|
}
|
|
45150
45093
|
onStop(_, { ui }) {
|
|
45151
|
-
trace(`${T$
|
|
45094
|
+
trace(`${T$9} onStop`, { ui });
|
|
45152
45095
|
if (ui) {
|
|
45153
45096
|
this.destroy();
|
|
45154
45097
|
}
|
|
@@ -45176,7 +45119,6 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45176
45119
|
* @internal
|
|
45177
45120
|
*/
|
|
45178
45121
|
render() {
|
|
45179
|
-
trace(`${T$j} render`);
|
|
45180
45122
|
this.$el.html(BigMuteButton.template());
|
|
45181
45123
|
this.$el.find('#gplayer-big-mute-icon').append(volumeMuteIcon);
|
|
45182
45124
|
// TODO
|
|
@@ -45196,7 +45138,6 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45196
45138
|
this.$el.find('#gplayer-big-mute-button')?.removeClass('hide');
|
|
45197
45139
|
}
|
|
45198
45140
|
clicked(e) {
|
|
45199
|
-
trace(`${T$j} clicked`);
|
|
45200
45141
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45201
45142
|
// TODO delegate to media_control plugin
|
|
45202
45143
|
const localVolume = Utils.Config.restore('volume');
|
|
@@ -45220,11 +45161,11 @@ const gearIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"n
|
|
|
45220
45161
|
const gearHdIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_28_1567)\">\n <path\n d=\"M19.14 12.94C19.18 12.64 19.2 12.33 19.2 12C19.2 11.68 19.18 11.36 19.13 11.06L21.16 9.47999C21.34 9.33999 21.39 9.06999 21.28 8.86999L19.36 5.54999C19.24 5.32999 18.99 5.25999 18.77 5.32999L16.38 6.28999C15.88 5.90999 15.35 5.58999 14.76 5.34999L14.4 2.80999C14.36 2.56999 14.16 2.39999 13.92 2.39999H10.08C9.83999 2.39999 9.64999 2.56999 9.60999 2.80999L9.24999 5.34999C8.65999 5.58999 8.11999 5.91999 7.62999 6.28999L5.23999 5.32999C5.01999 5.24999 4.76999 5.32999 4.64999 5.54999L2.73999 8.86999C2.61999 9.07999 2.65999 9.33999 2.85999 9.47999L4.88999 11.06C4.83999 11.36 4.79999 11.69 4.79999 12C4.79999 12.31 4.81999 12.64 4.86999 12.94L2.83999 14.52C2.65999 14.66 2.60999 14.93 2.71999 15.13L4.63999 18.45C4.75999 18.67 5.00999 18.74 5.22999 18.67L7.61999 17.71C8.11999 18.09 8.64999 18.41 9.23999 18.65L9.59999 21.19C9.64999 21.43 9.83999 21.6 10.08 21.6H13.92C14.16 21.6 14.36 21.43 14.39 21.19L14.75 18.65C15.34 18.41 15.88 18.09 16.37 17.71L18.76 18.67C18.98 18.75 19.23 18.67 19.35 18.45L21.27 15.13C21.39 14.91 21.34 14.66 21.15 14.52L19.14 12.94ZM12 15.6C10.02 15.6 8.39999 13.98 8.39999 12C8.39999 10.02 10.02 8.39999 12 8.39999C13.98 8.39999 15.6 10.02 15.6 12C15.6 13.98 13.98 15.6 12 15.6Z\"\n fill=\"#C9C9C9\"/>\n <rect x=\"13\" width=\"11\" height=\"7\" rx=\"1\" fill=\"#F6413B\"/>\n <path\n d=\"M14.6962 6V1.63636H15.3546V3.53267H17.53V1.63636H18.1905V6H17.53V4.0973H15.3546V6H14.6962ZM20.562 6H19.1493V1.63636H20.6067C21.0343 1.63636 21.4015 1.72372 21.7083 1.89844C22.0151 2.07173 22.2502 2.32102 22.4135 2.64631C22.5783 2.97017 22.6607 3.35866 22.6607 3.81179C22.6607 4.26634 22.5776 4.65696 22.4114 4.98366C22.2466 5.31037 22.008 5.56179 21.6955 5.73793C21.383 5.91264 21.0051 6 20.562 6ZM19.8077 5.42472H20.5257C20.8581 5.42472 21.1344 5.36222 21.3546 5.23722C21.5748 5.1108 21.7395 4.92827 21.8489 4.68963C21.9583 4.44957 22.013 4.15696 22.013 3.81179C22.013 3.46946 21.9583 3.17898 21.8489 2.94034C21.7409 2.7017 21.5797 2.5206 21.3652 2.39702C21.1507 2.27344 20.8844 2.21165 20.5662 2.21165H19.8077V5.42472Z\"\n fill=\"#C9C9C9\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_28_1567\">\n <rect width=\"24\" height=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n</svg>\n";
|
|
45221
45162
|
|
|
45222
45163
|
const VERSION$6 = '2.19.12';
|
|
45223
|
-
const T
|
|
45164
|
+
// const T = 'plugins.bottom_gear'
|
|
45224
45165
|
const MENU_BACKLINK_HEIGHT = 44;
|
|
45225
45166
|
/**
|
|
45226
45167
|
* Events triggered by the plugin
|
|
45227
|
-
* @
|
|
45168
|
+
* @public
|
|
45228
45169
|
*/
|
|
45229
45170
|
var GearEvents;
|
|
45230
45171
|
(function (GearEvents) {
|
|
@@ -45235,7 +45176,7 @@ var GearEvents;
|
|
|
45235
45176
|
})(GearEvents || (GearEvents = {}));
|
|
45236
45177
|
/**
|
|
45237
45178
|
* `PLUGIN` that adds a button to extend the media controls UI with extra options.
|
|
45238
|
-
* @
|
|
45179
|
+
* @public
|
|
45239
45180
|
* @remarks
|
|
45240
45181
|
* The plugin renders small gear icon to the right of the media controls.
|
|
45241
45182
|
* It provides a base for attaching custom settings UI in the gear menu
|
|
@@ -45371,14 +45312,12 @@ class BottomGear extends UICorePlugin {
|
|
|
45371
45312
|
addItem(name, $subMenu) {
|
|
45372
45313
|
const $existingItem = this.$el.find(`#gear-options li[data-${name}]`);
|
|
45373
45314
|
if ($existingItem.length) {
|
|
45374
|
-
trace(`${T$i} addItem already exists`, { name });
|
|
45375
45315
|
return $existingItem;
|
|
45376
45316
|
}
|
|
45377
45317
|
const $item = $('<li></li>')
|
|
45378
45318
|
.attr(`data-${name}`, '')
|
|
45379
45319
|
.appendTo(this.$el.find('#gear-options'));
|
|
45380
45320
|
if ($subMenu) {
|
|
45381
|
-
trace(`${T$i} addItem adding submenu`, { name });
|
|
45382
45321
|
$subMenu
|
|
45383
45322
|
.addClass('gear-sub-menu-wrapper')
|
|
45384
45323
|
.hide()
|
|
@@ -45401,7 +45340,6 @@ class BottomGear extends UICorePlugin {
|
|
|
45401
45340
|
});
|
|
45402
45341
|
}
|
|
45403
45342
|
highDefinitionUpdate(isHd) {
|
|
45404
|
-
trace(`${T$i} highDefinitionUpdate`, { isHd });
|
|
45405
45343
|
this.hd = isHd;
|
|
45406
45344
|
this.$el.find('#gear-button').html(isHd ? gearHdIcon : gearIcon);
|
|
45407
45345
|
}
|
|
@@ -45492,7 +45430,7 @@ class BottomGear extends UICorePlugin {
|
|
|
45492
45430
|
}
|
|
45493
45431
|
|
|
45494
45432
|
/**
|
|
45495
|
-
* @
|
|
45433
|
+
* @public
|
|
45496
45434
|
*/
|
|
45497
45435
|
var ClapprStatsChronograph;
|
|
45498
45436
|
(function (ClapprStatsChronograph) {
|
|
@@ -45504,7 +45442,7 @@ var ClapprStatsChronograph;
|
|
|
45504
45442
|
// Latency = 'latency',
|
|
45505
45443
|
})(ClapprStatsChronograph || (ClapprStatsChronograph = {}));
|
|
45506
45444
|
/**
|
|
45507
|
-
* @
|
|
45445
|
+
* @public
|
|
45508
45446
|
*/
|
|
45509
45447
|
var ClapprStatsCounter;
|
|
45510
45448
|
(function (ClapprStatsCounter) {
|
|
@@ -45521,7 +45459,7 @@ var ClapprStatsCounter;
|
|
|
45521
45459
|
ClapprStatsCounter["DvrUsage"] = "dvrUsage";
|
|
45522
45460
|
})(ClapprStatsCounter || (ClapprStatsCounter = {}));
|
|
45523
45461
|
/**
|
|
45524
|
-
* @
|
|
45462
|
+
* @public
|
|
45525
45463
|
*/
|
|
45526
45464
|
var ClapprStatsEvents;
|
|
45527
45465
|
(function (ClapprStatsEvents) {
|
|
@@ -45576,7 +45514,7 @@ function newMetrics$1() {
|
|
|
45576
45514
|
|
|
45577
45515
|
/**
|
|
45578
45516
|
* `PLUGIN` that measures data about playback, which can be useful for analyzing performance and UX.
|
|
45579
|
-
* @
|
|
45517
|
+
* @public
|
|
45580
45518
|
* @remarks
|
|
45581
45519
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
45582
45520
|
*
|
|
@@ -45669,7 +45607,7 @@ class ClapprStats extends ContainerPlugin {
|
|
|
45669
45607
|
}
|
|
45670
45608
|
/**
|
|
45671
45609
|
* Returns the collected metrics.
|
|
45672
|
-
* @returns Measurements collected so far
|
|
45610
|
+
* @returns {@link ClapprStatsMetrics | Measurements} collected so far
|
|
45673
45611
|
*/
|
|
45674
45612
|
exportMetrics() {
|
|
45675
45613
|
return structuredClone(this.metrics);
|
|
@@ -45855,7 +45793,7 @@ const CMCD_KEYS = [
|
|
|
45855
45793
|
// const T = 'plugins.cmcd'
|
|
45856
45794
|
/**
|
|
45857
45795
|
* A `PLUGIN` that configures {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf | CMCD} for playback
|
|
45858
|
-
* @
|
|
45796
|
+
* @public
|
|
45859
45797
|
* @remarks
|
|
45860
45798
|
* Configuration options - {@link CmcdConfigOptions}.
|
|
45861
45799
|
* @example
|
|
@@ -48078,10 +48016,10 @@ const PLAYBACK_NAMES = {
|
|
|
48078
48016
|
hls: 'HLS.js',
|
|
48079
48017
|
html5_video: 'Native',
|
|
48080
48018
|
};
|
|
48081
|
-
const T
|
|
48019
|
+
// const T = 'plugins.nerd_stats'
|
|
48082
48020
|
/**
|
|
48083
48021
|
* `PLUGIN` that displays useful statistics regarding the playback as well as the network quality estimation.
|
|
48084
|
-
* @
|
|
48022
|
+
* @public
|
|
48085
48023
|
*
|
|
48086
48024
|
* @remarks
|
|
48087
48025
|
* Depends on:
|
|
@@ -48397,7 +48335,6 @@ class NerdStats extends UICorePlugin {
|
|
|
48397
48335
|
return this;
|
|
48398
48336
|
}
|
|
48399
48337
|
attach() {
|
|
48400
|
-
trace(`${T$h} attach`);
|
|
48401
48338
|
const gear = this.core.getPlugin('bottom_gear');
|
|
48402
48339
|
gear
|
|
48403
48340
|
.addItem('nerd_stats')
|
|
@@ -48411,7 +48348,6 @@ class NerdStats extends UICorePlugin {
|
|
|
48411
48348
|
});
|
|
48412
48349
|
}
|
|
48413
48350
|
clearSpeedtestMetrics() {
|
|
48414
|
-
trace(`${T$h} clearSpeedtestMetrics`);
|
|
48415
48351
|
const clapprStats = this.container?.getPlugin('clappr_stats');
|
|
48416
48352
|
this.speedtestMetrics.connectionSpeed = 0;
|
|
48417
48353
|
this.speedtestMetrics.ping = 0;
|
|
@@ -48466,10 +48402,10 @@ function newMetrics() {
|
|
|
48466
48402
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
48467
48403
|
// Use of this source code is governed by a BSD-style
|
|
48468
48404
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE.
|
|
48469
|
-
const T
|
|
48405
|
+
// const T = 'plugins.click_to_pause'
|
|
48470
48406
|
/**
|
|
48471
48407
|
* A small `PLUGIN` that toggles the playback state on click over the video container
|
|
48472
|
-
* @
|
|
48408
|
+
* @public
|
|
48473
48409
|
*/
|
|
48474
48410
|
class ClickToPause extends ContainerPlugin {
|
|
48475
48411
|
pointerEnabled = false;
|
|
@@ -48496,10 +48432,6 @@ class ClickToPause extends ContainerPlugin {
|
|
|
48496
48432
|
click() {
|
|
48497
48433
|
const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
|
|
48498
48434
|
const isDvrEnabled = this.container.isDvrEnabled();
|
|
48499
|
-
trace(`${T$g} click`, {
|
|
48500
|
-
isLivePlayback,
|
|
48501
|
-
isDvrEnabled,
|
|
48502
|
-
});
|
|
48503
48435
|
if (isLivePlayback && !isDvrEnabled) {
|
|
48504
48436
|
this.togglePlay(true);
|
|
48505
48437
|
return;
|
|
@@ -48575,13 +48507,12 @@ function buildSvg(clips, duration, barWidth) {
|
|
|
48575
48507
|
|
|
48576
48508
|
const clipsHTML = "<div class=\"gplayer-mc-clips-text\" id=\"gplayer-mc-clips-text\"></div>";
|
|
48577
48509
|
|
|
48578
|
-
const T$f = 'plugins.clips';
|
|
48579
48510
|
const VERSION$5 = '2.22.16';
|
|
48580
48511
|
const CLAPPR_VERSION = '0.11.4';
|
|
48581
48512
|
const COMPACT_WIDTH = 495;
|
|
48582
48513
|
/**
|
|
48583
48514
|
* `PLUGIN` that allows marking up the timeline of the video
|
|
48584
|
-
* @
|
|
48515
|
+
* @public
|
|
48585
48516
|
* @remarks
|
|
48586
48517
|
* The plugin decorates the seekbar with notches to indicate the clips of the video and displays current clip text in the left panel
|
|
48587
48518
|
*
|
|
@@ -48661,18 +48592,15 @@ class Clips extends UICorePlugin {
|
|
|
48661
48592
|
?.text;
|
|
48662
48593
|
}
|
|
48663
48594
|
onCoreReady() {
|
|
48664
|
-
trace(`${T$f} onCoreReady`);
|
|
48665
48595
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48666
48596
|
assert(mediaControl, 'media_control plugin is required');
|
|
48667
48597
|
this.parseClips(this.options.clips.text);
|
|
48668
48598
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.onMcRender);
|
|
48669
48599
|
}
|
|
48670
48600
|
onMcRender() {
|
|
48671
|
-
trace(`${T$f} onMcRender`);
|
|
48672
48601
|
this.core.getPlugin('media_control')?.slot('clips', this.$el);
|
|
48673
48602
|
}
|
|
48674
48603
|
onContainerChanged() {
|
|
48675
|
-
trace(`${T$f} onContainerChanged`);
|
|
48676
48604
|
// TODO figure out the conditions of changing the container (without destroying the previous one)
|
|
48677
48605
|
// probably it is the case with the MultiCamera plugin
|
|
48678
48606
|
if (this.oldContainer) {
|
|
@@ -48863,11 +48791,11 @@ class ContextMenu extends UIContainerPlugin {
|
|
|
48863
48791
|
|
|
48864
48792
|
const dvrHTML = "<div class=\"live-info\" id=\"gplayer-mc-live\"><%= i18n.t('live') %></div>\n<button type=\"button\"\n class=\"live-button\"\n aria-label=\"<%= i18n.t('back_to_live') %>\"\n id=\"gplayer-mc-back-to-live\"\n>\n <%= i18n.t('back_to_live') %>\n</button>\n";
|
|
48865
48793
|
|
|
48866
|
-
const T
|
|
48794
|
+
// const T = 'plugins.dvr_controls'
|
|
48867
48795
|
/**
|
|
48868
48796
|
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
48869
48797
|
*
|
|
48870
|
-
* @
|
|
48798
|
+
* @public
|
|
48871
48799
|
*
|
|
48872
48800
|
* @remarks
|
|
48873
48801
|
* Depends on:
|
|
@@ -48936,7 +48864,6 @@ class DvrControls extends UICorePlugin {
|
|
|
48936
48864
|
* @internal
|
|
48937
48865
|
*/
|
|
48938
48866
|
render() {
|
|
48939
|
-
trace(`${T$e} render`);
|
|
48940
48867
|
this.$el.html(DvrControls.template({
|
|
48941
48868
|
i18n: this.core.i18n,
|
|
48942
48869
|
}));
|
|
@@ -48979,7 +48906,7 @@ const reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" wi
|
|
|
48979
48906
|
|
|
48980
48907
|
const templateHtml = "<div class=\"player-error-screen__content\" data-error-screen>\n <% if (icon) { %>\n <div class=\"player-error-screen__icon\" data-error-screen><%= icon %></div>\n <% } %>\n <div class=\"player-error-screen__title\" data-error-screen><%= title %></div>\n <% if (message) { %>\n <div class=\"player-error-screen__message\" data-error-screen><%= message %></div>\n <% } %>\n <% if (code) { %>\n <div class=\"player-error-screen__code\" data-error-screen><%= i18n.t('error_code') %>: <%= code %></div>\n <% } %>\n <% if (reloadIcon) { %>\n <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n <% } %>\n</div>\n";
|
|
48981
48908
|
|
|
48982
|
-
const T$
|
|
48909
|
+
const T$8 = 'plugins.error_screen';
|
|
48983
48910
|
/**
|
|
48984
48911
|
* `PLUGIN` that displays fatal errors nicely in the overlay on top of the player.
|
|
48985
48912
|
* @public
|
|
@@ -49031,11 +48958,11 @@ class ErrorScreen extends UICorePlugin {
|
|
|
49031
48958
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
|
|
49032
48959
|
}
|
|
49033
48960
|
onPlay() {
|
|
49034
|
-
trace(`${T$
|
|
48961
|
+
trace(`${T$8} onPlay`);
|
|
49035
48962
|
this.unmount();
|
|
49036
48963
|
}
|
|
49037
48964
|
unmount() {
|
|
49038
|
-
trace(`${T$
|
|
48965
|
+
trace(`${T$8} unmount`);
|
|
49039
48966
|
this.err = null;
|
|
49040
48967
|
this.$el.remove();
|
|
49041
48968
|
}
|
|
@@ -49048,7 +48975,7 @@ class ErrorScreen extends UICorePlugin {
|
|
|
49048
48975
|
};
|
|
49049
48976
|
}
|
|
49050
48977
|
reload() {
|
|
49051
|
-
trace(`${T$
|
|
48978
|
+
trace(`${T$8} reload`);
|
|
49052
48979
|
setTimeout(() => {
|
|
49053
48980
|
this.core.configure({
|
|
49054
48981
|
reloading: true,
|
|
@@ -49058,9 +48985,6 @@ class ErrorScreen extends UICorePlugin {
|
|
|
49058
48985
|
}, 0);
|
|
49059
48986
|
}
|
|
49060
48987
|
onActiveContainerChanged() {
|
|
49061
|
-
trace(`${T$d} onActiveContainerChanged`, {
|
|
49062
|
-
reloading: this.core.options.reloading,
|
|
49063
|
-
});
|
|
49064
48988
|
this.err = null;
|
|
49065
48989
|
this.listenTo(this.core.activeContainer.playback, Events$1.PLAYBACK_PLAY, this.onPlay);
|
|
49066
48990
|
if (this.core.options.reloading) {
|
|
@@ -49074,7 +48998,7 @@ class ErrorScreen extends UICorePlugin {
|
|
|
49074
48998
|
}
|
|
49075
48999
|
}
|
|
49076
49000
|
onError(err) {
|
|
49077
|
-
trace(`${T$
|
|
49001
|
+
trace(`${T$8} onError`, { err });
|
|
49078
49002
|
if (err.UI) {
|
|
49079
49003
|
if (this.err) {
|
|
49080
49004
|
this.unmount();
|
|
@@ -49111,7 +49035,7 @@ const FAVICON_COLOR = '#567';
|
|
|
49111
49035
|
const FAVICON_SELECTOR = 'link[rel="shortcut icon"]';
|
|
49112
49036
|
/**
|
|
49113
49037
|
* `PLUGIN` that changes the favicon according to the player's state.
|
|
49114
|
-
* @
|
|
49038
|
+
* @public
|
|
49115
49039
|
* @remarks
|
|
49116
49040
|
* There are three states: stopped, playing and paused.
|
|
49117
49041
|
*/
|
|
@@ -49544,7 +49468,7 @@ const streamsMomentoIcon = "<svg id=\"Слой_1\" data-name=\"Слой 1\" xmln
|
|
|
49544
49468
|
const streamsWhiteNightsIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"50\" height=\"50\" viewBox=\"0 0 50 50\">\n <defs>\n <clipPath id=\"clip-Icon\">\n <rect width=\"50\" height=\"50\"/>\n </clipPath>\n </defs>\n <g id=\"Icon\" clip-path=\"url(#clip-Icon)\">\n <g id=\"icon2\" transform=\"translate(-0.041 0)\">\n <path id=\"Контур_77\" data-name=\"Контур 77\" d=\"M6.493,13v8.266h6.275V19.74H8.31V17.714h4.006V16.3H8.31V14.53h4.365V13Zm7.5,0v8.266h1.7V15.732h.023l3.438,5.534h1.818V13h-1.7v5.545h-.023L15.8,13Z\" fill=\"#fff\"/>\n <path id=\"Контур_76\" data-name=\"Контур 76\" d=\"M29.949,29.1V26.774H31.94a1.4,1.4,0,0,1,.938.272,1.1,1.1,0,0,1,.313.874,1.155,1.155,0,0,1-.313.9,1.375,1.375,0,0,1-.938.278ZM28.132,25.36v8.266h1.817V30.4h1.818a1.353,1.353,0,0,1,.984.3,1.637,1.637,0,0,1,.394.949c.046.333.079.681.1,1.042a3.2,3.2,0,0,0,.185.938h1.819a1.218,1.218,0,0,1-.191-.423,3.611,3.611,0,0,1-.093-.527c-.019-.185-.033-.367-.041-.544s-.016-.332-.023-.463a5.052,5.052,0,0,0-.087-.625,2.109,2.109,0,0,0-.2-.573,1.586,1.586,0,0,0-.359-.451,1.414,1.414,0,0,0-.556-.284v-.023a1.926,1.926,0,0,0,1-.81,2.494,2.494,0,0,0,.307-1.262,2.308,2.308,0,0,0-.165-.88,2.128,2.128,0,0,0-.486-.724,2.3,2.3,0,0,0-.764-.492,2.67,2.67,0,0,0-1-.179ZM43.506,30.5V25.36H41.689V30.5a2.065,2.065,0,0,1-.37,1.36,1.7,1.7,0,0,1-1.343.434,2.086,2.086,0,0,1-.886-.156,1.283,1.283,0,0,1-.758-.978,3.748,3.748,0,0,1-.058-.66V25.36H36.456V30.5a3.16,3.16,0,0,0,.92,2.5,3.807,3.807,0,0,0,2.6.81,3.82,3.82,0,0,0,2.593-.816,3.132,3.132,0,0,0,.937-2.492Z\" fill=\"#fff\"/>\n <path id=\"Контур_80\" data-name=\"Контур 80\" d=\"M22.646,31.2H4.689a4.505,4.505,0,0,1-4.5-4.5V8.5A4.505,4.505,0,0,1,4.689,4h18.2a4.505,4.505,0,0,1,4.5,4.5v8.445l-.893.1a3.184,3.184,0,0,0-2.846,3.177V30.5l-.465.7ZM4.689,6a2.5,2.5,0,0,0-2.5,2.5V26.7a2.5,2.5,0,0,0,2.5,2.5H21.65V20.22a5.18,5.18,0,0,1,3.739-4.992V8.5a2.5,2.5,0,0,0-2.5-2.5Z\" fill=\"#fff\"/>\n <path id=\"Контур_81\" data-name=\"Контур 81\" d=\"M30.127,47.884a1,1,0,0,1-1-1V43.267H26.846a5.206,5.206,0,0,1-5.2-5.2V20.222a5.206,5.206,0,0,1,5.2-5.2H44.692a5.206,5.206,0,0,1,5.2,5.2V38.068a5.206,5.206,0,0,1-5.2,5.2H35.058l-4.216,4.316A1,1,0,0,1,30.127,47.884ZM26.846,17.022a3.2,3.2,0,0,0-3.2,3.2V38.067a3.2,3.2,0,0,0,3.2,3.2h3.281a1,1,0,0,1,1,1v2.162l2.8-2.86a1,1,0,0,1,.715-.3H44.692a3.2,3.2,0,0,0,3.2-3.2V20.222a3.2,3.2,0,0,0-3.2-3.2Z\" fill=\"#fff\"/>\n </g>\n </g>\n</svg>\n";
|
|
49545
49469
|
|
|
49546
49470
|
const VERSION$4 = '0.0.1';
|
|
49547
|
-
const T$
|
|
49471
|
+
const T$7 = 'plugins.multicamera';
|
|
49548
49472
|
/**
|
|
49549
49473
|
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
49550
49474
|
* @beta
|
|
@@ -49690,7 +49614,7 @@ class MultiCamera extends UICorePlugin {
|
|
|
49690
49614
|
}
|
|
49691
49615
|
onCameraSelect(event) {
|
|
49692
49616
|
const value = event.currentTarget.dataset.multicameraSelectorSelect;
|
|
49693
|
-
trace(`${T$
|
|
49617
|
+
trace(`${T$7} onCameraSelect`, { value });
|
|
49694
49618
|
if (value !== undefined) {
|
|
49695
49619
|
this.changeById(parseInt(value, 10));
|
|
49696
49620
|
}
|
|
@@ -49816,13 +49740,13 @@ class MultiCamera extends UICorePlugin {
|
|
|
49816
49740
|
}
|
|
49817
49741
|
}
|
|
49818
49742
|
changeById(id) {
|
|
49819
|
-
trace(`${T$
|
|
49743
|
+
trace(`${T$7} changeById`, { id });
|
|
49820
49744
|
queueMicrotask(() => {
|
|
49821
49745
|
const playbackOptions = this.core.options.playback || {};
|
|
49822
49746
|
// TODO figure out what this does
|
|
49823
49747
|
playbackOptions.recycleVideo = Browser.isMobile;
|
|
49824
49748
|
this.currentCamera = this.findElementById(id) ?? null;
|
|
49825
|
-
trace(`${T$
|
|
49749
|
+
trace(`${T$7} changeById`, { id, currentCamera: this.currentCamera, multicamera: this.multicamera });
|
|
49826
49750
|
if (!this.currentCamera) {
|
|
49827
49751
|
return;
|
|
49828
49752
|
}
|
|
@@ -49839,7 +49763,7 @@ class MultiCamera extends UICorePlugin {
|
|
|
49839
49763
|
// TODO remove?
|
|
49840
49764
|
// for html5 playback:
|
|
49841
49765
|
this.options.dvrEnabled = this.currentCamera.dvr;
|
|
49842
|
-
trace(`${T$
|
|
49766
|
+
trace(`${T$7} changeById`, { currentCamera: this.currentCamera });
|
|
49843
49767
|
// TODO
|
|
49844
49768
|
this.core.configure({
|
|
49845
49769
|
playback: playbackOptions,
|
|
@@ -49897,16 +49821,16 @@ const pipIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"no
|
|
|
49897
49821
|
const buttonHtml$2 = "<button class=\"gplayer-lite-btn gcore-skin-button-color\">\n <%= pipIcon %>\n</button>\n";
|
|
49898
49822
|
|
|
49899
49823
|
const VERSION$3 = '0.0.1';
|
|
49900
|
-
const T$
|
|
49824
|
+
const T$6 = `plugins.pip`;
|
|
49901
49825
|
/**
|
|
49902
|
-
* `PLUGIN` that enables picture
|
|
49903
|
-
* @
|
|
49826
|
+
* `PLUGIN` that enables picture-in-picture mode.
|
|
49827
|
+
* @public
|
|
49904
49828
|
* @remarks
|
|
49905
49829
|
* Depends on:
|
|
49906
49830
|
*
|
|
49907
49831
|
* - {@link MediaControl}
|
|
49908
49832
|
*
|
|
49909
|
-
* It renders a button to toggle picture
|
|
49833
|
+
* It renders a button to toggle picture-in-picture mode in the media control UI.
|
|
49910
49834
|
*/
|
|
49911
49835
|
class PictureInPicture extends UICorePlugin {
|
|
49912
49836
|
/**
|
|
@@ -49955,7 +49879,7 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49955
49879
|
});
|
|
49956
49880
|
}
|
|
49957
49881
|
isPiPSupported() {
|
|
49958
|
-
trace(`${T$
|
|
49882
|
+
trace(`${T$6} isPiPSupported`, {
|
|
49959
49883
|
pictureInPictureEnabled: !!document.pictureInPictureEnabled,
|
|
49960
49884
|
requestPictureInPicture: !!HTMLVideoElement.prototype.requestPictureInPicture,
|
|
49961
49885
|
});
|
|
@@ -49976,7 +49900,7 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49976
49900
|
return this;
|
|
49977
49901
|
}
|
|
49978
49902
|
togglePictureInPicture() {
|
|
49979
|
-
trace(`${T$
|
|
49903
|
+
trace(`${T$6} togglePictureInPicture`);
|
|
49980
49904
|
if (this.videoElement !== document.pictureInPictureElement) {
|
|
49981
49905
|
this.requestPictureInPicture();
|
|
49982
49906
|
}
|
|
@@ -49985,13 +49909,13 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49985
49909
|
}
|
|
49986
49910
|
}
|
|
49987
49911
|
requestPictureInPicture() {
|
|
49988
|
-
trace(`${T$
|
|
49912
|
+
trace(`${T$6} requestPictureInPicture`, {
|
|
49989
49913
|
videoElement: !!this.videoElement,
|
|
49990
49914
|
});
|
|
49991
49915
|
this.videoElement.requestPictureInPicture();
|
|
49992
49916
|
}
|
|
49993
49917
|
exitPictureInPicture() {
|
|
49994
|
-
trace(`${T$
|
|
49918
|
+
trace(`${T$6} exitPictureInPicture`);
|
|
49995
49919
|
document.exitPictureInPicture();
|
|
49996
49920
|
}
|
|
49997
49921
|
}
|
|
@@ -50018,7 +49942,7 @@ const DEFAULT_PLAYBACK_RATES = [
|
|
|
50018
49942
|
{ value: 2.0, label: '2x' },
|
|
50019
49943
|
];
|
|
50020
49944
|
const DEFAULT_PLAYBACK_RATE = 1;
|
|
50021
|
-
const T$
|
|
49945
|
+
const T$5 = 'plugins.playback_rate';
|
|
50022
49946
|
/**
|
|
50023
49947
|
* `PLUGIN` that allows changing the playback speed of the video.
|
|
50024
49948
|
* @beta
|
|
@@ -50104,7 +50028,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50104
50028
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChange);
|
|
50105
50029
|
}
|
|
50106
50030
|
onCoreReady() {
|
|
50107
|
-
trace(`${T$
|
|
50031
|
+
trace(`${T$5} onCoreReady`);
|
|
50108
50032
|
const mediaControl = this.core.getPlugin('media_control');
|
|
50109
50033
|
assert(mediaControl, 'media_control plugin is required');
|
|
50110
50034
|
const gear = this.core.getPlugin('bottom_gear');
|
|
@@ -50113,7 +50037,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50113
50037
|
this.listenTo(gear, GearEvents.RENDERED, this.onGearRendered);
|
|
50114
50038
|
}
|
|
50115
50039
|
onActiveContainerChange() {
|
|
50116
|
-
trace(`${T$
|
|
50040
|
+
trace(`${T$5} onActiveContainerChange`);
|
|
50117
50041
|
this.metadataLoaded = false;
|
|
50118
50042
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
|
|
50119
50043
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
|
|
@@ -50121,15 +50045,15 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50121
50045
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onMetaDataLoaded);
|
|
50122
50046
|
}
|
|
50123
50047
|
onMediaControlRendered() {
|
|
50124
|
-
trace(`${T$
|
|
50048
|
+
trace(`${T$5} onMediaControlRendered`);
|
|
50125
50049
|
this.render();
|
|
50126
50050
|
}
|
|
50127
50051
|
onGearRendered() {
|
|
50128
|
-
trace(`${T$
|
|
50052
|
+
trace(`${T$5} onGearRendered`);
|
|
50129
50053
|
this.mount();
|
|
50130
50054
|
}
|
|
50131
50055
|
mount() {
|
|
50132
|
-
trace(`${T$
|
|
50056
|
+
trace(`${T$5} mount`, {
|
|
50133
50057
|
shouldMount: this.shouldMount(),
|
|
50134
50058
|
});
|
|
50135
50059
|
if (!this.shouldMount()) {
|
|
@@ -50146,7 +50070,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50146
50070
|
})));
|
|
50147
50071
|
}
|
|
50148
50072
|
onMetaDataLoaded() {
|
|
50149
|
-
trace(`${T$
|
|
50073
|
+
trace(`${T$5} onMetaDataLoaded`, {
|
|
50150
50074
|
playbackType: this.core.activePlayback.getPlaybackType(),
|
|
50151
50075
|
dvrEnabled: this.core.activePlayback.dvrEnabled,
|
|
50152
50076
|
});
|
|
@@ -50168,17 +50092,13 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50168
50092
|
this.core.activePlayback?.setPlaybackRate(this.selectedRate);
|
|
50169
50093
|
}
|
|
50170
50094
|
else {
|
|
50171
|
-
trace(`${T$
|
|
50095
|
+
trace(`${T$5} onPlaybackRateChange not steering to the selected rate, it is seemingly a catchup algorithm working`, {
|
|
50172
50096
|
playbackRate,
|
|
50173
50097
|
selectedRate: this.selectedRate,
|
|
50174
50098
|
});
|
|
50175
50099
|
}
|
|
50176
50100
|
}
|
|
50177
50101
|
shouldMount() {
|
|
50178
|
-
trace(`${T$a} shouldMount`, {
|
|
50179
|
-
playbackType: this.core.activePlayback?.getPlaybackType(),
|
|
50180
|
-
dvrEnabled: this.core.activePlayback?.dvrEnabled,
|
|
50181
|
-
});
|
|
50182
50102
|
if (!this.core.activePlayback || !this.metadataLoaded) {
|
|
50183
50103
|
return false;
|
|
50184
50104
|
}
|
|
@@ -50192,9 +50112,6 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50192
50112
|
* @internal
|
|
50193
50113
|
*/
|
|
50194
50114
|
render() {
|
|
50195
|
-
trace(`${T$a} render`, {
|
|
50196
|
-
shouldMount: this.shouldMount(),
|
|
50197
|
-
});
|
|
50198
50115
|
this.$el.html(PlaybackRate.listTemplate({
|
|
50199
50116
|
arrowLeftIcon,
|
|
50200
50117
|
checkIcon,
|
|
@@ -50238,13 +50155,13 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50238
50155
|
}
|
|
50239
50156
|
}
|
|
50240
50157
|
syncRate() {
|
|
50241
|
-
trace(`${T$
|
|
50158
|
+
trace(`${T$5} syncRate`, {
|
|
50242
50159
|
selectedRate: this.selectedRate,
|
|
50243
50160
|
});
|
|
50244
50161
|
this.core.activePlayback?.setPlaybackRate(this.selectedRate);
|
|
50245
50162
|
}
|
|
50246
50163
|
resetPlaybackRate() {
|
|
50247
|
-
trace(`${T$
|
|
50164
|
+
trace(`${T$5} resetPlaybackRate`, {
|
|
50248
50165
|
selectedRate: this.selectedRate,
|
|
50249
50166
|
});
|
|
50250
50167
|
this.core.activePlayback?.setPlaybackRate(DEFAULT_PLAYBACK_RATE);
|
|
@@ -50279,7 +50196,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50279
50196
|
?.label || `x${rate}`);
|
|
50280
50197
|
}
|
|
50281
50198
|
highlightCurrentRate() {
|
|
50282
|
-
trace(`${T$
|
|
50199
|
+
trace(`${T$5} highlightCurrentRate`, {
|
|
50283
50200
|
selectedRate: this.selectedRate,
|
|
50284
50201
|
});
|
|
50285
50202
|
this.allRateElements().removeClass('current');
|
|
@@ -50290,9 +50207,6 @@ class PlaybackRate extends UICorePlugin {
|
|
|
50290
50207
|
.addClass('gcore-skin-active');
|
|
50291
50208
|
}
|
|
50292
50209
|
updateGearOptionLabel() {
|
|
50293
|
-
trace(`${T$a} updateGearOptionLabel`, {
|
|
50294
|
-
selectedRate: this.selectedRate,
|
|
50295
|
-
});
|
|
50296
50210
|
this.mount();
|
|
50297
50211
|
}
|
|
50298
50212
|
}
|
|
@@ -50302,10 +50216,10 @@ const posterHTML = "<div class=\"play-wrapper\" id=\"gplayer-poster\">\n <div
|
|
|
50302
50216
|
//Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
50303
50217
|
// Use of this source code is governed by a BSD-style
|
|
50304
50218
|
// license that can be found in the LICENSE file.
|
|
50305
|
-
const T
|
|
50219
|
+
// const T = 'plugins.poster'
|
|
50306
50220
|
/**
|
|
50307
50221
|
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
50308
|
-
* @
|
|
50222
|
+
* @public
|
|
50309
50223
|
* @remarks
|
|
50310
50224
|
* When the playback is stopped or not yet started, the media control UI is disabled and hidden.
|
|
50311
50225
|
* Media control gets activated once the metadata is loaded after playback is initiated.
|
|
@@ -50393,7 +50307,6 @@ class Poster extends UIContainerPlugin {
|
|
|
50393
50307
|
* Reenables earlier disabled plugin
|
|
50394
50308
|
*/
|
|
50395
50309
|
enable() {
|
|
50396
|
-
trace(`${T$9} enable`);
|
|
50397
50310
|
super.enable();
|
|
50398
50311
|
this.playing = this.container.playback.isPlaying();
|
|
50399
50312
|
this.update();
|
|
@@ -50402,16 +50315,11 @@ class Poster extends UIContainerPlugin {
|
|
|
50402
50315
|
* Disables the plugin, unmounting it from the DOM
|
|
50403
50316
|
*/
|
|
50404
50317
|
disable() {
|
|
50405
|
-
trace(`${T$9} disable`);
|
|
50406
50318
|
this.playing = false;
|
|
50407
50319
|
this.playRequested = false;
|
|
50408
50320
|
super.disable();
|
|
50409
50321
|
}
|
|
50410
50322
|
onError(error) {
|
|
50411
|
-
trace(`${T$9} onError`, {
|
|
50412
|
-
error,
|
|
50413
|
-
enabled: this.enabled,
|
|
50414
|
-
});
|
|
50415
50323
|
if (this.hasFatalError) {
|
|
50416
50324
|
return;
|
|
50417
50325
|
}
|
|
@@ -50419,24 +50327,20 @@ class Poster extends UIContainerPlugin {
|
|
|
50419
50327
|
// this.hasFatalError is reset on container recreate
|
|
50420
50328
|
}
|
|
50421
50329
|
onPlay() {
|
|
50422
|
-
trace(`${T$9} onPlay`);
|
|
50423
50330
|
this.playing = true;
|
|
50424
50331
|
this.playRequested = false;
|
|
50425
50332
|
this.update();
|
|
50426
50333
|
}
|
|
50427
50334
|
onPlayIntent() {
|
|
50428
|
-
trace(`${T$9} onPlayIntent`);
|
|
50429
50335
|
this.playRequested = true;
|
|
50430
50336
|
this.update();
|
|
50431
50337
|
}
|
|
50432
50338
|
onStop() {
|
|
50433
|
-
trace(`${T$9} onStop`);
|
|
50434
50339
|
this.playing = false;
|
|
50435
50340
|
this.playRequested = false;
|
|
50436
50341
|
this.update();
|
|
50437
50342
|
}
|
|
50438
50343
|
updatePlayButton() {
|
|
50439
|
-
trace(`${T$9} updatePlayButton`);
|
|
50440
50344
|
const show = !this.isNoOp &&
|
|
50441
50345
|
!(this.options.chromeless && !this.options.allowUserInteraction) &&
|
|
50442
50346
|
!this.playRequested &&
|
|
@@ -50452,18 +50356,15 @@ class Poster extends UIContainerPlugin {
|
|
|
50452
50356
|
}
|
|
50453
50357
|
}
|
|
50454
50358
|
showPlayButton() {
|
|
50455
|
-
trace(`${T$9} showPlayButton`);
|
|
50456
50359
|
this.$el.find('#poster-play').show();
|
|
50457
50360
|
this.$el.addClass('clickable');
|
|
50458
50361
|
this.container.$el.addClass('container-with-poster-clickable');
|
|
50459
50362
|
}
|
|
50460
50363
|
hidePlayButton() {
|
|
50461
|
-
trace(`${T$9} hidePlayButton`);
|
|
50462
50364
|
this.$el.find('#poster-play').hide();
|
|
50463
50365
|
this.$el.removeClass('clickable');
|
|
50464
50366
|
}
|
|
50465
50367
|
clicked(e) {
|
|
50466
|
-
trace(`${T$9} clicked`);
|
|
50467
50368
|
e.preventDefault();
|
|
50468
50369
|
e.stopPropagation();
|
|
50469
50370
|
if (this.options.chromeless && !this.options.allowUserInteraction) {
|
|
@@ -50481,12 +50382,10 @@ class Poster extends UIContainerPlugin {
|
|
|
50481
50382
|
return !this.container.playback.isAudioOnly;
|
|
50482
50383
|
}
|
|
50483
50384
|
update() {
|
|
50484
|
-
trace(`${T$9} update`);
|
|
50485
50385
|
this.updatePlayButton();
|
|
50486
50386
|
this.updatePoster();
|
|
50487
50387
|
}
|
|
50488
50388
|
updatePoster() {
|
|
50489
|
-
trace(`${T$9} updatePoster`);
|
|
50490
50389
|
if (!this.playing) {
|
|
50491
50390
|
this.showPoster();
|
|
50492
50391
|
}
|
|
@@ -50499,7 +50398,6 @@ class Poster extends UIContainerPlugin {
|
|
|
50499
50398
|
this.$el.show();
|
|
50500
50399
|
}
|
|
50501
50400
|
hidePoster() {
|
|
50502
|
-
trace(`${T$9} hidePoster`);
|
|
50503
50401
|
if (!this.options.disableMediaControl) {
|
|
50504
50402
|
this.container.enableMediaControl();
|
|
50505
50403
|
}
|
|
@@ -50550,11 +50448,11 @@ const listHtml = "<button class=\"gplayer-lite-btn go-back gcore-skin-text-color
|
|
|
50550
50448
|
|
|
50551
50449
|
const hdIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M14.9562 8.22232H13.9961V15.1873H14.9562C15.8914 15.1873 16.766 14.8253 17.4195 14.1676C18.0786 13.5037 18.4415 12.6281 18.4415 11.7026C18.4415 9.7837 16.8781 8.22253 14.9561 8.22253L14.9562 8.22232Z\"\n fill=\"#C9C9C9\"/>\n <path\n d=\"M22.0801 4H1.91994C0.859222 4 0 4.86406 0 5.91994V17.4878C0 18.5437 0.859222 19.4078 1.91994 19.4078H22.0801C23.1408 19.4078 24 18.5437 24 17.4878V5.91994C24 4.86406 23.1408 4 22.0801 4ZM10.3975 15.3473C10.3975 15.6124 10.1827 15.8272 9.91754 15.8272C9.65216 15.8272 9.43761 15.6122 9.43761 15.3473V12.0239H5.55956V15.3473C5.55956 15.6124 5.34481 15.8272 5.07963 15.8272C4.81425 15.8272 4.5997 15.6122 4.5997 15.3473L4.59949 7.74042C4.59949 7.47524 4.81425 7.26049 5.07943 7.26049C5.34481 7.26049 5.55936 7.47544 5.55936 7.74042V11.0636H9.43741V7.74042C9.43741 7.47524 9.65216 7.26049 9.91734 7.26049C10.1827 7.26049 10.3973 7.47544 10.3973 7.74042L10.3975 15.3473ZM18.1005 14.8438C17.2652 15.6844 16.1486 16.1472 14.9561 16.1472H13.5161C13.2507 16.1472 13.0361 15.9323 13.0361 15.6673V7.74263C13.0361 7.47745 13.2509 7.26269 13.5161 7.26269H14.9561C17.4072 7.26269 19.4013 9.25438 19.4013 11.7027C19.4013 12.8835 18.9392 13.9991 18.1005 14.844V14.8438Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
|
|
50552
50450
|
|
|
50553
|
-
const T
|
|
50451
|
+
// const T = 'plugins.quality_levels'
|
|
50554
50452
|
const VERSION$2 = 'v2.22.5';
|
|
50555
50453
|
/**
|
|
50556
50454
|
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
50557
|
-
* @
|
|
50455
|
+
* @public
|
|
50558
50456
|
*
|
|
50559
50457
|
* @remarks
|
|
50560
50458
|
* Depends on:
|
|
@@ -50627,14 +50525,12 @@ class QualityLevels extends UICorePlugin {
|
|
|
50627
50525
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChange);
|
|
50628
50526
|
}
|
|
50629
50527
|
onCoreReady() {
|
|
50630
|
-
trace(`${T$8} onCoreReady`);
|
|
50631
50528
|
const gear = this.core.getPlugin('bottom_gear');
|
|
50632
50529
|
assert(gear, 'bottom_gear plugin is required');
|
|
50633
50530
|
this.currentText = this.core.i18n.t('auto');
|
|
50634
50531
|
this.listenTo(gear, GearEvents.RENDERED, this.onGearRendered);
|
|
50635
50532
|
}
|
|
50636
50533
|
onGearRendered() {
|
|
50637
|
-
trace(`${T$8} onGearRendered`);
|
|
50638
50534
|
this.render();
|
|
50639
50535
|
}
|
|
50640
50536
|
onActiveContainerChange() {
|
|
@@ -50663,7 +50559,6 @@ class QualityLevels extends UICorePlugin {
|
|
|
50663
50559
|
}
|
|
50664
50560
|
}
|
|
50665
50561
|
onStop() {
|
|
50666
|
-
trace(`${T$8} onStop`);
|
|
50667
50562
|
this.listenToOnce(this.core.activePlayback, Events$1.PLAYBACK_PLAY, () => {
|
|
50668
50563
|
if (this.core.activePlayback.getPlaybackType() === 'live') {
|
|
50669
50564
|
if (this.selectedLevelId !== -1) {
|
|
@@ -50759,7 +50654,6 @@ class QualityLevels extends UICorePlugin {
|
|
|
50759
50654
|
return false;
|
|
50760
50655
|
}
|
|
50761
50656
|
goBack() {
|
|
50762
|
-
trace(`${T$8} goBack`);
|
|
50763
50657
|
this.core.getPlugin('bottom_gear').refresh();
|
|
50764
50658
|
}
|
|
50765
50659
|
setLevel(index) {
|
|
@@ -50794,13 +50688,9 @@ class QualityLevels extends UICorePlugin {
|
|
|
50794
50688
|
return this.levelLabels[index] ?? formatLevelLabel(this.levels[index]);
|
|
50795
50689
|
}
|
|
50796
50690
|
onBitrate(info) {
|
|
50797
|
-
trace(`${T$8} updateCurrentLevel`, { info });
|
|
50798
50691
|
this.highlightCurrentLevel();
|
|
50799
50692
|
}
|
|
50800
50693
|
highlightCurrentLevel() {
|
|
50801
|
-
trace(`${T$8} highlightCurrentLevel`, {
|
|
50802
|
-
selectedLevelId: this.selectedLevelId,
|
|
50803
|
-
});
|
|
50804
50694
|
this.allLevelElements()
|
|
50805
50695
|
.removeClass('current')
|
|
50806
50696
|
.find('a')
|
|
@@ -50824,7 +50714,7 @@ const seekTimeHTML = "<span id=\"mc-seek-time\" class=\"seek-time__pos\"></span>
|
|
|
50824
50714
|
// Use of this source code is governed by a BSD-style
|
|
50825
50715
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
50826
50716
|
const { formatTime } = Utils;
|
|
50827
|
-
const T
|
|
50717
|
+
// const T = 'plugins.seek_time'
|
|
50828
50718
|
/**
|
|
50829
50719
|
* `PLUGIN` that adds a seek time indicator when the mouse pointer is over the seek bar.
|
|
50830
50720
|
* @beta
|
|
@@ -50883,13 +50773,9 @@ class SeekTime extends UICorePlugin {
|
|
|
50883
50773
|
showTime(event) {
|
|
50884
50774
|
this.hoveringOverSeekBar = true;
|
|
50885
50775
|
this.calculateHoverPosition(event);
|
|
50886
|
-
trace(`${T$7} showTime`, {
|
|
50887
|
-
hoverPosition: this.hoverPosition,
|
|
50888
|
-
});
|
|
50889
50776
|
this.update();
|
|
50890
50777
|
}
|
|
50891
50778
|
hideTime() {
|
|
50892
|
-
trace(`${T$7} hideTime`);
|
|
50893
50779
|
this.hoveringOverSeekBar = false;
|
|
50894
50780
|
this.update();
|
|
50895
50781
|
}
|
|
@@ -51096,10 +50982,10 @@ class Share extends UICorePlugin {
|
|
|
51096
50982
|
|
|
51097
50983
|
const pluginHtml$1 = "<div class=\"skip-container\" id=\"mc-skip-container\">\n <div class=\"skip-item\" id=\"mc-skip-left\">\n </div>\n <div class=\"skip-item\" id=\"mc-skip-mid\">\n </div>\n <div class=\"skip-item\" id=\"mc-skip-right\">\n </div>\n</div>\n";
|
|
51098
50984
|
|
|
51099
|
-
const T
|
|
50985
|
+
// const T = 'plugins.skip_time'
|
|
51100
50986
|
/**
|
|
51101
50987
|
* `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
|
|
51102
|
-
* @
|
|
50988
|
+
* @public
|
|
51103
50989
|
*/
|
|
51104
50990
|
class SkipTime extends UICorePlugin {
|
|
51105
50991
|
get name() {
|
|
@@ -51143,13 +51029,9 @@ class SkipTime extends UICorePlugin {
|
|
|
51143
51029
|
this.mount();
|
|
51144
51030
|
}
|
|
51145
51031
|
setBack() {
|
|
51146
|
-
trace(`${T$6} setBack`);
|
|
51147
51032
|
this.position = 'left';
|
|
51148
51033
|
}
|
|
51149
51034
|
handleRewindClicks() {
|
|
51150
|
-
trace(`${T$6} handleRewindClicks`, {
|
|
51151
|
-
position: this.position,
|
|
51152
|
-
});
|
|
51153
51035
|
if (this.core.getPlaybackType() === Playback.LIVE &&
|
|
51154
51036
|
!this.container.isDvrEnabled()) {
|
|
51155
51037
|
this.toggleFullscreen();
|
|
@@ -51158,9 +51040,6 @@ class SkipTime extends UICorePlugin {
|
|
|
51158
51040
|
this.handleSkip();
|
|
51159
51041
|
}
|
|
51160
51042
|
handleSkip() {
|
|
51161
|
-
trace(`${T$6} handleSkip`, {
|
|
51162
|
-
position: this.position,
|
|
51163
|
-
});
|
|
51164
51043
|
if (Browser.isMobile) {
|
|
51165
51044
|
if (this.position === 'left') {
|
|
51166
51045
|
const seekPos = this.container.getCurrentTime() - 10;
|
|
@@ -51182,15 +51061,12 @@ class SkipTime extends UICorePlugin {
|
|
|
51182
51061
|
}
|
|
51183
51062
|
}
|
|
51184
51063
|
setMidClick() {
|
|
51185
|
-
trace(`${T$6} setMidClick`);
|
|
51186
51064
|
this.position = 'mid';
|
|
51187
51065
|
}
|
|
51188
51066
|
setForward() {
|
|
51189
|
-
trace(`${T$6} setForward`);
|
|
51190
51067
|
this.position = 'right';
|
|
51191
51068
|
}
|
|
51192
51069
|
toggleFullscreen() {
|
|
51193
|
-
trace(`${T$6} toggleFullscreen`);
|
|
51194
51070
|
this.trigger(Events$1.MEDIACONTROL_FULLSCREEN, this.name);
|
|
51195
51071
|
this.container.fullscreen();
|
|
51196
51072
|
this.core.toggleFullscreen();
|
|
@@ -51199,12 +51075,10 @@ class SkipTime extends UICorePlugin {
|
|
|
51199
51075
|
* @internal
|
|
51200
51076
|
*/
|
|
51201
51077
|
render() {
|
|
51202
|
-
trace(`${T$6} render`);
|
|
51203
51078
|
this.$el.html(SkipTime.template());
|
|
51204
51079
|
return this;
|
|
51205
51080
|
}
|
|
51206
51081
|
mount() {
|
|
51207
|
-
trace(`${T$6} mount`);
|
|
51208
51082
|
this.core.activeContainer.$el.append(this.el);
|
|
51209
51083
|
}
|
|
51210
51084
|
}
|
|
@@ -51216,7 +51090,7 @@ const spinnerHTML = "<div data-bounce1></div>\n<div data-bounce2></div>\n<div da
|
|
|
51216
51090
|
// Use of this source code is governed by a BSD-style
|
|
51217
51091
|
// license that can be found in the LICENSE file.
|
|
51218
51092
|
// https://github.com/clappr/clappr-plugins/blob/ffaa9d27005fa5a8a7c243ffc47eb5655b84b371/LICENSE
|
|
51219
|
-
const T
|
|
51093
|
+
// const T = 'plugins.spinner'
|
|
51220
51094
|
/**
|
|
51221
51095
|
* Custom events emitted by the plugin
|
|
51222
51096
|
* @public
|
|
@@ -51286,22 +51160,13 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
51286
51160
|
this.hasBuffering = false;
|
|
51287
51161
|
}
|
|
51288
51162
|
onPlay() {
|
|
51289
|
-
trace(`${T$5} onPlay`);
|
|
51290
51163
|
this._hide();
|
|
51291
51164
|
}
|
|
51292
51165
|
onStop() {
|
|
51293
|
-
trace(`${T$5} onStop`, {
|
|
51294
|
-
hasFatalError: this.hasFatalError,
|
|
51295
|
-
});
|
|
51296
51166
|
this._hide();
|
|
51297
51167
|
}
|
|
51298
51168
|
onError(e) {
|
|
51299
51169
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
51300
|
-
trace(`${T$5} onError`, {
|
|
51301
|
-
e,
|
|
51302
|
-
hasFatalError: this.hasFatalError,
|
|
51303
|
-
error: e.code,
|
|
51304
|
-
});
|
|
51305
51170
|
this._hide();
|
|
51306
51171
|
}
|
|
51307
51172
|
/**
|
|
@@ -51312,7 +51177,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
51312
51177
|
* @param delay - The delay in milliseconds before the spinner is shown.
|
|
51313
51178
|
*/
|
|
51314
51179
|
show(delay = 300) {
|
|
51315
|
-
trace(`${T$5} show`);
|
|
51316
51180
|
this.userShown = true;
|
|
51317
51181
|
this._show(delay);
|
|
51318
51182
|
}
|
|
@@ -51332,9 +51196,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
51332
51196
|
}
|
|
51333
51197
|
}
|
|
51334
51198
|
_hide() {
|
|
51335
|
-
trace(`${T$5} _hide`, {
|
|
51336
|
-
userShown: this.userShown,
|
|
51337
|
-
});
|
|
51338
51199
|
if (this.userShown) {
|
|
51339
51200
|
return;
|
|
51340
51201
|
}
|
|
@@ -51349,9 +51210,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
51349
51210
|
* @internal
|
|
51350
51211
|
*/
|
|
51351
51212
|
render() {
|
|
51352
|
-
trace(`${T$5} render`, {
|
|
51353
|
-
buffering: this.container.buffering,
|
|
51354
|
-
});
|
|
51355
51213
|
this.$el.html(this.template());
|
|
51356
51214
|
this.el.firstElementChild?.addEventListener('animationiteration', () => {
|
|
51357
51215
|
this.trigger(SpinnerEvents.SYNC);
|
|
@@ -51510,14 +51368,9 @@ class SourceController extends CorePlugin {
|
|
|
51510
51368
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
|
|
51511
51369
|
}
|
|
51512
51370
|
onCoreReady() {
|
|
51513
|
-
trace(`${T$4} onCoreReady`);
|
|
51514
51371
|
this.core.getPlugin('error_screen')?.disable(); // TODO test
|
|
51515
51372
|
}
|
|
51516
51373
|
onActiveContainerChanged() {
|
|
51517
|
-
trace(`${T$4} onActiveContainerChanged`, {
|
|
51518
|
-
retrying: this.active,
|
|
51519
|
-
currentSource: this.sourcesList[this.currentSourceIndex],
|
|
51520
|
-
});
|
|
51521
51374
|
const spinner = this.core.activeContainer?.getPlugin('spinner');
|
|
51522
51375
|
if (spinner) {
|
|
51523
51376
|
this.sync = (cb) => {
|
|
@@ -51641,7 +51494,7 @@ const LOCAL_STORAGE_CC_ID = 'gplayer.plugins.cc.selected';
|
|
|
51641
51494
|
const T$3 = 'plugins.cc';
|
|
51642
51495
|
/**
|
|
51643
51496
|
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
51644
|
-
* @
|
|
51497
|
+
* @public
|
|
51645
51498
|
*
|
|
51646
51499
|
* @remarks
|
|
51647
51500
|
* The plugin is activated when closed captions tracks are detected in the media source.
|
|
@@ -51652,6 +51505,14 @@ const T$3 = 'plugins.cc';
|
|
|
51652
51505
|
* - {@link MediaControl}
|
|
51653
51506
|
*
|
|
51654
51507
|
* Configuration options - {@link ClosedCaptionsPluginSettings}
|
|
51508
|
+
*
|
|
51509
|
+
* Known issues:
|
|
51510
|
+
*
|
|
51511
|
+
* 1. When media source changes, the subtitles tracks aren't reloaded. Possible solution: use `playback.recycleVideo = false`
|
|
51512
|
+
* {@link PlayerConfig | main config option}, which will force new video element creation every time media source changes.
|
|
51513
|
+
* However, this may lead to other issues, such as autoplay not working (after media source has been changed).
|
|
51514
|
+
* {@link https://github.com/video-dev/hls.js/issues/2198 | related discussion}
|
|
51515
|
+
*
|
|
51655
51516
|
* @example
|
|
51656
51517
|
* ```ts
|
|
51657
51518
|
* import { ClosedCaptions } from '@gcorevideo/player'
|
|
@@ -51760,7 +51621,9 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
51760
51621
|
});
|
|
51761
51622
|
}
|
|
51762
51623
|
onSubtitleAvailable() {
|
|
51763
|
-
trace(`${T$3} onSubtitleAvailable
|
|
51624
|
+
trace(`${T$3} onSubtitleAvailable`, {
|
|
51625
|
+
tracks: this.core.activePlayback.closedCaptionsTracks.length,
|
|
51626
|
+
});
|
|
51764
51627
|
this.applyTracks();
|
|
51765
51628
|
this.mount();
|
|
51766
51629
|
}
|
|
@@ -52679,7 +52542,7 @@ class Thumbnails extends UICorePlugin {
|
|
|
52679
52542
|
|
|
52680
52543
|
/**
|
|
52681
52544
|
* Events emitted by the VolumeFade plugin.
|
|
52682
|
-
* @
|
|
52545
|
+
* @public
|
|
52683
52546
|
*/
|
|
52684
52547
|
var VolumeFadeEvents;
|
|
52685
52548
|
(function (VolumeFadeEvents) {
|