@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/core.js
CHANGED
|
@@ -12871,7 +12871,6 @@ class DashPlayback extends BasePlayback {
|
|
|
12871
12871
|
trace(`${T$3} _onPlaybackError`, { event });
|
|
12872
12872
|
};
|
|
12873
12873
|
_onDASHJSSError = (event) => {
|
|
12874
|
-
trace(`${T$3} _onDASHJSSError`, { event });
|
|
12875
12874
|
this._stopTimeUpdateTimer();
|
|
12876
12875
|
// Note that the other error types are deprecated
|
|
12877
12876
|
const e = event.error;
|
|
@@ -12906,7 +12905,6 @@ class DashPlayback extends BasePlayback {
|
|
|
12906
12905
|
}
|
|
12907
12906
|
};
|
|
12908
12907
|
triggerError(error) {
|
|
12909
|
-
trace(`${T$3} triggerError`, { error });
|
|
12910
12908
|
// this triggers Events.ERROR to be handled by the UI
|
|
12911
12909
|
this.trigger(Events$1.PLAYBACK_ERROR, this.createError(error, {
|
|
12912
12910
|
useCodePrefix: false,
|
|
@@ -12945,14 +12943,8 @@ class DashPlayback extends BasePlayback {
|
|
|
12945
12943
|
}
|
|
12946
12944
|
get dvrEnabled() {
|
|
12947
12945
|
if (!this._dash) {
|
|
12948
|
-
trace(`${T$3} dvrEnable no dash player instance`);
|
|
12949
12946
|
return false;
|
|
12950
12947
|
}
|
|
12951
|
-
trace(`${T$3} get.dvrEnabled`, {
|
|
12952
|
-
dvrWindowSize: this._dash?.getDVRWindowSize(),
|
|
12953
|
-
minDvrSize: this._minDvrSize,
|
|
12954
|
-
playbackType: this.getPlaybackType(),
|
|
12955
|
-
});
|
|
12956
12948
|
return (this._dash?.getDVRWindowSize() >= this._minDvrSize &&
|
|
12957
12949
|
this.getPlaybackType() === Playback.LIVE);
|
|
12958
12950
|
}
|
|
@@ -12970,7 +12962,6 @@ class DashPlayback extends BasePlayback {
|
|
|
12970
12962
|
this.trigger(Events$1.PLAYBACK_PROGRESS, progress, {});
|
|
12971
12963
|
}
|
|
12972
12964
|
play() {
|
|
12973
|
-
trace(`${T$3} play`, { dash: !!this._dash });
|
|
12974
12965
|
!this._dash && this._setup();
|
|
12975
12966
|
super.play();
|
|
12976
12967
|
this._startTimeUpdateTimer();
|
|
@@ -13056,7 +13047,6 @@ class DashPlayback extends BasePlayback {
|
|
|
13056
13047
|
}
|
|
13057
13048
|
// @ts-expect-error
|
|
13058
13049
|
get currentAudioTrack() {
|
|
13059
|
-
trace(`${T$3} get currentAudioTrack`);
|
|
13060
13050
|
assert.ok(this._dash, 'DASH.js MediaPlayer is not initialized');
|
|
13061
13051
|
const t = this._dash.getCurrentTrackFor('audio');
|
|
13062
13052
|
if (!t) {
|
|
@@ -41996,7 +41986,6 @@ class HlsPlayback extends BasePlayback {
|
|
|
41996
41986
|
maxMaxBufferLength: 4,
|
|
41997
41987
|
autoStartLoad: false,
|
|
41998
41988
|
}, this.options.playback.hlsjsConfig);
|
|
41999
|
-
trace(`${T$2} _createHLSInstance`, { config });
|
|
42000
41989
|
this._hls = new Hls(config);
|
|
42001
41990
|
}
|
|
42002
41991
|
_attachHLSMedia() {
|
|
@@ -42038,9 +42027,9 @@ class HlsPlayback extends BasePlayback {
|
|
|
42038
42027
|
this._hls.on(Hls.Events.FRAG_LOADED, (evt, data) => this._onFragmentLoaded(evt, data));
|
|
42039
42028
|
this._hls.on(Hls.Events.FRAG_PARSING_METADATA, (evt, data) => this._onFragmentParsingMetadata(evt, data));
|
|
42040
42029
|
this._hls.on(Hls.Events.ERROR, (evt, data) => this._onHLSJSError(evt, data));
|
|
42041
|
-
// this._hls.on(HLSJS.Events.SUBTITLE_TRACK_LOADED, (
|
|
42042
|
-
this.
|
|
42043
|
-
|
|
42030
|
+
// this._hls.on(HLSJS.Events.SUBTITLE_TRACK_LOADED, () =>
|
|
42031
|
+
// this._onSubtitleLoaded(),
|
|
42032
|
+
// )
|
|
42044
42033
|
this._hls.on(Events.AUDIO_TRACKS_UPDATED, (evt, data) => this._onAudioTracksUpdated(evt, data));
|
|
42045
42034
|
this._hls.on(Events.AUDIO_TRACK_SWITCHED, (evt, data) => this._onAudioTrackSwitched(evt, data));
|
|
42046
42035
|
this.bindCustomListeners();
|
|
@@ -42370,11 +42359,13 @@ class HlsPlayback extends BasePlayback {
|
|
|
42370
42359
|
this._playbackType = (data.details.live ? Playback.LIVE : Playback.VOD);
|
|
42371
42360
|
this._onLevelUpdated(evt, data);
|
|
42372
42361
|
// Live stream subtitle tracks detection hack (may not immediately available)
|
|
42373
|
-
if (
|
|
42374
|
-
|
|
42375
|
-
|
|
42376
|
-
|
|
42377
|
-
|
|
42362
|
+
// if (
|
|
42363
|
+
// this._ccTracksUpdated &&
|
|
42364
|
+
// this._playbackType === Playback.LIVE &&
|
|
42365
|
+
// this.hasClosedCaptionsTracks
|
|
42366
|
+
// ) {
|
|
42367
|
+
// this._onSubtitleLoaded()
|
|
42368
|
+
// }
|
|
42378
42369
|
if (prevPlaybackType !== this._playbackType) {
|
|
42379
42370
|
this._updateSettings();
|
|
42380
42371
|
}
|
|
@@ -42527,16 +42518,18 @@ class HlsPlayback extends BasePlayback {
|
|
|
42527
42518
|
_onFragmentLoaded(evt, data) {
|
|
42528
42519
|
this.trigger(Events$1.PLAYBACK_FRAGMENT_LOADED, data);
|
|
42529
42520
|
}
|
|
42530
|
-
_onSubtitleLoaded() {
|
|
42531
|
-
|
|
42532
|
-
|
|
42533
|
-
|
|
42534
|
-
|
|
42535
|
-
|
|
42536
|
-
|
|
42537
|
-
|
|
42538
|
-
|
|
42539
|
-
|
|
42521
|
+
// _onSubtitleLoaded() {
|
|
42522
|
+
// trace(`${T} _onSubtitleLoaded`)
|
|
42523
|
+
// // This event may be triggered multiple times
|
|
42524
|
+
// // Setup CC only once (disable CC by default)
|
|
42525
|
+
// if (!this._ccIsSetup) {
|
|
42526
|
+
// this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)
|
|
42527
|
+
// const trackId =
|
|
42528
|
+
// this._playbackType === Playback.LIVE ? -1 : this.closedCaptionsTrackId
|
|
42529
|
+
// this.closedCaptionsTrackId = trackId
|
|
42530
|
+
// this._ccIsSetup = true
|
|
42531
|
+
// }
|
|
42532
|
+
// }
|
|
42540
42533
|
_onLevelSwitch(evt, data) {
|
|
42541
42534
|
if (!this.levels.length) {
|
|
42542
42535
|
this._fillLevels();
|
|
@@ -42600,7 +42593,6 @@ class HlsPlayback extends BasePlayback {
|
|
|
42600
42593
|
this._hls.audioTrack = Number(id); // TODO or find index by .id == id?
|
|
42601
42594
|
}
|
|
42602
42595
|
_onAudioTracksUpdated(_, data) {
|
|
42603
|
-
trace(`${T$2} onAudioTracksUpdated`);
|
|
42604
42596
|
this.trigger(Events$1.PLAYBACK_AUDIO_AVAILABLE, data.audioTracks.map(toClapprTrack));
|
|
42605
42597
|
}
|
|
42606
42598
|
_onAudioTrackSwitched(_, data) {
|
|
@@ -42633,9 +42625,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42633
42625
|
* @internal
|
|
42634
42626
|
*/
|
|
42635
42627
|
createError(errorData, options) {
|
|
42636
|
-
trace(`${T$1} createError`, {
|
|
42637
|
-
errorData: { ...errorData },
|
|
42638
|
-
});
|
|
42639
42628
|
const i18n = this.i18n ||
|
|
42640
42629
|
// @ts-ignore
|
|
42641
42630
|
(this.core && this.core.i18n) ||
|
|
@@ -42649,11 +42638,9 @@ class HTML5Video extends BasePlayback {
|
|
|
42649
42638
|
return super.createError(errorData, { ...options, useCodePrefix: false });
|
|
42650
42639
|
}
|
|
42651
42640
|
_onWaiting() {
|
|
42652
|
-
trace(`${T$1} _onWaiting`);
|
|
42653
42641
|
super._onWaiting();
|
|
42654
42642
|
}
|
|
42655
42643
|
_onEnded() {
|
|
42656
|
-
trace(`${T$1} _onEnded`);
|
|
42657
42644
|
if (this.stallTimerId) {
|
|
42658
42645
|
clearTimeout(this.stallTimerId);
|
|
42659
42646
|
this.stallTimerId = null;
|
|
@@ -42661,15 +42648,8 @@ class HTML5Video extends BasePlayback {
|
|
|
42661
42648
|
super._onEnded();
|
|
42662
42649
|
}
|
|
42663
42650
|
_handleBufferingEvents() {
|
|
42664
|
-
trace(`${T$1} _handleBufferingEvents`, {
|
|
42665
|
-
networkState: this.el.networkState,
|
|
42666
|
-
});
|
|
42667
42651
|
if (!this.stallTimerId) {
|
|
42668
42652
|
this.stallTimerId = setTimeout(() => {
|
|
42669
|
-
trace(`${T$1} _handleBufferingEvents stall timeout`, {
|
|
42670
|
-
buffering: this.buffering,
|
|
42671
|
-
ended: this.ended,
|
|
42672
|
-
});
|
|
42673
42653
|
this.stallTimerId = null;
|
|
42674
42654
|
const error = this.createError({
|
|
42675
42655
|
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
@@ -42684,7 +42664,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42684
42664
|
super._handleBufferingEvents();
|
|
42685
42665
|
}
|
|
42686
42666
|
_onPlaying() {
|
|
42687
|
-
trace(`${T$1} _onPlaying`);
|
|
42688
42667
|
if (this.stallTimerId) {
|
|
42689
42668
|
clearTimeout(this.stallTimerId);
|
|
42690
42669
|
this.stallTimerId = null;
|
|
@@ -42692,7 +42671,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42692
42671
|
super._onPlaying();
|
|
42693
42672
|
}
|
|
42694
42673
|
_onPause() {
|
|
42695
|
-
trace(`${T$1} _onPause`);
|
|
42696
42674
|
super._onPause();
|
|
42697
42675
|
if (this.stallTimerId) {
|
|
42698
42676
|
clearTimeout(this.stallTimerId);
|
|
@@ -42702,7 +42680,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42702
42680
|
get audioTracks() {
|
|
42703
42681
|
const tracks = this.el.audioTracks;
|
|
42704
42682
|
const supported = !!tracks;
|
|
42705
|
-
trace(`${T$1} get audioTracks`, { supported });
|
|
42706
42683
|
const retval = [];
|
|
42707
42684
|
if (supported) {
|
|
42708
42685
|
for (let i = 0; i < tracks.length; i++) {
|
|
@@ -42721,9 +42698,6 @@ class HTML5Video extends BasePlayback {
|
|
|
42721
42698
|
get currentAudioTrack() {
|
|
42722
42699
|
const tracks = this.el.audioTracks;
|
|
42723
42700
|
const supported = !!tracks;
|
|
42724
|
-
trace(`${T$1} get currentAudioTrack`, {
|
|
42725
|
-
supported,
|
|
42726
|
-
});
|
|
42727
42701
|
if (supported) {
|
|
42728
42702
|
for (let i = 0; i < tracks.length; i++) {
|
|
42729
42703
|
const track = tracks[i];
|
|
@@ -42849,9 +42823,6 @@ class Player {
|
|
|
42849
42823
|
* ```
|
|
42850
42824
|
*/
|
|
42851
42825
|
attachTo(playerElement) {
|
|
42852
|
-
trace(`${T} attachTo`, {
|
|
42853
|
-
player: !!this.player,
|
|
42854
|
-
});
|
|
42855
42826
|
assert.ok(!this.player, 'Player already initialized');
|
|
42856
42827
|
assert.ok(playerElement, 'Player container element is required');
|
|
42857
42828
|
if (this.config.debug === 'all' || this.config.debug === 'clappr') {
|
|
@@ -42859,9 +42830,6 @@ class Player {
|
|
|
42859
42830
|
}
|
|
42860
42831
|
const coreOpts = this.buildCoreOptions(playerElement);
|
|
42861
42832
|
const { core, container } = Player.getRegisteredPlugins();
|
|
42862
|
-
trace(`${T} init`, {
|
|
42863
|
-
registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.prototype.name),
|
|
42864
|
-
});
|
|
42865
42833
|
coreOpts.plugins = {
|
|
42866
42834
|
core: Object.values(core),
|
|
42867
42835
|
container: Object.values(container),
|
|
@@ -42873,9 +42841,6 @@ class Player {
|
|
|
42873
42841
|
* Destroys the player, releasing all resources and unmounting its UI from the DOM.
|
|
42874
42842
|
*/
|
|
42875
42843
|
destroy() {
|
|
42876
|
-
trace(`${T} destroy`, {
|
|
42877
|
-
player: !!this.player,
|
|
42878
|
-
});
|
|
42879
42844
|
if (this.player) {
|
|
42880
42845
|
this.player.destroy();
|
|
42881
42846
|
this.player = null;
|
|
@@ -43060,12 +43025,6 @@ class Player {
|
|
|
43060
43025
|
this.config = $.extend(true, this.config, config);
|
|
43061
43026
|
}
|
|
43062
43027
|
initPlayer(coreOptions) {
|
|
43063
|
-
trace(`${T} initPlayer`, {
|
|
43064
|
-
autoPlay: coreOptions.autoPlay,
|
|
43065
|
-
sources: coreOptions.sources,
|
|
43066
|
-
player: !!this.player,
|
|
43067
|
-
// TODO selected options
|
|
43068
|
-
});
|
|
43069
43028
|
const player = new Player$1(coreOptions);
|
|
43070
43029
|
this.player = player;
|
|
43071
43030
|
this.bindCoreListeners();
|
|
@@ -43198,13 +43157,6 @@ class Player {
|
|
|
43198
43157
|
assert.ok(this.player, 'Player is not initialized');
|
|
43199
43158
|
const core = this.player.core;
|
|
43200
43159
|
core.on(Events$1.CORE_SCREEN_ORIENTATION_CHANGED, ({ orientation }) => {
|
|
43201
|
-
trace(`${T} on CORE_SCREEN_ORIENTATION_CHANGED`, {
|
|
43202
|
-
orientation,
|
|
43203
|
-
rootNode: {
|
|
43204
|
-
width: this.rootNode?.clientWidth,
|
|
43205
|
-
height: this.rootNode?.clientHeight,
|
|
43206
|
-
},
|
|
43207
|
-
});
|
|
43208
43160
|
if (Browser.isiOS && this.rootNode) {
|
|
43209
43161
|
core?.resize({
|
|
43210
43162
|
width: this.rootNode.clientWidth,
|
|
@@ -43213,22 +43165,15 @@ class Player {
|
|
|
43213
43165
|
}
|
|
43214
43166
|
}, null);
|
|
43215
43167
|
core.on(Events$1.CORE_RESIZE, ({ width, height }) => {
|
|
43216
|
-
trace(`${T} on CORE_RESIZE`, {
|
|
43217
|
-
width,
|
|
43218
|
-
height,
|
|
43219
|
-
});
|
|
43220
43168
|
this.safeTriggerEvent(PlayerEvent.Resize, { width, height });
|
|
43221
43169
|
}, null);
|
|
43222
43170
|
core.on(Events$1.CORE_FULLSCREEN, (isFullscreen) => {
|
|
43223
|
-
trace(`${T} CORE_FULLSCREEN`, {
|
|
43224
|
-
isFullscreen,
|
|
43225
|
-
});
|
|
43226
43171
|
this.safeTriggerEvent(PlayerEvent.Fullscreen, isFullscreen);
|
|
43227
43172
|
}, null);
|
|
43228
43173
|
}
|
|
43229
43174
|
}
|
|
43230
43175
|
|
|
43231
|
-
var version$1 = "2.
|
|
43176
|
+
var version$1 = "2.26.0";
|
|
43232
43177
|
|
|
43233
43178
|
var packages = {
|
|
43234
43179
|
"node_modules/@clappr/core": {
|