@gcorevideo/player 2.22.10 → 2.22.12
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 +2 -2
- package/dist/index.css +1272 -1272
- package/dist/index.js +36 -10
- package/dist/plugins/index.css +971 -971
- package/dist/plugins/index.js +35 -9
- package/lib/Player.js +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +6 -0
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +34 -8
- package/package.json +1 -1
- package/src/Player.ts +1 -1
- package/src/plugins/playback-rate/PlaybackRate.ts +37 -8
- package/src/plugins/playback-rate/__tests__/PlaybackRate.test.ts +16 -1
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -42846,7 +42846,7 @@ const DEFAULT_OPTIONS = {
|
|
|
42846
42846
|
debug: 'none',
|
|
42847
42847
|
loop: false,
|
|
42848
42848
|
mute: false,
|
|
42849
|
-
|
|
42849
|
+
playbackType: 'vod',
|
|
42850
42850
|
priorityTransport: 'dash',
|
|
42851
42851
|
sources: [],
|
|
42852
42852
|
strings: {},
|
|
@@ -43304,7 +43304,7 @@ class Player {
|
|
|
43304
43304
|
}
|
|
43305
43305
|
}
|
|
43306
43306
|
|
|
43307
|
-
var version$1 = "2.22.
|
|
43307
|
+
var version$1 = "2.22.12";
|
|
43308
43308
|
|
|
43309
43309
|
var packages = {
|
|
43310
43310
|
"node_modules/@clappr/core": {
|
|
@@ -49600,6 +49600,8 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49600
49600
|
// private prevSelectedRate: string | undefined
|
|
49601
49601
|
selectedRate = DEFAULT_PLAYBACK_RATE;
|
|
49602
49602
|
metadataLoaded = false;
|
|
49603
|
+
playbackSettingsUpdateReceived = false;
|
|
49604
|
+
mountTimerId = null;
|
|
49603
49605
|
/**
|
|
49604
49606
|
* @internal
|
|
49605
49607
|
*/
|
|
@@ -49659,6 +49661,7 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49659
49661
|
onActiveContainerChange() {
|
|
49660
49662
|
trace(`${T$7} onActiveContainerChange`);
|
|
49661
49663
|
this.metadataLoaded = false;
|
|
49664
|
+
this.playbackSettingsUpdateReceived = false;
|
|
49662
49665
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
|
|
49663
49666
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
|
|
49664
49667
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SETTINGSUPDATE, this.onSettingsUpdate);
|
|
@@ -49695,17 +49698,30 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49695
49698
|
playbackType: this.core.activePlayback.getPlaybackType(),
|
|
49696
49699
|
dvrEnabled: this.core.activePlayback.dvrEnabled,
|
|
49697
49700
|
});
|
|
49698
|
-
|
|
49701
|
+
this.playbackSettingsUpdateReceived = true;
|
|
49702
|
+
if (this.metadataLoaded) {
|
|
49703
|
+
if (this.mountTimerId) {
|
|
49704
|
+
clearTimeout(this.mountTimerId);
|
|
49705
|
+
this.mountTimerId = null;
|
|
49706
|
+
}
|
|
49707
|
+
this.mount();
|
|
49708
|
+
}
|
|
49699
49709
|
}
|
|
49700
49710
|
onMetaDataLoaded() {
|
|
49701
49711
|
trace(`${T$7} onMetaDataLoaded`, {
|
|
49702
49712
|
playbackType: this.core.activePlayback.getPlaybackType(),
|
|
49703
49713
|
dvrEnabled: this.core.activePlayback.dvrEnabled,
|
|
49704
49714
|
});
|
|
49705
|
-
|
|
49706
|
-
|
|
49707
|
-
this.
|
|
49708
|
-
}
|
|
49715
|
+
this.metadataLoaded = true;
|
|
49716
|
+
if (this.playbackSettingsUpdateReceived) {
|
|
49717
|
+
this.mount();
|
|
49718
|
+
}
|
|
49719
|
+
else {
|
|
49720
|
+
this.mountTimerId = setTimeout(() => {
|
|
49721
|
+
this.mountTimerId = null;
|
|
49722
|
+
this.mount();
|
|
49723
|
+
}, 25);
|
|
49724
|
+
}
|
|
49709
49725
|
}
|
|
49710
49726
|
allRateElements() {
|
|
49711
49727
|
return this.$el.find('#playback-rate-menu li');
|
|
@@ -49753,9 +49769,19 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49753
49769
|
i18n: this.core.i18n,
|
|
49754
49770
|
playbackRates: this.playbackRates,
|
|
49755
49771
|
}));
|
|
49756
|
-
this.mount()
|
|
49772
|
+
// this.mount()
|
|
49757
49773
|
return this;
|
|
49758
49774
|
}
|
|
49775
|
+
/**
|
|
49776
|
+
* @internal
|
|
49777
|
+
*/
|
|
49778
|
+
destroy() {
|
|
49779
|
+
if (this.mountTimerId) {
|
|
49780
|
+
clearTimeout(this.mountTimerId);
|
|
49781
|
+
this.mountTimerId = null;
|
|
49782
|
+
}
|
|
49783
|
+
return super.destroy();
|
|
49784
|
+
}
|
|
49759
49785
|
// private onStartAd() {
|
|
49760
49786
|
// this.prevSelectedRate = this.selectedRate
|
|
49761
49787
|
// this.resetPlaybackRate()
|
|
@@ -49817,8 +49843,8 @@ class PlaybackRate extends UICorePlugin {
|
|
|
49817
49843
|
}
|
|
49818
49844
|
getTitle() {
|
|
49819
49845
|
const rate = this.selectedRate;
|
|
49820
|
-
return (this.playbackRates.find((r) => r.value === rate)
|
|
49821
|
-
`x${rate}`);
|
|
49846
|
+
return (this.playbackRates.find((r) => r.value === rate)
|
|
49847
|
+
?.label || `x${rate}`);
|
|
49822
49848
|
}
|
|
49823
49849
|
highlightCurrentRate() {
|
|
49824
49850
|
trace(`${T$7} highlightCurrentRate`, {
|