@gcorevideo/player 2.22.29 → 2.22.30
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/assets/skip-time/skip-time.ejs +4 -4
- package/assets/skip-time/style.scss +4 -4
- package/dist/core.js +1 -1
- package/dist/index.css +734 -734
- package/dist/index.js +164 -139
- package/lib/plugins/skip-time/SkipTime.d.ts +25 -11
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
- package/lib/plugins/skip-time/SkipTime.js +43 -17
- package/package.json +1 -1
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +1 -1
- package/src/plugins/skip-time/SkipTime.ts +52 -25
- package/tsconfig.tsbuildinfo +1 -1
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$n = 'playback.dash';
|
|
12684
12684
|
class DashPlayback extends BasePlayback {
|
|
12685
12685
|
_levels = null;
|
|
12686
12686
|
_currentLevel = null;
|
|
@@ -12955,10 +12955,10 @@ class DashPlayback extends BasePlayback {
|
|
|
12955
12955
|
}
|
|
12956
12956
|
_onPlaybackError = (event) => {
|
|
12957
12957
|
// TODO
|
|
12958
|
-
trace(`${T$
|
|
12958
|
+
trace(`${T$n} _onPlaybackError`, { event });
|
|
12959
12959
|
};
|
|
12960
12960
|
_onDASHJSSError = (event) => {
|
|
12961
|
-
trace(`${T$
|
|
12961
|
+
trace(`${T$n} _onDASHJSSError`, { event });
|
|
12962
12962
|
this._stopTimeUpdateTimer();
|
|
12963
12963
|
// Note that the other error types are deprecated
|
|
12964
12964
|
const e = event.error;
|
|
@@ -12993,7 +12993,7 @@ class DashPlayback extends BasePlayback {
|
|
|
12993
12993
|
}
|
|
12994
12994
|
};
|
|
12995
12995
|
triggerError(error) {
|
|
12996
|
-
trace(`${T$
|
|
12996
|
+
trace(`${T$n} triggerError`, { error });
|
|
12997
12997
|
// this triggers Events.ERROR to be handled by the UI
|
|
12998
12998
|
this.trigger(Events$1.PLAYBACK_ERROR, this.createError(error, {
|
|
12999
12999
|
useCodePrefix: false,
|
|
@@ -13032,10 +13032,10 @@ class DashPlayback extends BasePlayback {
|
|
|
13032
13032
|
}
|
|
13033
13033
|
get dvrEnabled() {
|
|
13034
13034
|
if (!this._dash) {
|
|
13035
|
-
trace(`${T$
|
|
13035
|
+
trace(`${T$n} dvrEnable no dash player instance`);
|
|
13036
13036
|
return false;
|
|
13037
13037
|
}
|
|
13038
|
-
trace(`${T$
|
|
13038
|
+
trace(`${T$n} get.dvrEnabled`, {
|
|
13039
13039
|
dvrWindowSize: this._dash?.getDVRWindowSize(),
|
|
13040
13040
|
minDvrSize: this._minDvrSize,
|
|
13041
13041
|
playbackType: this.getPlaybackType(),
|
|
@@ -13057,7 +13057,7 @@ class DashPlayback extends BasePlayback {
|
|
|
13057
13057
|
this.trigger(Events$1.PLAYBACK_PROGRESS, progress, {});
|
|
13058
13058
|
}
|
|
13059
13059
|
play() {
|
|
13060
|
-
trace(`${T$
|
|
13060
|
+
trace(`${T$n} play`, { dash: !!this._dash });
|
|
13061
13061
|
if (!this._dash) {
|
|
13062
13062
|
this._setup();
|
|
13063
13063
|
}
|
|
@@ -13143,7 +13143,7 @@ class DashPlayback extends BasePlayback {
|
|
|
13143
13143
|
}
|
|
13144
13144
|
// @ts-expect-error
|
|
13145
13145
|
get currentAudioTrack() {
|
|
13146
|
-
trace(`${T$
|
|
13146
|
+
trace(`${T$n} get currentAudioTrack`);
|
|
13147
13147
|
assert.ok(this._dash, 'DASH.js MediaPlayer is not initialized');
|
|
13148
13148
|
const t = this._dash.getCurrentTrackFor('audio');
|
|
13149
13149
|
if (!t) {
|
|
@@ -41844,7 +41844,7 @@ const AUTO = -1;
|
|
|
41844
41844
|
const DEFAULT_RECOVER_ATTEMPTS = 16;
|
|
41845
41845
|
Events$1.register('PLAYBACK_FRAGMENT_CHANGED');
|
|
41846
41846
|
Events$1.register('PLAYBACK_FRAGMENT_PARSING_METADATA');
|
|
41847
|
-
const T$
|
|
41847
|
+
const T$m = 'playback.hls';
|
|
41848
41848
|
class HlsPlayback extends BasePlayback {
|
|
41849
41849
|
_ccIsSetup = false;
|
|
41850
41850
|
_ccTracksUpdated = false;
|
|
@@ -42073,7 +42073,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42073
42073
|
maxBufferLength: 2,
|
|
42074
42074
|
maxMaxBufferLength: 4,
|
|
42075
42075
|
}, this.options.playback.hlsjsConfig);
|
|
42076
|
-
trace(`${T$
|
|
42076
|
+
trace(`${T$m} _createHLSInstance`, { config });
|
|
42077
42077
|
this._hls = new Hls(config);
|
|
42078
42078
|
}
|
|
42079
42079
|
_attachHLSMedia() {
|
|
@@ -42164,7 +42164,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42164
42164
|
}
|
|
42165
42165
|
else {
|
|
42166
42166
|
Log.error('hlsjs: failed to recover', { evt, data });
|
|
42167
|
-
trace(`${T$
|
|
42167
|
+
trace(`${T$m} _recover failed to recover`, {
|
|
42168
42168
|
type: data.type,
|
|
42169
42169
|
details: data.details,
|
|
42170
42170
|
});
|
|
@@ -42250,7 +42250,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42250
42250
|
this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
|
|
42251
42251
|
}
|
|
42252
42252
|
_onHLSJSError(evt, data) {
|
|
42253
|
-
trace(`${T$
|
|
42253
|
+
trace(`${T$m} _onHLSJSError`, {
|
|
42254
42254
|
fatal: data.fatal,
|
|
42255
42255
|
type: data.type,
|
|
42256
42256
|
details: data.details,
|
|
@@ -42298,7 +42298,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42298
42298
|
evt,
|
|
42299
42299
|
data,
|
|
42300
42300
|
});
|
|
42301
|
-
trace(`${T$
|
|
42301
|
+
trace(`${T$m} _onHLSJSError trying to recover from network error`, {
|
|
42302
42302
|
details: data.details,
|
|
42303
42303
|
});
|
|
42304
42304
|
error.level = PlayerError.Levels.WARN;
|
|
@@ -42311,7 +42311,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42311
42311
|
evt,
|
|
42312
42312
|
data,
|
|
42313
42313
|
});
|
|
42314
|
-
trace(`${T$
|
|
42314
|
+
trace(`${T$m} _onHLSJSError trying to recover from media error`, {
|
|
42315
42315
|
details: data.details,
|
|
42316
42316
|
});
|
|
42317
42317
|
error.level = PlayerError.Levels.WARN;
|
|
@@ -42341,7 +42341,7 @@ class HlsPlayback extends BasePlayback {
|
|
|
42341
42341
|
return;
|
|
42342
42342
|
}
|
|
42343
42343
|
Log.warn('hlsjs: non-fatal error occurred', { evt, data });
|
|
42344
|
-
trace(`${T$
|
|
42344
|
+
trace(`${T$m} _onHLSJSError non-fatal error occurred`, {
|
|
42345
42345
|
type: data.type,
|
|
42346
42346
|
details: data.details,
|
|
42347
42347
|
});
|
|
@@ -42675,11 +42675,11 @@ class HlsPlayback extends BasePlayback {
|
|
|
42675
42675
|
this._hls.audioTrack = Number(id); // TODO or find index by .id == id?
|
|
42676
42676
|
}
|
|
42677
42677
|
_onAudioTracksUpdated(_, data) {
|
|
42678
|
-
trace(`${T$
|
|
42678
|
+
trace(`${T$m} onAudioTracksUpdated`);
|
|
42679
42679
|
this.trigger(Events$1.PLAYBACK_AUDIO_AVAILABLE, data.audioTracks.map(toClapprTrack));
|
|
42680
42680
|
}
|
|
42681
42681
|
_onAudioTrackSwitched(_, data) {
|
|
42682
|
-
trace(`${T$
|
|
42682
|
+
trace(`${T$m} onAudioTrackSwitched`);
|
|
42683
42683
|
// @ts-ignore
|
|
42684
42684
|
const track = this._hls.audioTracks[data.id];
|
|
42685
42685
|
this.trigger(Events$1.PLAYBACK_AUDIO_CHANGED, toClapprTrack(track));
|
|
@@ -42700,7 +42700,7 @@ function toClapprTrack(t) {
|
|
|
42700
42700
|
};
|
|
42701
42701
|
}
|
|
42702
42702
|
|
|
42703
|
-
const T$
|
|
42703
|
+
const T$l = 'playback.html5_video';
|
|
42704
42704
|
const STALL_TIMEOUT = 15000;
|
|
42705
42705
|
class HTML5Video extends BasePlayback {
|
|
42706
42706
|
stallTimerId = null;
|
|
@@ -42708,7 +42708,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42708
42708
|
* @internal
|
|
42709
42709
|
*/
|
|
42710
42710
|
createError(errorData, options) {
|
|
42711
|
-
trace(`${T$
|
|
42711
|
+
trace(`${T$l} createError`, {
|
|
42712
42712
|
errorData: { ...errorData },
|
|
42713
42713
|
});
|
|
42714
42714
|
const i18n = this.i18n ||
|
|
@@ -42724,11 +42724,11 @@ class HTML5Video extends BasePlayback {
|
|
|
42724
42724
|
return super.createError(errorData, { ...options, useCodePrefix: false });
|
|
42725
42725
|
}
|
|
42726
42726
|
_onWaiting() {
|
|
42727
|
-
trace(`${T$
|
|
42727
|
+
trace(`${T$l} _onWaiting`);
|
|
42728
42728
|
super._onWaiting();
|
|
42729
42729
|
}
|
|
42730
42730
|
_onEnded() {
|
|
42731
|
-
trace(`${T$
|
|
42731
|
+
trace(`${T$l} _onEnded`);
|
|
42732
42732
|
if (this.stallTimerId) {
|
|
42733
42733
|
clearTimeout(this.stallTimerId);
|
|
42734
42734
|
this.stallTimerId = null;
|
|
@@ -42736,12 +42736,12 @@ class HTML5Video extends BasePlayback {
|
|
|
42736
42736
|
super._onEnded();
|
|
42737
42737
|
}
|
|
42738
42738
|
_handleBufferingEvents() {
|
|
42739
|
-
trace(`${T$
|
|
42739
|
+
trace(`${T$l} _handleBufferingEvents`, {
|
|
42740
42740
|
networkState: this.el.networkState,
|
|
42741
42741
|
});
|
|
42742
42742
|
if (!this.stallTimerId) {
|
|
42743
42743
|
this.stallTimerId = setTimeout(() => {
|
|
42744
|
-
trace(`${T$
|
|
42744
|
+
trace(`${T$l} _handleBufferingEvents stall timeout`, {
|
|
42745
42745
|
buffering: this.buffering,
|
|
42746
42746
|
ended: this.ended,
|
|
42747
42747
|
});
|
|
@@ -42759,7 +42759,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42759
42759
|
super._handleBufferingEvents();
|
|
42760
42760
|
}
|
|
42761
42761
|
_onPlaying() {
|
|
42762
|
-
trace(`${T$
|
|
42762
|
+
trace(`${T$l} _onPlaying`);
|
|
42763
42763
|
if (this.stallTimerId) {
|
|
42764
42764
|
clearTimeout(this.stallTimerId);
|
|
42765
42765
|
this.stallTimerId = null;
|
|
@@ -42767,7 +42767,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42767
42767
|
super._onPlaying();
|
|
42768
42768
|
}
|
|
42769
42769
|
_onPause() {
|
|
42770
|
-
trace(`${T$
|
|
42770
|
+
trace(`${T$l} _onPause`);
|
|
42771
42771
|
super._onPause();
|
|
42772
42772
|
if (this.stallTimerId) {
|
|
42773
42773
|
clearTimeout(this.stallTimerId);
|
|
@@ -42777,7 +42777,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42777
42777
|
get audioTracks() {
|
|
42778
42778
|
const tracks = this.el.audioTracks;
|
|
42779
42779
|
const supported = !!tracks;
|
|
42780
|
-
trace(`${T$
|
|
42780
|
+
trace(`${T$l} get audioTracks`, { supported });
|
|
42781
42781
|
const retval = [];
|
|
42782
42782
|
if (supported) {
|
|
42783
42783
|
for (let i = 0; i < tracks.length; i++) {
|
|
@@ -42796,7 +42796,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42796
42796
|
get currentAudioTrack() {
|
|
42797
42797
|
const tracks = this.el.audioTracks;
|
|
42798
42798
|
const supported = !!tracks;
|
|
42799
|
-
trace(`${T$
|
|
42799
|
+
trace(`${T$l} get currentAudioTrack`, {
|
|
42800
42800
|
supported,
|
|
42801
42801
|
});
|
|
42802
42802
|
if (supported) {
|
|
@@ -42817,7 +42817,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42817
42817
|
switchAudioTrack(id) {
|
|
42818
42818
|
const tracks = this.el.audioTracks;
|
|
42819
42819
|
const supported = !!tracks;
|
|
42820
|
-
trace(`${T$
|
|
42820
|
+
trace(`${T$l} switchAudioTrack`, {
|
|
42821
42821
|
supported,
|
|
42822
42822
|
});
|
|
42823
42823
|
if (supported) {
|
|
@@ -42836,7 +42836,7 @@ function registerPlaybacks() {
|
|
|
42836
42836
|
Loader.registerPlayback(DashPlayback);
|
|
42837
42837
|
}
|
|
42838
42838
|
|
|
42839
|
-
const T$
|
|
42839
|
+
const T$k = 'GPlayer';
|
|
42840
42840
|
const DEFAULT_OPTIONS = {
|
|
42841
42841
|
autoPlay: false,
|
|
42842
42842
|
debug: 'none',
|
|
@@ -42924,7 +42924,7 @@ class Player {
|
|
|
42924
42924
|
* ```
|
|
42925
42925
|
*/
|
|
42926
42926
|
attachTo(playerElement) {
|
|
42927
|
-
trace(`${T$
|
|
42927
|
+
trace(`${T$k} attachTo`, {
|
|
42928
42928
|
player: !!this.player,
|
|
42929
42929
|
});
|
|
42930
42930
|
assert.ok(!this.player, 'Player already initialized');
|
|
@@ -42934,7 +42934,7 @@ class Player {
|
|
|
42934
42934
|
}
|
|
42935
42935
|
const coreOpts = this.buildCoreOptions(playerElement);
|
|
42936
42936
|
const { core, container } = Player.getRegisteredPlugins();
|
|
42937
|
-
trace(`${T$
|
|
42937
|
+
trace(`${T$k} init`, {
|
|
42938
42938
|
registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.prototype.name),
|
|
42939
42939
|
});
|
|
42940
42940
|
coreOpts.plugins = {
|
|
@@ -42948,7 +42948,7 @@ class Player {
|
|
|
42948
42948
|
* Destroys the player, releasing all resources and unmounting its UI from the DOM.
|
|
42949
42949
|
*/
|
|
42950
42950
|
destroy() {
|
|
42951
|
-
trace(`${T$
|
|
42951
|
+
trace(`${T$k} destroy`, {
|
|
42952
42952
|
player: !!this.player,
|
|
42953
42953
|
});
|
|
42954
42954
|
if (this.player) {
|
|
@@ -43135,7 +43135,7 @@ class Player {
|
|
|
43135
43135
|
this.config = $.extend(true, this.config, config);
|
|
43136
43136
|
}
|
|
43137
43137
|
initPlayer(coreOptions) {
|
|
43138
|
-
trace(`${T$
|
|
43138
|
+
trace(`${T$k} initPlayer`, {
|
|
43139
43139
|
autoPlay: coreOptions.autoPlay,
|
|
43140
43140
|
sources: coreOptions.sources,
|
|
43141
43141
|
player: !!this.player,
|
|
@@ -43160,7 +43160,7 @@ class Player {
|
|
|
43160
43160
|
}
|
|
43161
43161
|
}
|
|
43162
43162
|
triggerAutoPlay() {
|
|
43163
|
-
trace(`${T$
|
|
43163
|
+
trace(`${T$k} triggerAutoPlay`);
|
|
43164
43164
|
setTimeout(() => {
|
|
43165
43165
|
this.player?.play({
|
|
43166
43166
|
autoPlay: true,
|
|
@@ -43178,7 +43178,7 @@ class Player {
|
|
|
43178
43178
|
// TODO test
|
|
43179
43179
|
events = {
|
|
43180
43180
|
onReady: () => {
|
|
43181
|
-
trace(`${T$
|
|
43181
|
+
trace(`${T$k} onReady`, {
|
|
43182
43182
|
ready: this.ready,
|
|
43183
43183
|
});
|
|
43184
43184
|
if (this.ready) {
|
|
@@ -43212,7 +43212,7 @@ class Player {
|
|
|
43212
43212
|
buildCoreOptions(rootNode) {
|
|
43213
43213
|
const sources = this.buildMediaSourcesList();
|
|
43214
43214
|
const source = sources[0];
|
|
43215
|
-
trace(`${T$
|
|
43215
|
+
trace(`${T$k} buildCoreOptions`, {
|
|
43216
43216
|
source,
|
|
43217
43217
|
sources,
|
|
43218
43218
|
});
|
|
@@ -43273,7 +43273,7 @@ class Player {
|
|
|
43273
43273
|
assert.ok(this.player, 'Player is not initialized');
|
|
43274
43274
|
const core = this.player.core;
|
|
43275
43275
|
core.on(Events$1.CORE_SCREEN_ORIENTATION_CHANGED, ({ orientation }) => {
|
|
43276
|
-
trace(`${T$
|
|
43276
|
+
trace(`${T$k} on CORE_SCREEN_ORIENTATION_CHANGED`, {
|
|
43277
43277
|
orientation,
|
|
43278
43278
|
rootNode: {
|
|
43279
43279
|
width: this.rootNode?.clientWidth,
|
|
@@ -43288,14 +43288,14 @@ class Player {
|
|
|
43288
43288
|
}
|
|
43289
43289
|
}, null);
|
|
43290
43290
|
core.on(Events$1.CORE_RESIZE, ({ width, height }) => {
|
|
43291
|
-
trace(`${T$
|
|
43291
|
+
trace(`${T$k} on CORE_RESIZE`, {
|
|
43292
43292
|
width,
|
|
43293
43293
|
height,
|
|
43294
43294
|
});
|
|
43295
43295
|
this.safeTriggerEvent(PlayerEvent.Resize, { width, height });
|
|
43296
43296
|
}, null);
|
|
43297
43297
|
core.on(Events$1.CORE_FULLSCREEN, (isFullscreen) => {
|
|
43298
|
-
trace(`${T$
|
|
43298
|
+
trace(`${T$k} CORE_FULLSCREEN`, {
|
|
43299
43299
|
isFullscreen,
|
|
43300
43300
|
});
|
|
43301
43301
|
this.safeTriggerEvent(PlayerEvent.Fullscreen, isFullscreen);
|
|
@@ -43303,7 +43303,7 @@ class Player {
|
|
|
43303
43303
|
}
|
|
43304
43304
|
}
|
|
43305
43305
|
|
|
43306
|
-
var version$1 = "2.22.
|
|
43306
|
+
var version$1 = "2.22.30";
|
|
43307
43307
|
|
|
43308
43308
|
var packages = {
|
|
43309
43309
|
"node_modules/@clappr/core": {
|
|
@@ -43627,7 +43627,7 @@ const INITIAL_SETTINGS = {
|
|
|
43627
43627
|
default: [],
|
|
43628
43628
|
seekEnabled: false,
|
|
43629
43629
|
};
|
|
43630
|
-
const T$
|
|
43630
|
+
const T$j = 'plugins.media_control';
|
|
43631
43631
|
const LEFT_ORDER = [
|
|
43632
43632
|
'playpause',
|
|
43633
43633
|
'playstop',
|
|
@@ -43878,7 +43878,7 @@ class MediaControl extends UICorePlugin {
|
|
|
43878
43878
|
* Hides the media control UI
|
|
43879
43879
|
*/
|
|
43880
43880
|
disable() {
|
|
43881
|
-
trace(`${T$
|
|
43881
|
+
trace(`${T$j} disable`);
|
|
43882
43882
|
this.userDisabled = true; // TODO distinguish between user and system (e.g., unplayable) disabled?
|
|
43883
43883
|
this.hide();
|
|
43884
43884
|
this.unbindKeyEvents();
|
|
@@ -43888,7 +43888,7 @@ class MediaControl extends UICorePlugin {
|
|
|
43888
43888
|
* Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
|
|
43889
43889
|
*/
|
|
43890
43890
|
enable() {
|
|
43891
|
-
trace(`${T$
|
|
43891
|
+
trace(`${T$j} enable`);
|
|
43892
43892
|
if (this.options.chromeless) {
|
|
43893
43893
|
return;
|
|
43894
43894
|
}
|
|
@@ -44614,7 +44614,7 @@ class MediaControl extends UICorePlugin {
|
|
|
44614
44614
|
return this;
|
|
44615
44615
|
}
|
|
44616
44616
|
const timeout = this.options.hideMediaControlDelay || 2000;
|
|
44617
|
-
trace(`${T$
|
|
44617
|
+
trace(`${T$j} render`, { settings: this.settings });
|
|
44618
44618
|
this.$el.html(MediaControl.template({ settings: this.settings }));
|
|
44619
44619
|
// const style = Styler.getStyleFor(mediaControlStyle, { baseUrl: this.options.baseUrl });
|
|
44620
44620
|
// this.$el.append(style[0]);
|
|
@@ -44770,7 +44770,7 @@ function serializeSettings(s) {
|
|
|
44770
44770
|
}
|
|
44771
44771
|
|
|
44772
44772
|
const VERSION$7 = '2.22.4';
|
|
44773
|
-
const T$
|
|
44773
|
+
const T$i = 'plugins.audiotracks';
|
|
44774
44774
|
/**
|
|
44775
44775
|
* `PLUGIN` that makes possible to switch audio tracks via the media control UI.
|
|
44776
44776
|
* @beta
|
|
@@ -44892,7 +44892,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
44892
44892
|
this.updateText();
|
|
44893
44893
|
}
|
|
44894
44894
|
hideMenu() {
|
|
44895
|
-
trace(`${T$
|
|
44895
|
+
trace(`${T$i} hideMenu`);
|
|
44896
44896
|
this.$el.find('#audiotracks-select').addClass('hidden');
|
|
44897
44897
|
this.$el.find('#audiotracks-button').attr('aria-expanded', 'false');
|
|
44898
44898
|
}
|
|
@@ -44945,7 +44945,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
44945
44945
|
|
|
44946
44946
|
const pluginHtml$6 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon></div>\n</div>\n";
|
|
44947
44947
|
|
|
44948
|
-
const T$
|
|
44948
|
+
const T$h = 'plugins.big_mute_button';
|
|
44949
44949
|
// TODO rewrite as a container plugin
|
|
44950
44950
|
/**
|
|
44951
44951
|
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
@@ -44986,7 +44986,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
44986
44986
|
this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
|
|
44987
44987
|
this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
|
|
44988
44988
|
this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
|
|
44989
|
-
trace(`${T$
|
|
44989
|
+
trace(`${T$h} bindEvents`, {
|
|
44990
44990
|
mediacontrol: !!this.core.mediaControl,
|
|
44991
44991
|
});
|
|
44992
44992
|
this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_RENDERED, this.mediaControlRendered);
|
|
@@ -45011,12 +45011,12 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45011
45011
|
}
|
|
45012
45012
|
mediaControlRendered() {
|
|
45013
45013
|
const container = this.core.activeContainer;
|
|
45014
|
-
trace(`${T$
|
|
45014
|
+
trace(`${T$h} mediaControlRendered`, {
|
|
45015
45015
|
container: !!container,
|
|
45016
45016
|
});
|
|
45017
45017
|
if (container) {
|
|
45018
45018
|
this.listenTo(container.playback, Events$1.PLAYBACK_PLAY, () => {
|
|
45019
|
-
trace(`${T$
|
|
45019
|
+
trace(`${T$h} PLAYBACK_PLAY`);
|
|
45020
45020
|
this.render();
|
|
45021
45021
|
});
|
|
45022
45022
|
}
|
|
@@ -45040,7 +45040,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45040
45040
|
}
|
|
45041
45041
|
const { autoPlay, wasMuted } = this.options;
|
|
45042
45042
|
const volume = container.volume;
|
|
45043
|
-
trace(`${T$
|
|
45043
|
+
trace(`${T$h} shouldRender`, {
|
|
45044
45044
|
autoPlay,
|
|
45045
45045
|
wasMuted,
|
|
45046
45046
|
volume,
|
|
@@ -45052,7 +45052,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45052
45052
|
*/
|
|
45053
45053
|
render() {
|
|
45054
45054
|
if (this.shouldRender()) {
|
|
45055
|
-
trace(`${T$
|
|
45055
|
+
trace(`${T$h} render`, {
|
|
45056
45056
|
el: !!this.$el,
|
|
45057
45057
|
});
|
|
45058
45058
|
this.$el.html(BigMuteButton.template());
|
|
@@ -45098,7 +45098,7 @@ const gearIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"n
|
|
|
45098
45098
|
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";
|
|
45099
45099
|
|
|
45100
45100
|
const VERSION$6 = '2.19.12';
|
|
45101
|
-
const T$
|
|
45101
|
+
const T$g = 'plugins.bottom_gear';
|
|
45102
45102
|
/**
|
|
45103
45103
|
* Events triggered by the plugin
|
|
45104
45104
|
* @beta
|
|
@@ -45248,20 +45248,20 @@ class BottomGear extends UICorePlugin {
|
|
|
45248
45248
|
addItem(name, $subMenu) {
|
|
45249
45249
|
const $existingItem = this.$el.find(`#gear-options li[data-${name}`);
|
|
45250
45250
|
if ($existingItem.length) {
|
|
45251
|
-
trace(`${T$
|
|
45251
|
+
trace(`${T$g} addItem already exists`, { name });
|
|
45252
45252
|
return $existingItem;
|
|
45253
45253
|
}
|
|
45254
45254
|
const $item = $('<li></li>')
|
|
45255
45255
|
.attr(`data-${name}`, '')
|
|
45256
45256
|
.appendTo(this.$el.find('#gear-options'));
|
|
45257
45257
|
if ($subMenu) {
|
|
45258
|
-
trace(`${T$
|
|
45258
|
+
trace(`${T$g} addItem adding submenu`, { name });
|
|
45259
45259
|
$subMenu
|
|
45260
45260
|
.addClass('gear-sub-menu-wrapper')
|
|
45261
45261
|
.hide()
|
|
45262
45262
|
.appendTo(this.$el.find('#gear-options-wrapper'));
|
|
45263
45263
|
$item.on('click', (e) => {
|
|
45264
|
-
trace(`${T$
|
|
45264
|
+
trace(`${T$g} addItem submenu clicked`, { name });
|
|
45265
45265
|
e.stopPropagation();
|
|
45266
45266
|
$subMenu.show();
|
|
45267
45267
|
this.$el.find('#gear-options').hide();
|
|
@@ -45270,15 +45270,15 @@ class BottomGear extends UICorePlugin {
|
|
|
45270
45270
|
return $item;
|
|
45271
45271
|
}
|
|
45272
45272
|
onActiveContainerChanged() {
|
|
45273
|
-
trace(`${T$
|
|
45273
|
+
trace(`${T$g} onActiveContainerChanged`);
|
|
45274
45274
|
this.bindContainerEvents();
|
|
45275
45275
|
}
|
|
45276
45276
|
bindContainerEvents() {
|
|
45277
|
-
trace(`${T$
|
|
45277
|
+
trace(`${T$g} bindContainerEvents`);
|
|
45278
45278
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);
|
|
45279
45279
|
}
|
|
45280
45280
|
highDefinitionUpdate(isHd) {
|
|
45281
|
-
trace(`${T$
|
|
45281
|
+
trace(`${T$g} highDefinitionUpdate`, { isHd });
|
|
45282
45282
|
this.hd = isHd;
|
|
45283
45283
|
this.$el.find('.gear-icon').html(isHd ? gearHdIcon : gearIcon);
|
|
45284
45284
|
}
|
|
@@ -45286,7 +45286,7 @@ class BottomGear extends UICorePlugin {
|
|
|
45286
45286
|
* @internal
|
|
45287
45287
|
*/
|
|
45288
45288
|
render() {
|
|
45289
|
-
trace(`${T$
|
|
45289
|
+
trace(`${T$g} render`);
|
|
45290
45290
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45291
45291
|
if (!mediaControl) {
|
|
45292
45292
|
return this; // TODO test
|
|
@@ -45318,11 +45318,11 @@ class BottomGear extends UICorePlugin {
|
|
|
45318
45318
|
this.$el.find('#gear-options-wrapper').toggle();
|
|
45319
45319
|
}
|
|
45320
45320
|
hide() {
|
|
45321
|
-
trace(`${T$
|
|
45321
|
+
trace(`${T$g} hide`);
|
|
45322
45322
|
this.$el.find('#gear-options-wrapper').hide();
|
|
45323
45323
|
}
|
|
45324
45324
|
onCoreReady() {
|
|
45325
|
-
trace(`${T$
|
|
45325
|
+
trace(`${T$g} onCoreReady`);
|
|
45326
45326
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45327
45327
|
assert(mediaControl, 'media_control plugin is required');
|
|
45328
45328
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.onMediaControlRendered);
|
|
@@ -45334,7 +45334,7 @@ class BottomGear extends UICorePlugin {
|
|
|
45334
45334
|
});
|
|
45335
45335
|
}
|
|
45336
45336
|
onMediaControlRendered() {
|
|
45337
|
-
trace(`${T$
|
|
45337
|
+
trace(`${T$g} onMediaControlRendered`);
|
|
45338
45338
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45339
45339
|
mediaControl.mount('gear', this.$el);
|
|
45340
45340
|
}
|
|
@@ -47804,7 +47804,7 @@ const PLAYBACK_NAMES = {
|
|
|
47804
47804
|
hls: 'HLS.js',
|
|
47805
47805
|
html5_video: 'Native',
|
|
47806
47806
|
};
|
|
47807
|
-
const T$
|
|
47807
|
+
const T$f = 'plugins.nerd_stats';
|
|
47808
47808
|
/**
|
|
47809
47809
|
* `PLUGIN` that displays useful statistics regarding the playback as well as the network quality estimation.
|
|
47810
47810
|
* @beta
|
|
@@ -48123,7 +48123,7 @@ class NerdStats extends UICorePlugin {
|
|
|
48123
48123
|
return this;
|
|
48124
48124
|
}
|
|
48125
48125
|
attach() {
|
|
48126
|
-
trace(`${T$
|
|
48126
|
+
trace(`${T$f} attach`);
|
|
48127
48127
|
const gear = this.core.getPlugin('bottom_gear');
|
|
48128
48128
|
gear
|
|
48129
48129
|
.addItem('nerd_stats')
|
|
@@ -48137,7 +48137,7 @@ class NerdStats extends UICorePlugin {
|
|
|
48137
48137
|
});
|
|
48138
48138
|
}
|
|
48139
48139
|
clearSpeedtestMetrics() {
|
|
48140
|
-
trace(`${T$
|
|
48140
|
+
trace(`${T$f} clearSpeedtestMetrics`);
|
|
48141
48141
|
const clapprStats = this.container?.getPlugin('clappr_stats');
|
|
48142
48142
|
this.speedtestMetrics.connectionSpeed = 0;
|
|
48143
48143
|
this.speedtestMetrics.ping = 0;
|
|
@@ -48192,7 +48192,7 @@ function newMetrics() {
|
|
|
48192
48192
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
48193
48193
|
// Use of this source code is governed by a BSD-style
|
|
48194
48194
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE.
|
|
48195
|
-
const T$
|
|
48195
|
+
const T$e = 'plugins.click_to_pause';
|
|
48196
48196
|
/**
|
|
48197
48197
|
* A small `PLUGIN` that toggles the playback state on click over the video container
|
|
48198
48198
|
* @beta
|
|
@@ -48222,7 +48222,7 @@ class ClickToPause extends ContainerPlugin {
|
|
|
48222
48222
|
click() {
|
|
48223
48223
|
const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
|
|
48224
48224
|
const isDvrEnabled = this.container.isDvrEnabled();
|
|
48225
|
-
trace(`${T$
|
|
48225
|
+
trace(`${T$e} click`, {
|
|
48226
48226
|
isLivePlayback,
|
|
48227
48227
|
isDvrEnabled,
|
|
48228
48228
|
});
|
|
@@ -48301,7 +48301,7 @@ function buildSvg(clips, duration, barWidth) {
|
|
|
48301
48301
|
|
|
48302
48302
|
const clipsHTML = "<div class=\"media-clip-text\" id=\"clips-text\"></div>";
|
|
48303
48303
|
|
|
48304
|
-
const T$
|
|
48304
|
+
const T$d = 'plugins.clips';
|
|
48305
48305
|
const VERSION$5 = '2.22.16';
|
|
48306
48306
|
const CLAPPR_VERSION = '0.11.4';
|
|
48307
48307
|
/**
|
|
@@ -48351,7 +48351,7 @@ class Clips extends UICorePlugin {
|
|
|
48351
48351
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onContainerChanged);
|
|
48352
48352
|
}
|
|
48353
48353
|
render() {
|
|
48354
|
-
trace(`${T$
|
|
48354
|
+
trace(`${T$d} render`);
|
|
48355
48355
|
if (!this.options.clips) {
|
|
48356
48356
|
return this;
|
|
48357
48357
|
}
|
|
@@ -48378,19 +48378,19 @@ class Clips extends UICorePlugin {
|
|
|
48378
48378
|
return super.enable();
|
|
48379
48379
|
}
|
|
48380
48380
|
onCoreReady() {
|
|
48381
|
-
trace(`${T$
|
|
48381
|
+
trace(`${T$d} onCoreReady`);
|
|
48382
48382
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48383
48383
|
assert(mediaControl, 'media_control plugin is required');
|
|
48384
48384
|
this.parseClips(this.options.clips.text);
|
|
48385
48385
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.onMcRender);
|
|
48386
48386
|
}
|
|
48387
48387
|
onMcRender() {
|
|
48388
|
-
trace(`${T$
|
|
48388
|
+
trace(`${T$d} onMcRender`);
|
|
48389
48389
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48390
48390
|
mediaControl.mount('clips', this.$el);
|
|
48391
48391
|
}
|
|
48392
48392
|
onContainerChanged() {
|
|
48393
|
-
trace(`${T$
|
|
48393
|
+
trace(`${T$d} onContainerChanged`);
|
|
48394
48394
|
// TODO figure out the conditions of changing the container (without destroying the previous one)
|
|
48395
48395
|
if (this.oldContainer) {
|
|
48396
48396
|
this.stopListening(this.oldContainer, Events$1.CONTAINER_TIMEUPDATE, this.onTimeUpdate);
|
|
@@ -48683,7 +48683,7 @@ const reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" wi
|
|
|
48683
48683
|
|
|
48684
48684
|
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";
|
|
48685
48685
|
|
|
48686
|
-
const T$
|
|
48686
|
+
const T$c = 'plugins.error_screen';
|
|
48687
48687
|
/**
|
|
48688
48688
|
* `PLUGIN` that displays fatal errors nicely in the overlay on top of the player.
|
|
48689
48689
|
* @public
|
|
@@ -48735,11 +48735,11 @@ class ErrorScreen extends UICorePlugin {
|
|
|
48735
48735
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
|
|
48736
48736
|
}
|
|
48737
48737
|
onPlay() {
|
|
48738
|
-
trace(`${T$
|
|
48738
|
+
trace(`${T$c} onPlay`);
|
|
48739
48739
|
this.unmount();
|
|
48740
48740
|
}
|
|
48741
48741
|
unmount() {
|
|
48742
|
-
trace(`${T$
|
|
48742
|
+
trace(`${T$c} unmount`);
|
|
48743
48743
|
this.err = null;
|
|
48744
48744
|
this.$el.remove();
|
|
48745
48745
|
}
|
|
@@ -48752,7 +48752,7 @@ class ErrorScreen extends UICorePlugin {
|
|
|
48752
48752
|
};
|
|
48753
48753
|
}
|
|
48754
48754
|
reload() {
|
|
48755
|
-
trace(`${T$
|
|
48755
|
+
trace(`${T$c} reload`);
|
|
48756
48756
|
setTimeout(() => {
|
|
48757
48757
|
this.core.configure({
|
|
48758
48758
|
reloading: true,
|
|
@@ -48762,7 +48762,7 @@ class ErrorScreen extends UICorePlugin {
|
|
|
48762
48762
|
}, 0);
|
|
48763
48763
|
}
|
|
48764
48764
|
onActiveContainerChanged() {
|
|
48765
|
-
trace(`${T$
|
|
48765
|
+
trace(`${T$c} onActiveContainerChanged`, {
|
|
48766
48766
|
reloading: this.core.options.reloading,
|
|
48767
48767
|
});
|
|
48768
48768
|
this.err = null;
|
|
@@ -48778,7 +48778,7 @@ class ErrorScreen extends UICorePlugin {
|
|
|
48778
48778
|
}
|
|
48779
48779
|
}
|
|
48780
48780
|
onError(err) {
|
|
48781
|
-
trace(`${T$
|
|
48781
|
+
trace(`${T$c} onError`, { err });
|
|
48782
48782
|
if (err.UI) {
|
|
48783
48783
|
if (this.err) {
|
|
48784
48784
|
this.unmount();
|
|
@@ -49248,7 +49248,7 @@ const streamsMomentoIcon = "<svg id=\"Слой_1\" data-name=\"Слой 1\" xmln
|
|
|
49248
49248
|
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";
|
|
49249
49249
|
|
|
49250
49250
|
const VERSION$4 = '0.0.1';
|
|
49251
|
-
const T$
|
|
49251
|
+
const T$b = 'plugins.multicamera';
|
|
49252
49252
|
/**
|
|
49253
49253
|
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
49254
49254
|
* @beta
|
|
@@ -49394,7 +49394,7 @@ class MultiCamera extends UICorePlugin {
|
|
|
49394
49394
|
}
|
|
49395
49395
|
onCameraSelect(event) {
|
|
49396
49396
|
const value = event.currentTarget.dataset.multicameraSelectorSelect;
|
|
49397
|
-
trace(`${T$
|
|
49397
|
+
trace(`${T$b} onCameraSelect`, { value });
|
|
49398
49398
|
if (value !== undefined) {
|
|
49399
49399
|
this.changeById(parseInt(value, 10));
|
|
49400
49400
|
}
|
|
@@ -49520,13 +49520,13 @@ class MultiCamera extends UICorePlugin {
|
|
|
49520
49520
|
}
|
|
49521
49521
|
}
|
|
49522
49522
|
changeById(id) {
|
|
49523
|
-
trace(`${T$
|
|
49523
|
+
trace(`${T$b} changeById`, { id });
|
|
49524
49524
|
queueMicrotask(() => {
|
|
49525
49525
|
const playbackOptions = this.core.options.playback || {};
|
|
49526
49526
|
// TODO figure out what this does
|
|
49527
49527
|
playbackOptions.recycleVideo = Browser.isMobile;
|
|
49528
49528
|
this.currentCamera = this.findElementById(id) ?? null;
|
|
49529
|
-
trace(`${T$
|
|
49529
|
+
trace(`${T$b} changeById`, { id, currentCamera: this.currentCamera, multicamera: this.multicamera });
|
|
49530
49530
|
if (!this.currentCamera) {
|
|
49531
49531
|
return;
|
|
49532
49532
|
}
|
|
@@ -49543,7 +49543,7 @@ class MultiCamera extends UICorePlugin {
|
|
|
49543
49543
|
// TODO remove?
|
|
49544
49544
|
// for html5 playback:
|
|
49545
49545
|
this.options.dvrEnabled = this.currentCamera.dvr;
|
|
49546
|
-
trace(`${T$
|
|
49546
|
+
trace(`${T$b} changeById`, { currentCamera: this.currentCamera });
|
|
49547
49547
|
// TODO
|
|
49548
49548
|
this.core.configure({
|
|
49549
49549
|
playback: playbackOptions,
|
|
@@ -49601,7 +49601,7 @@ const pipIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"no
|
|
|
49601
49601
|
const buttonHtml$2 = "<button class=\"gplayer-lite-btn gcore-skin-button-color\">\n <%= pipIcon %>\n</button>\n";
|
|
49602
49602
|
|
|
49603
49603
|
const VERSION$3 = '0.0.1';
|
|
49604
|
-
const T$
|
|
49604
|
+
const T$a = `plugins.pip`;
|
|
49605
49605
|
/**
|
|
49606
49606
|
* `PLUGIN` that enables picture in picture mode.
|
|
49607
49607
|
* @beta
|
|
@@ -49659,7 +49659,7 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49659
49659
|
});
|
|
49660
49660
|
}
|
|
49661
49661
|
isPiPSupported() {
|
|
49662
|
-
trace(`${T$
|
|
49662
|
+
trace(`${T$a} isPiPSupported`, {
|
|
49663
49663
|
pictureInPictureEnabled: !!document.pictureInPictureEnabled,
|
|
49664
49664
|
requestPictureInPicture: !!HTMLVideoElement.prototype.requestPictureInPicture,
|
|
49665
49665
|
});
|
|
@@ -49680,7 +49680,7 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49680
49680
|
return this;
|
|
49681
49681
|
}
|
|
49682
49682
|
togglePictureInPicture() {
|
|
49683
|
-
trace(`${T$
|
|
49683
|
+
trace(`${T$a} togglePictureInPicture`);
|
|
49684
49684
|
if (this.videoElement !== document.pictureInPictureElement) {
|
|
49685
49685
|
this.requestPictureInPicture();
|
|
49686
49686
|
}
|
|
@@ -49689,13 +49689,13 @@ class PictureInPicture extends UICorePlugin {
|
|
|
49689
49689
|
}
|
|
49690
49690
|
}
|
|
49691
49691
|
requestPictureInPicture() {
|
|
49692
|
-
trace(`${T$
|
|
49692
|
+
trace(`${T$a} requestPictureInPicture`, {
|
|
49693
49693
|
videoElement: !!this.videoElement,
|
|
49694
49694
|
});
|
|
49695
49695
|
this.videoElement.requestPictureInPicture();
|
|
49696
49696
|
}
|
|
49697
49697
|
exitPictureInPicture() {
|
|
49698
|
-
trace(`${T$
|
|
49698
|
+
trace(`${T$a} exitPictureInPicture`);
|
|
49699
49699
|
document.exitPictureInPicture();
|
|
49700
49700
|
}
|
|
49701
49701
|
}
|
|
@@ -49722,7 +49722,7 @@ const DEFAULT_PLAYBACK_RATES = [
|
|
|
49722
49722
|
{ value: 2.0, label: '2x' },
|
|
49723
49723
|
];
|
|
49724
49724
|
const DEFAULT_PLAYBACK_RATE = 1;
|
|
49725
|
-
const T$
|
|
49725
|
+
const T$9 = 'plugins.playback_rate';
|
|
49726
49726
|
/**
|
|
49727
49727
|
* `PLUGIN` that allows changing the playback speed of the video.
|
|
49728
49728
|
* @beta
|
|
@@ -49808,7 +49808,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49808
49808
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChange);
|
|
49809
49809
|
}
|
|
49810
49810
|
onCoreReady() {
|
|
49811
|
-
trace(`${T$
|
|
49811
|
+
trace(`${T$9} onCoreReady`);
|
|
49812
49812
|
const mediaControl = this.core.getPlugin('media_control');
|
|
49813
49813
|
assert(mediaControl, 'media_control plugin is required');
|
|
49814
49814
|
const gear = this.core.getPlugin('bottom_gear');
|
|
@@ -49817,7 +49817,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49817
49817
|
this.listenTo(gear, GearEvents.RENDERED, this.onGearRendered);
|
|
49818
49818
|
}
|
|
49819
49819
|
onActiveContainerChange() {
|
|
49820
|
-
trace(`${T$
|
|
49820
|
+
trace(`${T$9} onActiveContainerChange`);
|
|
49821
49821
|
this.metadataLoaded = false;
|
|
49822
49822
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
|
|
49823
49823
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
|
|
@@ -49825,15 +49825,15 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49825
49825
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onMetaDataLoaded);
|
|
49826
49826
|
}
|
|
49827
49827
|
onMediaControlRendered() {
|
|
49828
|
-
trace(`${T$
|
|
49828
|
+
trace(`${T$9} onMediaControlRendered`);
|
|
49829
49829
|
this.render();
|
|
49830
49830
|
}
|
|
49831
49831
|
onGearRendered() {
|
|
49832
|
-
trace(`${T$
|
|
49832
|
+
trace(`${T$9} onGearRendered`);
|
|
49833
49833
|
this.mount();
|
|
49834
49834
|
}
|
|
49835
49835
|
mount() {
|
|
49836
|
-
trace(`${T$
|
|
49836
|
+
trace(`${T$9} mount`, {
|
|
49837
49837
|
shouldMount: this.shouldMount(),
|
|
49838
49838
|
});
|
|
49839
49839
|
if (!this.shouldMount()) {
|
|
@@ -49850,7 +49850,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49850
49850
|
})));
|
|
49851
49851
|
}
|
|
49852
49852
|
onMetaDataLoaded() {
|
|
49853
|
-
trace(`${T$
|
|
49853
|
+
trace(`${T$9} onMetaDataLoaded`, {
|
|
49854
49854
|
playbackType: this.core.activePlayback.getPlaybackType(),
|
|
49855
49855
|
dvrEnabled: this.core.activePlayback.dvrEnabled,
|
|
49856
49856
|
});
|
|
@@ -49872,14 +49872,14 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49872
49872
|
this.core.activePlayback?.setPlaybackRate(this.selectedRate);
|
|
49873
49873
|
}
|
|
49874
49874
|
else {
|
|
49875
|
-
trace(`${T$
|
|
49875
|
+
trace(`${T$9} onPlaybackRateChange not steering to the selected rate, it is seemingly a catchup algorithm working`, {
|
|
49876
49876
|
playbackRate,
|
|
49877
49877
|
selectedRate: this.selectedRate,
|
|
49878
49878
|
});
|
|
49879
49879
|
}
|
|
49880
49880
|
}
|
|
49881
49881
|
shouldMount() {
|
|
49882
|
-
trace(`${T$
|
|
49882
|
+
trace(`${T$9} shouldMount`, {
|
|
49883
49883
|
playbackType: this.core.activePlayback?.getPlaybackType(),
|
|
49884
49884
|
dvrEnabled: this.core.activePlayback?.dvrEnabled,
|
|
49885
49885
|
});
|
|
@@ -49896,7 +49896,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49896
49896
|
* @internal
|
|
49897
49897
|
*/
|
|
49898
49898
|
render() {
|
|
49899
|
-
trace(`${T$
|
|
49899
|
+
trace(`${T$9} render`, {
|
|
49900
49900
|
shouldMount: this.shouldMount(),
|
|
49901
49901
|
});
|
|
49902
49902
|
this.$el.html(PlaybackRate.listTemplate({
|
|
@@ -49942,13 +49942,13 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49942
49942
|
}
|
|
49943
49943
|
}
|
|
49944
49944
|
syncRate() {
|
|
49945
|
-
trace(`${T$
|
|
49945
|
+
trace(`${T$9} syncRate`, {
|
|
49946
49946
|
selectedRate: this.selectedRate,
|
|
49947
49947
|
});
|
|
49948
49948
|
this.core.activePlayback?.setPlaybackRate(this.selectedRate);
|
|
49949
49949
|
}
|
|
49950
49950
|
resetPlaybackRate() {
|
|
49951
|
-
trace(`${T$
|
|
49951
|
+
trace(`${T$9} resetPlaybackRate`, {
|
|
49952
49952
|
selectedRate: this.selectedRate,
|
|
49953
49953
|
});
|
|
49954
49954
|
this.core.activePlayback?.setPlaybackRate(DEFAULT_PLAYBACK_RATE);
|
|
@@ -49983,7 +49983,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49983
49983
|
?.label || `x${rate}`);
|
|
49984
49984
|
}
|
|
49985
49985
|
highlightCurrentRate() {
|
|
49986
|
-
trace(`${T$
|
|
49986
|
+
trace(`${T$9} highlightCurrentRate`, {
|
|
49987
49987
|
selectedRate: this.selectedRate,
|
|
49988
49988
|
});
|
|
49989
49989
|
this.allRateElements().removeClass('current');
|
|
@@ -49994,7 +49994,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49994
49994
|
.addClass('gcore-skin-active');
|
|
49995
49995
|
}
|
|
49996
49996
|
updateGearOptionLabel() {
|
|
49997
|
-
trace(`${T$
|
|
49997
|
+
trace(`${T$9} updateGearOptionLabel`, {
|
|
49998
49998
|
selectedRate: this.selectedRate,
|
|
49999
49999
|
});
|
|
50000
50000
|
this.mount();
|
|
@@ -50006,7 +50006,7 @@ const posterHTML = "<div class=\"play-wrapper\" data-poster></div>\n";
|
|
|
50006
50006
|
//Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
50007
50007
|
// Use of this source code is governed by a BSD-style
|
|
50008
50008
|
// license that can be found in the LICENSE file.
|
|
50009
|
-
const T$
|
|
50009
|
+
const T$8 = 'plugins.poster';
|
|
50010
50010
|
/**
|
|
50011
50011
|
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
50012
50012
|
* @beta
|
|
@@ -50112,13 +50112,13 @@ class Poster extends UIContainerPlugin {
|
|
|
50112
50112
|
* Disables the plugin, unmounting it from the DOM
|
|
50113
50113
|
*/
|
|
50114
50114
|
disable() {
|
|
50115
|
-
trace(`${T$
|
|
50115
|
+
trace(`${T$8} disable`);
|
|
50116
50116
|
this.hasStartedPlaying = false;
|
|
50117
50117
|
this.playRequested = false;
|
|
50118
50118
|
super.disable();
|
|
50119
50119
|
}
|
|
50120
50120
|
onError(error) {
|
|
50121
|
-
trace(`${T$
|
|
50121
|
+
trace(`${T$8} onError`, {
|
|
50122
50122
|
error,
|
|
50123
50123
|
enabled: this.enabled,
|
|
50124
50124
|
});
|
|
@@ -50131,18 +50131,18 @@ class Poster extends UIContainerPlugin {
|
|
|
50131
50131
|
}
|
|
50132
50132
|
}
|
|
50133
50133
|
onPlay() {
|
|
50134
|
-
trace(`${T$
|
|
50134
|
+
trace(`${T$8} onPlay`);
|
|
50135
50135
|
this.hasStartedPlaying = true;
|
|
50136
50136
|
this.playRequested = false;
|
|
50137
50137
|
this.update();
|
|
50138
50138
|
}
|
|
50139
50139
|
onPlayIntent() {
|
|
50140
|
-
trace(`${T$
|
|
50140
|
+
trace(`${T$8} onPlayIntent`);
|
|
50141
50141
|
this.playRequested = true;
|
|
50142
50142
|
this.update();
|
|
50143
50143
|
}
|
|
50144
50144
|
onStop() {
|
|
50145
|
-
trace(`${T$
|
|
50145
|
+
trace(`${T$8} onStop`, {
|
|
50146
50146
|
enabled: this.enabled,
|
|
50147
50147
|
});
|
|
50148
50148
|
this.hasStartedPlaying = false;
|
|
@@ -50150,7 +50150,7 @@ class Poster extends UIContainerPlugin {
|
|
|
50150
50150
|
this.update();
|
|
50151
50151
|
}
|
|
50152
50152
|
updatePlayButton(show) {
|
|
50153
|
-
trace(`${T$
|
|
50153
|
+
trace(`${T$8} updatePlayButton`, {
|
|
50154
50154
|
show,
|
|
50155
50155
|
chromeless: this.options.chromeless,
|
|
50156
50156
|
allowUserInteraction: this.options.allowUserInteraction,
|
|
@@ -50179,7 +50179,7 @@ class Poster extends UIContainerPlugin {
|
|
|
50179
50179
|
this.$el.removeClass('clickable');
|
|
50180
50180
|
}
|
|
50181
50181
|
clicked() {
|
|
50182
|
-
trace(`${T$
|
|
50182
|
+
trace(`${T$8} clicked`, {
|
|
50183
50183
|
hasStartedPlaying: this.hasStartedPlaying,
|
|
50184
50184
|
chromeless: this.options.chromeless,
|
|
50185
50185
|
allowUserInteraction: this.options.allowUserInteraction,
|
|
@@ -50200,7 +50200,7 @@ class Poster extends UIContainerPlugin {
|
|
|
50200
50200
|
return !this.container.playback.isAudioOnly;
|
|
50201
50201
|
}
|
|
50202
50202
|
update() {
|
|
50203
|
-
trace(`${T$
|
|
50203
|
+
trace(`${T$8} update`, {
|
|
50204
50204
|
shouldRender: this.shouldRender,
|
|
50205
50205
|
});
|
|
50206
50206
|
if (!this.shouldRender) {
|
|
@@ -50213,7 +50213,7 @@ class Poster extends UIContainerPlugin {
|
|
|
50213
50213
|
this.updatePoster();
|
|
50214
50214
|
}
|
|
50215
50215
|
updatePoster() {
|
|
50216
|
-
trace(`${T$
|
|
50216
|
+
trace(`${T$8} updatePoster`, {
|
|
50217
50217
|
hasStartedPlaying: this.hasStartedPlaying,
|
|
50218
50218
|
});
|
|
50219
50219
|
if (!this.hasStartedPlaying) {
|
|
@@ -50228,7 +50228,7 @@ class Poster extends UIContainerPlugin {
|
|
|
50228
50228
|
this.$el.show();
|
|
50229
50229
|
}
|
|
50230
50230
|
hidePoster() {
|
|
50231
|
-
trace(`${T$
|
|
50231
|
+
trace(`${T$8} hidePoster`, {
|
|
50232
50232
|
shouldHideOnPlay: this.shouldHideOnPlay(),
|
|
50233
50233
|
});
|
|
50234
50234
|
if (!this.options.disableMediaControl) {
|
|
@@ -50284,7 +50284,7 @@ const listHtml = "<button class=\"gplayer-lite-btn go-back gcore-skin-text-color
|
|
|
50284
50284
|
|
|
50285
50285
|
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";
|
|
50286
50286
|
|
|
50287
|
-
const T$
|
|
50287
|
+
const T$7 = 'plugins.quality_levels';
|
|
50288
50288
|
const VERSION$2 = 'v2.22.5';
|
|
50289
50289
|
/**
|
|
50290
50290
|
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
@@ -50361,14 +50361,14 @@ class QualityLevels extends UICorePlugin {
|
|
|
50361
50361
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChange);
|
|
50362
50362
|
}
|
|
50363
50363
|
onCoreReady() {
|
|
50364
|
-
trace(`${T$
|
|
50364
|
+
trace(`${T$7} onCoreReady`);
|
|
50365
50365
|
const gear = this.core.getPlugin('bottom_gear');
|
|
50366
50366
|
assert(gear, 'bottom_gear plugin is required');
|
|
50367
50367
|
this.currentText = this.core.i18n.t('auto');
|
|
50368
50368
|
this.listenTo(gear, GearEvents.RENDERED, this.onGearRendered);
|
|
50369
50369
|
}
|
|
50370
50370
|
onGearRendered() {
|
|
50371
|
-
trace(`${T$
|
|
50371
|
+
trace(`${T$7} onGearRendered`);
|
|
50372
50372
|
this.render();
|
|
50373
50373
|
}
|
|
50374
50374
|
onActiveContainerChange() {
|
|
@@ -50397,7 +50397,7 @@ class QualityLevels extends UICorePlugin {
|
|
|
50397
50397
|
}
|
|
50398
50398
|
}
|
|
50399
50399
|
onStop() {
|
|
50400
|
-
trace(`${T$
|
|
50400
|
+
trace(`${T$7} onStop`);
|
|
50401
50401
|
this.listenToOnce(this.core.activePlayback, Events$1.PLAYBACK_PLAY, () => {
|
|
50402
50402
|
if (this.core.activePlayback.getPlaybackType() === 'live') {
|
|
50403
50403
|
if (this.selectedLevelId !== -1) {
|
|
@@ -50493,7 +50493,7 @@ class QualityLevels extends UICorePlugin {
|
|
|
50493
50493
|
return false;
|
|
50494
50494
|
}
|
|
50495
50495
|
goBack() {
|
|
50496
|
-
trace(`${T$
|
|
50496
|
+
trace(`${T$7} goBack`);
|
|
50497
50497
|
this.core.getPlugin('bottom_gear').refresh();
|
|
50498
50498
|
}
|
|
50499
50499
|
setLevel(index) {
|
|
@@ -50528,11 +50528,11 @@ class QualityLevels extends UICorePlugin {
|
|
|
50528
50528
|
return this.levelLabels[index] ?? formatLevelLabel(this.levels[index]);
|
|
50529
50529
|
}
|
|
50530
50530
|
onBitrate(info) {
|
|
50531
|
-
trace(`${T$
|
|
50531
|
+
trace(`${T$7} updateCurrentLevel`, { info });
|
|
50532
50532
|
this.highlightCurrentLevel();
|
|
50533
50533
|
}
|
|
50534
50534
|
highlightCurrentLevel() {
|
|
50535
|
-
trace(`${T$
|
|
50535
|
+
trace(`${T$7} highlightCurrentLevel`, {
|
|
50536
50536
|
selectedLevelId: this.selectedLevelId,
|
|
50537
50537
|
});
|
|
50538
50538
|
this.allLevelElements()
|
|
@@ -50823,10 +50823,11 @@ class Share extends UICorePlugin {
|
|
|
50823
50823
|
}
|
|
50824
50824
|
}
|
|
50825
50825
|
|
|
50826
|
-
const pluginHtml$1 = "<div class=\"skip-container\"
|
|
50826
|
+
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";
|
|
50827
50827
|
|
|
50828
|
+
const T$6 = 'plugins.skip_time';
|
|
50828
50829
|
/**
|
|
50829
|
-
* `PLUGIN` that
|
|
50830
|
+
* `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
|
|
50830
50831
|
* @beta
|
|
50831
50832
|
*/
|
|
50832
50833
|
class SkipTime extends UICorePlugin {
|
|
@@ -50839,39 +50840,56 @@ class SkipTime extends UICorePlugin {
|
|
|
50839
50840
|
get container() {
|
|
50840
50841
|
return this.core && this.core.activeContainer;
|
|
50841
50842
|
}
|
|
50842
|
-
|
|
50843
|
-
|
|
50844
|
-
|
|
50843
|
+
static template = tmpl(pluginHtml$1);
|
|
50844
|
+
/**
|
|
50845
|
+
* @internal
|
|
50846
|
+
*/
|
|
50845
50847
|
get attributes() {
|
|
50846
50848
|
return {
|
|
50847
|
-
class:
|
|
50848
|
-
'data-skip-time': '',
|
|
50849
|
+
class: 'mc-skip-time',
|
|
50849
50850
|
};
|
|
50850
50851
|
}
|
|
50851
50852
|
position = 'mid';
|
|
50853
|
+
/**
|
|
50854
|
+
* @internal
|
|
50855
|
+
*/
|
|
50852
50856
|
get events() {
|
|
50853
50857
|
return {
|
|
50854
|
-
'click
|
|
50855
|
-
'click
|
|
50856
|
-
'click
|
|
50858
|
+
'click #mc-skip-left': 'setBack',
|
|
50859
|
+
'click #mc-skip-mid': 'setMidClick',
|
|
50860
|
+
'click #mc-skip-right': 'setForward',
|
|
50857
50861
|
};
|
|
50858
50862
|
}
|
|
50863
|
+
/**
|
|
50864
|
+
* @internal
|
|
50865
|
+
*/
|
|
50859
50866
|
bindEvents() {
|
|
50860
50867
|
this.listenTo(this.core, Events$1.CORE_READY, this.render);
|
|
50861
|
-
|
|
50862
|
-
|
|
50863
|
-
|
|
50868
|
+
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onContainerChanged);
|
|
50869
|
+
}
|
|
50870
|
+
onContainerChanged() {
|
|
50864
50871
|
this.listenTo(this.container, Events$1.CONTAINER_DBLCLICK, this.handleRewindClicks);
|
|
50872
|
+
this.mount();
|
|
50865
50873
|
}
|
|
50866
50874
|
setBack() {
|
|
50875
|
+
trace(`${T$6} setBack`);
|
|
50867
50876
|
this.position = 'left';
|
|
50868
50877
|
}
|
|
50869
50878
|
handleRewindClicks() {
|
|
50879
|
+
trace(`${T$6} handleRewindClicks`, {
|
|
50880
|
+
position: this.position,
|
|
50881
|
+
});
|
|
50870
50882
|
if (this.core.getPlaybackType() === Playback.LIVE &&
|
|
50871
50883
|
!this.container.isDvrEnabled()) {
|
|
50872
50884
|
this.toggleFullscreen();
|
|
50873
50885
|
return;
|
|
50874
50886
|
}
|
|
50887
|
+
this.handleSkip();
|
|
50888
|
+
}
|
|
50889
|
+
handleSkip() {
|
|
50890
|
+
trace(`${T$6} handleSkip`, {
|
|
50891
|
+
position: this.position,
|
|
50892
|
+
});
|
|
50875
50893
|
if (Browser.isMobile) {
|
|
50876
50894
|
if (this.position === 'left') {
|
|
50877
50895
|
const seekPos = this.container.getCurrentTime() - 10;
|
|
@@ -50893,24 +50911,31 @@ class SkipTime extends UICorePlugin {
|
|
|
50893
50911
|
}
|
|
50894
50912
|
}
|
|
50895
50913
|
setMidClick() {
|
|
50914
|
+
trace(`${T$6} setMidClick`);
|
|
50896
50915
|
this.position = 'mid';
|
|
50897
50916
|
}
|
|
50898
50917
|
setForward() {
|
|
50918
|
+
trace(`${T$6} setForward`);
|
|
50899
50919
|
this.position = 'right';
|
|
50900
50920
|
}
|
|
50901
50921
|
toggleFullscreen() {
|
|
50922
|
+
trace(`${T$6} toggleFullscreen`);
|
|
50902
50923
|
this.trigger(Events$1.MEDIACONTROL_FULLSCREEN, this.name);
|
|
50903
50924
|
this.container.fullscreen();
|
|
50904
50925
|
this.core.toggleFullscreen();
|
|
50905
50926
|
}
|
|
50927
|
+
/**
|
|
50928
|
+
* @internal
|
|
50929
|
+
*/
|
|
50906
50930
|
render() {
|
|
50907
|
-
|
|
50908
|
-
|
|
50909
|
-
this.core.activeContainer.$el.append(this.el);
|
|
50910
|
-
}
|
|
50911
|
-
this.bindEvents();
|
|
50931
|
+
trace(`${T$6} render`);
|
|
50932
|
+
this.$el.html(SkipTime.template());
|
|
50912
50933
|
return this;
|
|
50913
50934
|
}
|
|
50935
|
+
mount() {
|
|
50936
|
+
trace(`${T$6} mount`);
|
|
50937
|
+
this.core.activeContainer.$el.append(this.el);
|
|
50938
|
+
}
|
|
50914
50939
|
}
|
|
50915
50940
|
|
|
50916
50941
|
const spinnerHTML = "<div data-bounce1></div>\n<div data-bounce2></div>\n<div data-bounce3></div>\n";
|