@gcorevideo/player 2.19.0 → 2.19.1
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/index.js +1 -1
- package/dist/plugins/index.css +909 -909
- package/dist/plugins/index.js/index.plugins.js +8 -117
- package/lib/index.plugins.d.ts +0 -1
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +0 -1
- package/lib/plugins/source-controller/SourceController.d.ts +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -1
- package/package.json +1 -1
- package/src/index.plugins.ts +0 -1
- package/src/plugins/source-controller/SourceController.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/HlsPlayback-D9EmONbV.js +0 -747
- package/dist/index-C02TmVOf.js +0 -41012
- package/dist/player.d.ts +0 -646
- package/dist/plugins/index.plugins.js +0 -40837
- package/lib/backend.d.ts +0 -3
- package/lib/backend.d.ts.map +0 -1
- package/lib/backend.js +0 -10
- package/lib/constants.d.ts +0 -1
- package/lib/constants.d.ts.map +0 -1
- package/lib/constants.js +0 -1
- package/lib/gcore.types.d.ts +0 -84
- package/lib/gcore.types.d.ts.map +0 -1
- package/lib/gcore.types.js +0 -9
- package/lib/plugins/dash-playback/DashPlayback.d.ts +0 -73
- package/lib/plugins/dash-playback/DashPlayback.d.ts.map +0 -1
- package/lib/plugins/dash-playback/DashPlayback.js +0 -455
- package/lib/plugins/dash-playback/types.d.ts +0 -6
- package/lib/plugins/dash-playback/types.d.ts.map +0 -1
- package/lib/plugins/dash-playback/types.js +0 -1
- package/lib/plugins/dash-plugin/DashPlayback.d.ts +0 -86
- package/lib/plugins/dash-plugin/DashPlayback.d.ts.map +0 -1
- package/lib/plugins/dash-plugin/DashPlayback.js +0 -659
- package/lib/plugins/hls-playback/HlsPlayback.d.ts +0 -102
- package/lib/plugins/hls-playback/HlsPlayback.d.ts.map +0 -1
- package/lib/plugins/hls-playback/HlsPlayback.js +0 -815
- package/lib/trace/LogTracer.d.ts +0 -12
- package/lib/trace/LogTracer.d.ts.map +0 -1
- package/lib/trace/LogTracer.js +0 -17
- package/lib/trace/SentryTracer.d.ts +0 -12
- package/lib/trace/SentryTracer.d.ts.map +0 -1
- package/lib/trace/SentryTracer.js +0 -23
- package/lib/trace/Tracer.d.ts +0 -13
- package/lib/trace/Tracer.d.ts.map +0 -1
- package/lib/trace/Tracer.js +0 -15
- package/lib/trace/index.d.ts +0 -18
- package/lib/trace/index.d.ts.map +0 -1
- package/lib/trace/index.js +0 -27
- package/lib/trace/types.d.ts +0 -8
- package/lib/trace/types.d.ts.map +0 -1
- package/lib/trace/types.js +0 -1
- package/lib/tsdoc-metadata.json +0 -11
- package/lib/utils/Logger.d.ts +0 -23
- package/lib/utils/Logger.d.ts.map +0 -1
- package/lib/utils/Logger.js +0 -81
- package/lib/utils/canAutoplay.d.ts +0 -6
- package/lib/utils/canAutoplay.d.ts.map +0 -1
- package/lib/utils/canAutoplay.js +0 -30
- package/lib/utils/queryParams.d.ts +0 -2
- package/lib/utils/queryParams.d.ts.map +0 -1
- package/lib/utils/queryParams.js +0 -4
- package/lib/utils/scripts-load.d.ts +0 -2
- package/lib/utils/scripts-load.d.ts.map +0 -1
- package/lib/utils/scripts-load.js +0 -20
- package/lib/utils/testUtils.d.ts +0 -3
- package/lib/utils/testUtils.d.ts.map +0 -1
- package/lib/utils/testUtils.js +0 -12
- package/lib/utils/utils.d.ts +0 -3
- package/lib/utils/utils.d.ts.map +0 -1
- package/lib/utils/utils.js +0 -31
- /package/lib/plugins/dvr-controls/{DVRControls.d.ts → DvrControls.d.ts} +0 -0
- /package/lib/plugins/dvr-controls/{DVRControls.d.ts.map → DvrControls.d.ts.map} +0 -0
- /package/lib/plugins/dvr-controls/{DVRControls.js → DvrControls.js} +0 -0
|
@@ -31700,39 +31700,19 @@ class AudioSelector extends UICorePlugin {
|
|
|
31700
31700
|
}
|
|
31701
31701
|
}
|
|
31702
31702
|
|
|
31703
|
-
const tracer = {
|
|
31704
|
-
trace: () => { },
|
|
31705
|
-
reportError: () => { },
|
|
31706
|
-
};
|
|
31707
|
-
/**
|
|
31708
|
-
* @public
|
|
31709
|
-
* Sets a tracer implementation, e.g., LogTracer or SentryTracer
|
|
31710
|
-
*/
|
|
31711
|
-
function setTracer(t) {
|
|
31712
|
-
tracer.trace = t.trace.bind(t);
|
|
31713
|
-
tracer.reportError = t.reportError.bind(t);
|
|
31714
|
-
}
|
|
31715
|
-
/**
|
|
31716
|
-
* @public
|
|
31717
|
-
* @param e
|
|
31718
|
-
*/
|
|
31719
|
-
function reportError(e) {
|
|
31720
|
-
tracer.reportError(e);
|
|
31721
|
-
}
|
|
31722
31703
|
/**
|
|
31723
31704
|
* @public
|
|
31724
31705
|
* @param msg
|
|
31725
31706
|
* @param data
|
|
31726
31707
|
*/
|
|
31727
31708
|
function trace(msg, data = {}) {
|
|
31728
|
-
tracer.trace(msg, data);
|
|
31729
31709
|
}
|
|
31730
31710
|
|
|
31731
31711
|
const volumeOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M5.50025 8.00025C4.67125 8.00025 4.00025 8.67225 4.00025 9.50025V14.5003C4.00025 15.3283 4.67125 16.0003 5.50025 16.0003H7.24824C7.65024 16.0003 8.03627 16.1613 8.31727 16.4483L12.5443 20.7413C12.7083 20.9073 12.9262 20.9963 13.1492 20.9963C13.2572 20.9963 13.3672 20.9763 13.4722 20.9333C13.7932 20.8013 14.0003 20.4923 14.0003 20.1462V16.3283C14.0003 16.1963 13.9473 16.0683 13.8543 15.9753L6.02528 8.14625C5.93228 8.05325 5.80425 8.00025 5.67225 8.00025H5.50025ZM14.0003 3.85426C14.0003 3.50826 13.7932 3.19927 13.4722 3.06727C13.1502 2.93627 12.7873 3.01226 12.5443 3.25926L9.33827 6.51527C9.14627 6.71127 9.14626 7.02625 9.34126 7.22025L13.5733 11.4522C13.7313 11.6102 14.0003 11.4982 14.0003 11.2752V3.85426ZM20.8543 20.8543C20.7563 20.9513 20.6283 21.0003 20.5003 21.0003C20.3723 21.0003 20.2442 20.9513 20.1462 20.8543L3.14625 3.85426C2.95125 3.65826 2.95125 3.34225 3.14625 3.14625C3.34225 2.95125 3.65826 2.95125 3.85426 3.14625L20.8543 20.1462C21.0493 20.3422 21.0493 20.6583 20.8543 20.8543Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
|
|
31732
31712
|
|
|
31733
31713
|
const pluginHtml$7 = "<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";
|
|
31734
31714
|
|
|
31735
|
-
const T$
|
|
31715
|
+
const T$7 = "plugins.big_mute_button";
|
|
31736
31716
|
class BigMuteButton extends UICorePlugin {
|
|
31737
31717
|
isBigMuteButtonHidden = false;
|
|
31738
31718
|
_adIsPlaying = false;
|
|
@@ -31758,7 +31738,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
31758
31738
|
this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
|
|
31759
31739
|
this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
|
|
31760
31740
|
this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
|
|
31761
|
-
trace(`${T$
|
|
31741
|
+
trace(`${T$7} bindEvents`, {
|
|
31762
31742
|
mediacontrol: !!this.core.mediaControl,
|
|
31763
31743
|
});
|
|
31764
31744
|
this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_RENDERED, this.mediaControlRendered);
|
|
@@ -31794,12 +31774,8 @@ class BigMuteButton extends UICorePlugin {
|
|
|
31794
31774
|
}
|
|
31795
31775
|
mediaControlRendered() {
|
|
31796
31776
|
const container = this.core.activeContainer;
|
|
31797
|
-
trace(`${T$9} mediaControlRendered`, {
|
|
31798
|
-
container: !!container,
|
|
31799
|
-
});
|
|
31800
31777
|
if (container) {
|
|
31801
31778
|
this.listenTo(container.playback, Events$1.PLAYBACK_PLAY, () => {
|
|
31802
|
-
trace(`${T$9} PLAYBACK_PLAY`);
|
|
31803
31779
|
this.render();
|
|
31804
31780
|
});
|
|
31805
31781
|
}
|
|
@@ -31823,16 +31799,11 @@ class BigMuteButton extends UICorePlugin {
|
|
|
31823
31799
|
}
|
|
31824
31800
|
const { autoPlay, wasMuted } = this.options;
|
|
31825
31801
|
const volume = container.volume;
|
|
31826
|
-
trace(`${T$9} shouldRender`, {
|
|
31827
|
-
autoPlay,
|
|
31828
|
-
wasMuted,
|
|
31829
|
-
volume,
|
|
31830
|
-
});
|
|
31831
31802
|
return autoPlay && !wasMuted && volume === 0;
|
|
31832
31803
|
}
|
|
31833
31804
|
render() {
|
|
31834
31805
|
if (this.shouldRender()) {
|
|
31835
|
-
trace(`${T$
|
|
31806
|
+
trace(`${T$7} render`, {
|
|
31836
31807
|
el: !!this.$el,
|
|
31837
31808
|
});
|
|
31838
31809
|
this.$el.html(this.template());
|
|
@@ -31934,7 +31905,7 @@ class BottomGear extends UICorePlugin {
|
|
|
31934
31905
|
this.bindEvents();
|
|
31935
31906
|
}
|
|
31936
31907
|
highDefinitionUpdate(isHd) {
|
|
31937
|
-
trace(`${this.name} highDefinitionUpdate`, {
|
|
31908
|
+
trace(`${this.name} highDefinitionUpdate`, { });
|
|
31938
31909
|
this.isHd = isHd;
|
|
31939
31910
|
if (isHd) {
|
|
31940
31911
|
this.$el.find('.gear-icon').html(gearHdIcon);
|
|
@@ -33602,8 +33573,6 @@ class Speedtest {
|
|
|
33602
33573
|
}
|
|
33603
33574
|
}
|
|
33604
33575
|
catch (error) {
|
|
33605
|
-
// LogManager.exception(error);
|
|
33606
|
-
reportError(error);
|
|
33607
33576
|
throw 'Invalid server definition';
|
|
33608
33577
|
}
|
|
33609
33578
|
}
|
|
@@ -33686,8 +33655,6 @@ class Speedtest {
|
|
|
33686
33655
|
}
|
|
33687
33656
|
}
|
|
33688
33657
|
catch (error) {
|
|
33689
|
-
// LogManager.exception(error);
|
|
33690
|
-
reportError(error);
|
|
33691
33658
|
}
|
|
33692
33659
|
result(instspd);
|
|
33693
33660
|
}
|
|
@@ -33705,8 +33672,6 @@ class Speedtest {
|
|
|
33705
33672
|
xhr.ontimeout = xhr.onerror;
|
|
33706
33673
|
}
|
|
33707
33674
|
catch (error) {
|
|
33708
|
-
// LogManager.exception(error);
|
|
33709
|
-
reportError(error);
|
|
33710
33675
|
}
|
|
33711
33676
|
}
|
|
33712
33677
|
xhr.send();
|
|
@@ -33813,8 +33778,6 @@ class Speedtest {
|
|
|
33813
33778
|
}
|
|
33814
33779
|
}
|
|
33815
33780
|
catch (error) {
|
|
33816
|
-
// LogManager.message('Speedtest onupdate event threw exception: ' + error, SentryLogLevel.ERROR);
|
|
33817
|
-
reportError(error);
|
|
33818
33781
|
}
|
|
33819
33782
|
if (data.testState >= 4) {
|
|
33820
33783
|
try {
|
|
@@ -33823,8 +33786,6 @@ class Speedtest {
|
|
|
33823
33786
|
}
|
|
33824
33787
|
}
|
|
33825
33788
|
catch (error) {
|
|
33826
|
-
// LogManager.message('Speedtest onend event threw exception: ' + error, SentryLogLevel.ERROR);
|
|
33827
|
-
reportError(error);
|
|
33828
33789
|
}
|
|
33829
33790
|
if (this.updater !== null) {
|
|
33830
33791
|
clearInterval(this.updater);
|
|
@@ -34174,9 +34135,6 @@ class ClapprNerdStats extends UICorePlugin {
|
|
|
34174
34135
|
this.container = this.core.activeContainer;
|
|
34175
34136
|
const clapprStats = this.container?.getPlugin('clappr_stats');
|
|
34176
34137
|
if (!clapprStats) {
|
|
34177
|
-
reportError({
|
|
34178
|
-
message: 'clappr_stats plugin is not available',
|
|
34179
|
-
});
|
|
34180
34138
|
console.error('clappr-stats not available. Please, include it as a plugin of your Clappr instance.\n' +
|
|
34181
34139
|
'For more info, visit: https://github.com/clappr/clappr-stats.');
|
|
34182
34140
|
this.disable();
|
|
@@ -34212,7 +34170,6 @@ class ClapprNerdStats extends UICorePlugin {
|
|
|
34212
34170
|
initSpeedTest(this.customMetrics).then(() => {
|
|
34213
34171
|
startSpeedtest();
|
|
34214
34172
|
}).catch(e => {
|
|
34215
|
-
reportError(e);
|
|
34216
34173
|
this.disable();
|
|
34217
34174
|
});
|
|
34218
34175
|
}
|
|
@@ -35561,7 +35518,6 @@ class ClapprStats extends ContainerPlugin {
|
|
|
35561
35518
|
//Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
35562
35519
|
// Use of this source code is governed by a BSD-style
|
|
35563
35520
|
// license that can be found in the LICENSE file.
|
|
35564
|
-
const T$8 = 'plugins.click_to_pause_custom';
|
|
35565
35521
|
class ClickToPause extends ContainerPlugin {
|
|
35566
35522
|
pointerEnabled = false;
|
|
35567
35523
|
timer = null;
|
|
@@ -35581,10 +35537,6 @@ class ClickToPause extends ContainerPlugin {
|
|
|
35581
35537
|
click() {
|
|
35582
35538
|
const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
|
|
35583
35539
|
const isDvrEnabled = this.container.isDvrEnabled();
|
|
35584
|
-
trace(`${T$8} click`, {
|
|
35585
|
-
isLivePlayback,
|
|
35586
|
-
isDvrEnabled,
|
|
35587
|
-
});
|
|
35588
35540
|
if (isLivePlayback && !isDvrEnabled) {
|
|
35589
35541
|
this.togglePlay(true);
|
|
35590
35542
|
}
|
|
@@ -35599,10 +35551,6 @@ class ClickToPause extends ContainerPlugin {
|
|
|
35599
35551
|
settingsUpdate() {
|
|
35600
35552
|
const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
|
|
35601
35553
|
const pointerEnabled = !isLivePlayback || this.container.isDvrEnabled();
|
|
35602
|
-
trace(`${T$8} settingsUpdate`, {
|
|
35603
|
-
isLivePlayback,
|
|
35604
|
-
pointerEnabled,
|
|
35605
|
-
});
|
|
35606
35554
|
if (pointerEnabled === this.pointerEnabled) {
|
|
35607
35555
|
return;
|
|
35608
35556
|
}
|
|
@@ -35674,7 +35622,6 @@ const FullscreenIOS = {
|
|
|
35674
35622
|
}
|
|
35675
35623
|
}
|
|
35676
35624
|
catch (e) {
|
|
35677
|
-
reportError(e);
|
|
35678
35625
|
}
|
|
35679
35626
|
return false;
|
|
35680
35627
|
}
|
|
@@ -36079,7 +36026,6 @@ const templateHtml = "<div class=\"player-error-screen__content\" data-error-scr
|
|
|
36079
36026
|
|
|
36080
36027
|
const TIME_FOR_UPDATE = 10000;
|
|
36081
36028
|
const MAX_RETRY = 10;
|
|
36082
|
-
const T$7 = 'plugins.error_screen';
|
|
36083
36029
|
class ErrorScreen extends UICorePlugin {
|
|
36084
36030
|
_retry = 0;
|
|
36085
36031
|
err = null;
|
|
@@ -36112,17 +36058,14 @@ class ErrorScreen extends UICorePlugin {
|
|
|
36112
36058
|
this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);
|
|
36113
36059
|
}
|
|
36114
36060
|
onCoreReady() {
|
|
36115
|
-
trace(`${T$7} onCoreReady`);
|
|
36116
36061
|
if (this.core.activePlayback) {
|
|
36117
36062
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
|
|
36118
36063
|
}
|
|
36119
36064
|
}
|
|
36120
36065
|
onPlay() {
|
|
36121
|
-
trace(`${T$7} onPlay`);
|
|
36122
36066
|
this.destroyError();
|
|
36123
36067
|
}
|
|
36124
36068
|
destroyError() {
|
|
36125
|
-
trace(`${T$7} destroyError`);
|
|
36126
36069
|
this._retry = 0;
|
|
36127
36070
|
this.err = null;
|
|
36128
36071
|
if (this.timeout !== null) {
|
|
@@ -36178,7 +36121,6 @@ class ErrorScreen extends UICorePlugin {
|
|
|
36178
36121
|
}
|
|
36179
36122
|
}
|
|
36180
36123
|
onError(err) {
|
|
36181
|
-
trace(`${T$7} onError`, { err });
|
|
36182
36124
|
if (err.level === PlayerError.Levels.FATAL ||
|
|
36183
36125
|
err.details === 'bufferStalledError' ||
|
|
36184
36126
|
err.details === 'manifestParsingError') {
|
|
@@ -36765,7 +36707,6 @@ class LevelSelector extends UICorePlugin {
|
|
|
36765
36707
|
}
|
|
36766
36708
|
}
|
|
36767
36709
|
onStop() {
|
|
36768
|
-
trace(`${T$6} onStop`);
|
|
36769
36710
|
const currentPlayback = this.core.activePlayback;
|
|
36770
36711
|
this.listenToOnce(currentPlayback, Events$1.PLAYBACK_PLAY, () => {
|
|
36771
36712
|
trace(`${T$6} on PLAYBACK_PLAY after stop`, { selectedLevelId: this.selectedLevelId });
|
|
@@ -36875,13 +36816,11 @@ class LevelSelector extends UICorePlugin {
|
|
|
36875
36816
|
return false;
|
|
36876
36817
|
}
|
|
36877
36818
|
goBack() {
|
|
36878
|
-
trace(`${T$6} goBack`);
|
|
36879
36819
|
this.isOpen = false;
|
|
36880
36820
|
this.core.trigger('gear:refresh');
|
|
36881
36821
|
this.deferRender();
|
|
36882
36822
|
}
|
|
36883
36823
|
setLevel(index) {
|
|
36884
|
-
trace(`${T$6} setIndexLevel`, { index });
|
|
36885
36824
|
this.selectedLevelId = index;
|
|
36886
36825
|
if (!this.core.activePlayback) {
|
|
36887
36826
|
return;
|
|
@@ -36894,12 +36833,10 @@ class LevelSelector extends UICorePlugin {
|
|
|
36894
36833
|
this.highlightCurrentLevel();
|
|
36895
36834
|
}
|
|
36896
36835
|
catch (error) {
|
|
36897
|
-
reportError(error);
|
|
36898
36836
|
}
|
|
36899
36837
|
this.deferRender();
|
|
36900
36838
|
}
|
|
36901
36839
|
onShowLevelSelectMenu() {
|
|
36902
|
-
trace(`${T$6} onShowLevelSelectMenu`);
|
|
36903
36840
|
this.isOpen = true;
|
|
36904
36841
|
this.renderDropdown();
|
|
36905
36842
|
this.highlightCurrentLevel();
|
|
@@ -36938,7 +36875,6 @@ class LevelSelector extends UICorePlugin {
|
|
|
36938
36875
|
return this.levelLabels[index] ?? formatLevelLabel(this.levels[index]);
|
|
36939
36876
|
}
|
|
36940
36877
|
updateCurrentLevel(info) {
|
|
36941
|
-
trace(`${T$6} updateCurrentLevel`, { info });
|
|
36942
36878
|
this.highlightCurrentLevel();
|
|
36943
36879
|
}
|
|
36944
36880
|
highlightCurrentLevel() {
|
|
@@ -37545,7 +37481,6 @@ class MediaControl extends UICorePlugin {
|
|
|
37545
37481
|
}
|
|
37546
37482
|
}
|
|
37547
37483
|
catch (e) {
|
|
37548
|
-
reportError(e);
|
|
37549
37484
|
}
|
|
37550
37485
|
}
|
|
37551
37486
|
togglePlayPause() {
|
|
@@ -38352,7 +38287,6 @@ class MultiCamera extends UICorePlugin {
|
|
|
38352
38287
|
}
|
|
38353
38288
|
onCameraSelect(event) {
|
|
38354
38289
|
const value = event.currentTarget.dataset.multicameraSelectorSelect;
|
|
38355
|
-
trace(`${T$5} onCameraSelect`, { value });
|
|
38356
38290
|
if (value !== undefined) {
|
|
38357
38291
|
this.changeById(parseInt(value, 10));
|
|
38358
38292
|
}
|
|
@@ -38398,7 +38332,6 @@ class MultiCamera extends UICorePlugin {
|
|
|
38398
38332
|
}
|
|
38399
38333
|
}
|
|
38400
38334
|
catch (error) {
|
|
38401
|
-
reportError(error);
|
|
38402
38335
|
}
|
|
38403
38336
|
}
|
|
38404
38337
|
behaviorLive(id, active) {
|
|
@@ -38411,7 +38344,6 @@ class MultiCamera extends UICorePlugin {
|
|
|
38411
38344
|
}
|
|
38412
38345
|
}
|
|
38413
38346
|
catch (error) {
|
|
38414
|
-
reportError(error);
|
|
38415
38347
|
return;
|
|
38416
38348
|
}
|
|
38417
38349
|
this.findAndInitNextStream(id, active);
|
|
@@ -38459,7 +38391,6 @@ class MultiCamera extends UICorePlugin {
|
|
|
38459
38391
|
this.core.mediaControl.disabledControlButton();
|
|
38460
38392
|
}
|
|
38461
38393
|
catch (error) {
|
|
38462
|
-
reportError(error);
|
|
38463
38394
|
}
|
|
38464
38395
|
// TODO figure out
|
|
38465
38396
|
this.core.getPlugin('error_gplayer')?.show({
|
|
@@ -38475,17 +38406,15 @@ class MultiCamera extends UICorePlugin {
|
|
|
38475
38406
|
this.core.mediaControl.enableControlButton();
|
|
38476
38407
|
}
|
|
38477
38408
|
catch (error) {
|
|
38478
|
-
reportError(error);
|
|
38479
38409
|
}
|
|
38480
38410
|
}
|
|
38481
38411
|
changeById(id) {
|
|
38482
|
-
trace(`${T$5} changeById`, { id });
|
|
38483
38412
|
queueMicrotask(() => {
|
|
38484
38413
|
const playbackOptions = this.core.options.playback || {};
|
|
38485
38414
|
// TODO figure out what this does
|
|
38486
38415
|
playbackOptions.recycleVideo = Browser.isMobile;
|
|
38487
38416
|
this.currentCamera = this.findElementById(id) ?? null;
|
|
38488
|
-
trace(`${T$5} changeById`, {
|
|
38417
|
+
trace(`${T$5} changeById`, { currentCamera: this.currentCamera, multicamera: this.multicamera });
|
|
38489
38418
|
if (!this.currentCamera) {
|
|
38490
38419
|
return;
|
|
38491
38420
|
}
|
|
@@ -38496,7 +38425,6 @@ class MultiCamera extends UICorePlugin {
|
|
|
38496
38425
|
this.core.activePlayback.destroy();
|
|
38497
38426
|
}
|
|
38498
38427
|
catch (error) {
|
|
38499
|
-
reportError(error);
|
|
38500
38428
|
}
|
|
38501
38429
|
const fullscreenDisable = !!(Browser.isiOS && this.currentCamera.projection);
|
|
38502
38430
|
// TODO remove?
|
|
@@ -38583,10 +38511,6 @@ class PictureInPicture extends UICorePlugin {
|
|
|
38583
38511
|
this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_RENDERED, this.render);
|
|
38584
38512
|
}
|
|
38585
38513
|
isPiPSupported() {
|
|
38586
|
-
trace(`${T$4} isPiPSupported`, {
|
|
38587
|
-
pictureInPictureEnabled: document.pictureInPictureEnabled,
|
|
38588
|
-
requestPictureInPicture: HTMLVideoElement.prototype.requestPictureInPicture,
|
|
38589
|
-
});
|
|
38590
38514
|
return document.pictureInPictureEnabled && !!HTMLVideoElement.prototype.requestPictureInPicture;
|
|
38591
38515
|
}
|
|
38592
38516
|
render() {
|
|
@@ -38602,7 +38526,6 @@ class PictureInPicture extends UICorePlugin {
|
|
|
38602
38526
|
return this;
|
|
38603
38527
|
}
|
|
38604
38528
|
togglePictureInPicture() {
|
|
38605
|
-
trace(`${T$4} togglePictureInPicture`);
|
|
38606
38529
|
if (this.videoElement !== document.pictureInPictureElement) {
|
|
38607
38530
|
this.requestPictureInPicture();
|
|
38608
38531
|
}
|
|
@@ -38617,7 +38540,6 @@ class PictureInPicture extends UICorePlugin {
|
|
|
38617
38540
|
this.videoElement.requestPictureInPicture();
|
|
38618
38541
|
}
|
|
38619
38542
|
exitPictureInPicture() {
|
|
38620
|
-
trace(`${T$4} exitPictureInPicture`);
|
|
38621
38543
|
document.exitPictureInPicture();
|
|
38622
38544
|
}
|
|
38623
38545
|
}
|
|
@@ -38893,14 +38815,12 @@ class Poster extends UIContainerPlugin {
|
|
|
38893
38815
|
this.update();
|
|
38894
38816
|
}
|
|
38895
38817
|
disable() {
|
|
38896
|
-
trace(`${T$3} disable`);
|
|
38897
38818
|
this.hasStartedPlaying = false;
|
|
38898
38819
|
this.playRequested = false;
|
|
38899
38820
|
super.disable();
|
|
38900
38821
|
}
|
|
38901
38822
|
onError(error) {
|
|
38902
38823
|
trace(`${T$3} onError`, {
|
|
38903
|
-
error,
|
|
38904
38824
|
enabled: this.enabled,
|
|
38905
38825
|
});
|
|
38906
38826
|
this.hasFatalError = error.level === PlayerError.Levels.FATAL;
|
|
@@ -38912,13 +38832,11 @@ class Poster extends UIContainerPlugin {
|
|
|
38912
38832
|
}
|
|
38913
38833
|
}
|
|
38914
38834
|
onPlay() {
|
|
38915
|
-
trace(`${T$3} onPlay`);
|
|
38916
38835
|
this.hasStartedPlaying = true;
|
|
38917
38836
|
this.playRequested = false;
|
|
38918
38837
|
this.update();
|
|
38919
38838
|
}
|
|
38920
38839
|
onPlayIntent() {
|
|
38921
|
-
trace(`${T$3} onPlayIntent`);
|
|
38922
38840
|
this.playRequested = true;
|
|
38923
38841
|
this.update();
|
|
38924
38842
|
}
|
|
@@ -38932,7 +38850,6 @@ class Poster extends UIContainerPlugin {
|
|
|
38932
38850
|
}
|
|
38933
38851
|
updatePlayButton(show) {
|
|
38934
38852
|
trace(`${T$3} updatePlayButton`, {
|
|
38935
|
-
show,
|
|
38936
38853
|
chromeless: this.options.chromeless,
|
|
38937
38854
|
allowUserInteraction: this.options.allowUserInteraction,
|
|
38938
38855
|
});
|
|
@@ -39482,7 +39399,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
39482
39399
|
this.hasBuffering = false;
|
|
39483
39400
|
}
|
|
39484
39401
|
onPlay() {
|
|
39485
|
-
trace(`${T$2} onPlay`);
|
|
39486
39402
|
this.hide();
|
|
39487
39403
|
}
|
|
39488
39404
|
onStop() {
|
|
@@ -39497,7 +39413,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
39497
39413
|
onError(e) {
|
|
39498
39414
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
39499
39415
|
trace(`${T$2} onError`, {
|
|
39500
|
-
e,
|
|
39501
39416
|
showOnError: this.options.spinner?.showOnError,
|
|
39502
39417
|
hasFatalError: this.hasFatalError,
|
|
39503
39418
|
error: e.code,
|
|
@@ -39510,9 +39425,6 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
39510
39425
|
}
|
|
39511
39426
|
}
|
|
39512
39427
|
show(immediate = false) {
|
|
39513
|
-
trace(`${T$2} show`, {
|
|
39514
|
-
immediate,
|
|
39515
|
-
});
|
|
39516
39428
|
if (immediate) {
|
|
39517
39429
|
if (this.showTimeout !== null) {
|
|
39518
39430
|
clearTimeout(this.showTimeout);
|
|
@@ -39534,9 +39446,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
39534
39446
|
render() {
|
|
39535
39447
|
const showOnStart = this.options.spinner?.showOnStart;
|
|
39536
39448
|
trace(`${T$2} render`, {
|
|
39537
|
-
buffering: this.container.buffering
|
|
39538
|
-
showOnStart,
|
|
39539
|
-
});
|
|
39449
|
+
buffering: this.container.buffering});
|
|
39540
39450
|
this.$el.html(this.template());
|
|
39541
39451
|
this.el.firstElementChild?.addEventListener('animationiteration', () => {
|
|
39542
39452
|
this.trigger('spinner:sync');
|
|
@@ -39666,7 +39576,6 @@ class Statistics extends ContainerPlugin {
|
|
|
39666
39576
|
}
|
|
39667
39577
|
}
|
|
39668
39578
|
catch (error) {
|
|
39669
|
-
reportError(error);
|
|
39670
39579
|
}
|
|
39671
39580
|
}
|
|
39672
39581
|
onStart() {
|
|
@@ -39786,7 +39695,6 @@ class Subtitles extends UICorePlugin {
|
|
|
39786
39695
|
tracks.length > 0 && this.fillLevels(tracks);
|
|
39787
39696
|
}
|
|
39788
39697
|
catch (error) {
|
|
39789
|
-
reportError(error);
|
|
39790
39698
|
}
|
|
39791
39699
|
}
|
|
39792
39700
|
}
|
|
@@ -39819,7 +39727,6 @@ class Subtitles extends UICorePlugin {
|
|
|
39819
39727
|
this.resizeFont();
|
|
39820
39728
|
}
|
|
39821
39729
|
catch (error) {
|
|
39822
|
-
reportError(error);
|
|
39823
39730
|
}
|
|
39824
39731
|
}
|
|
39825
39732
|
hide() {
|
|
@@ -39983,8 +39890,6 @@ class Subtitles extends UICorePlugin {
|
|
|
39983
39890
|
}
|
|
39984
39891
|
}
|
|
39985
39892
|
catch (error) {
|
|
39986
|
-
// console.error(error);
|
|
39987
|
-
reportError(error);
|
|
39988
39893
|
}
|
|
39989
39894
|
};
|
|
39990
39895
|
continue;
|
|
@@ -40238,7 +40143,6 @@ class Thumbnails extends UICorePlugin {
|
|
|
40238
40143
|
}
|
|
40239
40144
|
}
|
|
40240
40145
|
catch (error) {
|
|
40241
|
-
reportError(error);
|
|
40242
40146
|
return;
|
|
40243
40147
|
}
|
|
40244
40148
|
// TODO options
|
|
@@ -40537,7 +40441,6 @@ class Thumbnails extends UICorePlugin {
|
|
|
40537
40441
|
}
|
|
40538
40442
|
}
|
|
40539
40443
|
_createElements() {
|
|
40540
|
-
trace(`${T$1} _createElements`);
|
|
40541
40444
|
this.$el.html(this.template({
|
|
40542
40445
|
'backdropHeight': this._getOptions().backdropHeight,
|
|
40543
40446
|
'spotlightHeight': this._getOptions().spotlightHeight
|
|
@@ -40572,7 +40475,7 @@ function noSync(cb) {
|
|
|
40572
40475
|
*
|
|
40573
40476
|
* @example
|
|
40574
40477
|
* ```ts
|
|
40575
|
-
* import { SourceController } from '@gcorevideo/player
|
|
40478
|
+
* import { SourceController } from '@gcorevideo/player'
|
|
40576
40479
|
*
|
|
40577
40480
|
* Player.registerPlugin(SourceController)
|
|
40578
40481
|
* ```
|
|
@@ -40710,22 +40613,12 @@ class SourceController extends CorePlugin {
|
|
|
40710
40613
|
});
|
|
40711
40614
|
this.active = true;
|
|
40712
40615
|
this.getNextMediaSource().then((nextSource) => {
|
|
40713
|
-
trace(`${T} retryPlayback syncing...`, {
|
|
40714
|
-
nextSource,
|
|
40715
|
-
});
|
|
40716
40616
|
const rnd = RETRY_DELAY_BLUR * Math.random();
|
|
40717
40617
|
this.sync(() => {
|
|
40718
|
-
trace(`${T} retryPlayback loading...`, {
|
|
40719
|
-
nextSource,
|
|
40720
|
-
});
|
|
40721
40618
|
this.core.load(nextSource.source, nextSource.mimeType);
|
|
40722
|
-
trace(`${T} retryPlayback loaded`, {
|
|
40723
|
-
nextSource,
|
|
40724
|
-
});
|
|
40725
40619
|
setTimeout(() => {
|
|
40726
40620
|
// this.core.activePlayback.consent()
|
|
40727
40621
|
this.core.activePlayback.play();
|
|
40728
|
-
trace(`${T} retryPlayback playing`);
|
|
40729
40622
|
}, rnd);
|
|
40730
40623
|
});
|
|
40731
40624
|
});
|
|
@@ -40814,8 +40707,6 @@ class VolumeFade extends UICorePlugin {
|
|
|
40814
40707
|
this.core.trigger(VolumeFadeEvents.FADE, progress * this._aboveBorderVolume);
|
|
40815
40708
|
}
|
|
40816
40709
|
catch (error) {
|
|
40817
|
-
// LogManager.exception(error);
|
|
40818
|
-
reportError(error);
|
|
40819
40710
|
this.clearCurrentInterval();
|
|
40820
40711
|
}
|
|
40821
40712
|
if (progress >= 1 || progress <= 0) {
|
|
@@ -40834,4 +40725,4 @@ class VolumeFade extends UICorePlugin {
|
|
|
40834
40725
|
}
|
|
40835
40726
|
}
|
|
40836
40727
|
|
|
40837
|
-
export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DisableControls, DvrControls, ErrorScreen, Favicon, GoogleAnalytics, Kibo, LevelSelector, Logo, MediaControl, MultiCamera, PictureInPicture, PlaybackRate, Poster, SeekTime, Share, SkipTime, SourceController, SpinnerThreeBounce, Statistics, Subtitles, Thumbnails, VolumeFade, VolumeFadeEvents
|
|
40728
|
+
export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DisableControls, DvrControls, ErrorScreen, Favicon, GoogleAnalytics, Kibo, LevelSelector, Logo, MediaControl, MultiCamera, PictureInPicture, PlaybackRate, Poster, SeekTime, Share, SkipTime, SourceController, SpinnerThreeBounce, Statistics, Subtitles, Thumbnails, VolumeFade, VolumeFadeEvents };
|
package/lib/index.plugins.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ export * from "./plugins/spinner-three-bounce/SpinnerThreeBounce.js";
|
|
|
32
32
|
export * from "./plugins/statistics/Statistics.js";
|
|
33
33
|
export * from "./plugins/subtitles/Subtitles.js";
|
|
34
34
|
export * from "./plugins/thumbnails/Thumbnails.js";
|
|
35
|
-
export { setTracer } from "@gcorevideo/utils";
|
|
36
35
|
export * from "./plugins/source-controller/SourceController.js";
|
|
37
36
|
export * from "./plugins/volume-fade/VolumeFade.js";
|
|
38
37
|
//# sourceMappingURL=index.plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.plugins.d.ts","sourceRoot":"","sources":["../src/index.plugins.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,2BAA2B,CAAC;AAEnC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yBAAyB,CAAC;AACxC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,
|
|
1
|
+
{"version":3,"file":"index.plugins.d.ts","sourceRoot":"","sources":["../src/index.plugins.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,2BAA2B,CAAC;AAEnC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yBAAyB,CAAC;AACxC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iDAAiD,CAAC;AAGhE,cAAc,qCAAqC,CAAC"}
|
package/lib/index.plugins.js
CHANGED
|
@@ -33,7 +33,6 @@ export * from "./plugins/spinner-three-bounce/SpinnerThreeBounce.js";
|
|
|
33
33
|
export * from "./plugins/statistics/Statistics.js";
|
|
34
34
|
export * from "./plugins/subtitles/Subtitles.js";
|
|
35
35
|
export * from "./plugins/thumbnails/Thumbnails.js";
|
|
36
|
-
export { setTracer } from "@gcorevideo/utils";
|
|
37
36
|
export * from "./plugins/source-controller/SourceController.js";
|
|
38
37
|
// _ vast-ads
|
|
39
38
|
// _ video360
|
|
@@ -11,7 +11,7 @@ import { CorePlugin, type Core as ClapprCore } from '@clappr/core';
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
* import { SourceController } from '@gcorevideo/player
|
|
14
|
+
* import { SourceController } from '@gcorevideo/player'
|
|
15
15
|
*
|
|
16
16
|
* Player.registerPlugin(SourceController)
|
|
17
17
|
* ```
|
package/package.json
CHANGED
package/src/index.plugins.ts
CHANGED
|
@@ -35,7 +35,6 @@ export * from "./plugins/spinner-three-bounce/SpinnerThreeBounce.js";
|
|
|
35
35
|
export * from "./plugins/statistics/Statistics.js";
|
|
36
36
|
export * from "./plugins/subtitles/Subtitles.js";
|
|
37
37
|
export * from "./plugins/thumbnails/Thumbnails.js";
|
|
38
|
-
export { setTracer} from "@gcorevideo/utils";
|
|
39
38
|
export * from "./plugins/source-controller/SourceController.js";
|
|
40
39
|
// _ vast-ads
|
|
41
40
|
// _ video360
|