@gcorevideo/player 2.19.11 → 2.19.13
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 +16 -11
- package/dist/index.css +684 -684
- package/dist/index.js +301 -151
- package/dist/player.d.ts +208 -45
- package/dist/plugins/index.css +941 -941
- package/dist/plugins/index.js +3227 -3080
- package/docs/api/player.bottomgear.md +3 -289
- package/docs/api/player.dvrcontrols._constructor_.md +3 -0
- package/docs/api/player.dvrcontrols.md +10 -201
- package/docs/api/player.levelselector.md +8 -140
- package/docs/api/player.md +8 -4
- package/docs/api/player.mediacontrol.disable.md +2 -0
- package/docs/api/player.mediacontrol.disabledcontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.enable.md +2 -0
- package/docs/api/player.mediacontrol.enablecontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.getelement.md +19 -1
- package/docs/api/player.mediacontrol.md +17 -281
- package/docs/api/player.mediacontrol.volume.md +2 -2
- package/docs/api/player.mediacontrolelement.md +2 -1
- package/docs/api/player.poster.disable.md +5 -0
- package/docs/api/player.poster.enable.md +5 -0
- package/docs/api/player.poster.md +25 -183
- package/lib/Player.d.ts +1 -0
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +15 -10
- package/lib/plugins/audio-selector/AudioSelector.js +2 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +2 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts +28 -7
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +44 -31
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +3 -2
- package/lib/plugins/clappr-stats/ClapprStats.js +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.js +2 -2
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/disable-controls/DisableControls.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +30 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +39 -11
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +2 -1
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +1 -1
- package/lib/plugins/level-selector/LevelSelector.d.ts +25 -6
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +33 -12
- package/lib/plugins/logo/Logo.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +66 -22
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +71 -34
- package/lib/plugins/multi-camera/MultiCamera.js +3 -3
- package/lib/plugins/picture-in-picture/PictureInPicture.js +3 -3
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +3 -3
- package/lib/plugins/poster/Poster.d.ts +57 -3
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +57 -9
- package/lib/plugins/seek-time/SeekTime.js +2 -2
- package/lib/plugins/share/Share.js +2 -2
- package/lib/plugins/skip-time/SkipTime.js +1 -1
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -2
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
- package/lib/plugins/statistics/Statistics.js +1 -1
- package/lib/plugins/subtitles/Subtitles.js +3 -3
- package/lib/plugins/thumbnails/Thumbnails.js +3 -3
- package/lib/plugins/types.d.ts +1 -7
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.d.ts +1 -0
- package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.js +6 -3
- package/package.json +2 -1
- package/src/Player.ts +15 -9
- package/src/__tests__/Player.test.ts +15 -76
- package/src/plugins/audio-selector/AudioSelector.ts +2 -2
- package/src/plugins/big-mute-button/BigMuteButton.ts +2 -1
- package/src/plugins/bottom-gear/BottomGear.ts +50 -39
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +3 -2
- package/src/plugins/clappr-stats/ClapprStats.ts +1 -1
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/clips/Clips.ts +2 -2
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/disable-controls/DisableControls.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +42 -14
- package/src/plugins/error-screen/ErrorScreen.ts +2 -1
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/level-selector/LevelSelector.ts +34 -14
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +22 -2
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +82 -44
- package/src/plugins/multi-camera/MultiCamera.ts +3 -3
- package/src/plugins/picture-in-picture/PictureInPicture.ts +3 -3
- package/src/plugins/playback-rate/PlaybackRate.ts +3 -4
- package/src/plugins/poster/Poster.ts +59 -12
- package/src/plugins/seek-time/SeekTime.ts +2 -2
- package/src/plugins/share/Share.ts +2 -2
- package/src/plugins/skip-time/SkipTime.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +1 -2
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +5 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/statistics/Statistics.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +3 -3
- package/src/plugins/thumbnails/Thumbnails.ts +3 -3
- package/src/plugins/types.ts +1 -0
- package/src/plugins/vast-ads/VastAds.ts +6 -6
- package/temp/player.api.json +3300 -5029
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.bottomgear.attributes.md +0 -17
- package/docs/api/player.bottomgear.bindevents.md +0 -18
- package/docs/api/player.bottomgear.container.md +0 -14
- package/docs/api/player.bottomgear.events.md +0 -16
- package/docs/api/player.bottomgear.hide.md +0 -18
- package/docs/api/player.bottomgear.name.md +0 -14
- package/docs/api/player.bottomgear.refresh.md +0 -18
- package/docs/api/player.bottomgear.reload.md +0 -18
- package/docs/api/player.bottomgear.render.md +0 -18
- package/docs/api/player.bottomgear.supportedversion.md +0 -16
- package/docs/api/player.bottomgear.template.md +0 -14
- package/docs/api/player.bottomgear.togglegearmenu.md +0 -18
- package/docs/api/player.bottomgear.unbindevents.md +0 -18
- package/docs/api/player.bottomgear.version.md +0 -14
- package/docs/api/player.dvrcontrols.attributes.md +0 -14
- package/docs/api/player.dvrcontrols.bindevents.md +0 -15
- package/docs/api/player.dvrcontrols.click.md +0 -15
- package/docs/api/player.dvrcontrols.events.md +0 -13
- package/docs/api/player.dvrcontrols.name.md +0 -11
- package/docs/api/player.dvrcontrols.render.md +0 -15
- package/docs/api/player.dvrcontrols.settingsupdate.md +0 -15
- package/docs/api/player.dvrcontrols.shouldrender.md +0 -15
- package/docs/api/player.dvrcontrols.supportedversion.md +0 -13
- package/docs/api/player.dvrcontrols.template.md +0 -11
- package/docs/api/player.levelselector.attributes.md +0 -17
- package/docs/api/player.levelselector.bindevents.md +0 -18
- package/docs/api/player.levelselector.name.md +0 -14
- package/docs/api/player.levelselector.render.md +0 -18
- package/docs/api/player.levelselector.supportedversion.md +0 -16
- package/docs/api/player.levelselector.version.md +0 -14
- package/docs/api/player.mediacontrol.attributes.md +0 -17
- package/docs/api/player.mediacontrol.bindcontainerevents.md +0 -18
- package/docs/api/player.mediacontrol.bindevents.md +0 -18
- package/docs/api/player.mediacontrol.container.md +0 -14
- package/docs/api/player.mediacontrol.destroy.md +0 -18
- package/docs/api/player.mediacontrol.disabled.md +0 -14
- package/docs/api/player.mediacontrol.events.md +0 -40
- package/docs/api/player.mediacontrol.getexternalinterface.md +0 -21
- package/docs/api/player.mediacontrol.name.md +0 -14
- package/docs/api/player.mediacontrol.pause.md +0 -20
- package/docs/api/player.mediacontrol.play.md +0 -20
- package/docs/api/player.mediacontrol.playback.md +0 -14
- package/docs/api/player.mediacontrol.render.md +0 -18
- package/docs/api/player.mediacontrol.setmuted.md +0 -52
- package/docs/api/player.mediacontrol.stop.md +0 -20
- package/docs/api/player.mediacontrol.supportedversion.md +0 -16
- package/docs/api/player.poster.attributes.md +0 -14
- package/docs/api/player.poster.bindevents.md +0 -15
- package/docs/api/player.poster.destroy.md +0 -15
- package/docs/api/player.poster.events.md +0 -13
- package/docs/api/player.poster.name.md +0 -11
- package/docs/api/player.poster.render.md +0 -15
- package/docs/api/player.poster.shouldrender.md +0 -11
- package/docs/api/player.poster.showonvideoend.md +0 -11
- package/docs/api/player.poster.supportedversion.md +0 -13
- package/docs/api/player.poster.template.md +0 -11
- package/src/plugins/build.ts +0 -1
|
@@ -5,7 +5,7 @@ import assert from 'assert';
|
|
|
5
5
|
import { Events, UICorePlugin, Browser, Playback, Utils, template, $, } from '@clappr/core';
|
|
6
6
|
import { reportError } from '@gcorevideo/utils';
|
|
7
7
|
import { Kibo } from '../kibo/index.js';
|
|
8
|
-
import { CLAPPR_VERSION } from '
|
|
8
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
9
9
|
import { getPageX, isFullscreen } from '../utils.js';
|
|
10
10
|
import '../../../assets/media-control/media-control.scss';
|
|
11
11
|
import '../../../assets/media-control/plugins.scss';
|
|
@@ -34,11 +34,17 @@ function orderByOrderPattern(arr, order) {
|
|
|
34
34
|
return [...ordered, ...rest];
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* The MediaControl
|
|
37
|
+
* The MediaControl provides a foundation for developing custom media controls UI.
|
|
38
38
|
* @beta
|
|
39
39
|
* @remarks
|
|
40
|
-
* This plugin provides a foundation for developing a media controls UI via additional plugins.
|
|
41
40
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
41
|
+
* The plugin registration should be arranged so that MediaControl is initialized before every other plugin that depends on it.
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
45
|
+
* Player.registerPlugin(LevelSelector) // a media control plugin
|
|
46
|
+
* Player.registerPlugin(NerdStats) // another media control plugin
|
|
47
|
+
* ```
|
|
42
48
|
*/
|
|
43
49
|
export class MediaControl extends UICorePlugin {
|
|
44
50
|
advertisementPlaying = false;
|
|
@@ -64,7 +70,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
64
70
|
persistConfig;
|
|
65
71
|
rendered = false;
|
|
66
72
|
settings = {};
|
|
67
|
-
svgMask = null;
|
|
68
73
|
userDisabled = false;
|
|
69
74
|
userKeepVisible = false;
|
|
70
75
|
verticalVolume = false;
|
|
@@ -93,9 +98,15 @@ export class MediaControl extends UICorePlugin {
|
|
|
93
98
|
$volumeContainer = null;
|
|
94
99
|
$volumeIcon = null;
|
|
95
100
|
static template = template(mediaControlHTML);
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
96
104
|
get name() {
|
|
97
105
|
return 'media_control';
|
|
98
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
99
110
|
get supportedVersion() {
|
|
100
111
|
return { min: CLAPPR_VERSION };
|
|
101
112
|
}
|
|
@@ -103,18 +114,32 @@ export class MediaControl extends UICorePlugin {
|
|
|
103
114
|
const playbackIsNOOP = this.container && this.container.getPlaybackType() === Playback.NO_OP;
|
|
104
115
|
return this.userDisabled || playbackIsNOOP;
|
|
105
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
* @deprecated
|
|
120
|
+
*/
|
|
106
121
|
get container() {
|
|
107
122
|
return this.core && this.core.activeContainer;
|
|
108
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
* @deprecated
|
|
127
|
+
*/
|
|
109
128
|
get playback() {
|
|
110
129
|
return this.core && this.core.activePlayback;
|
|
111
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
112
134
|
get attributes() {
|
|
113
135
|
return {
|
|
114
136
|
class: 'media-control-skin-1',
|
|
115
137
|
'data-media-control-skin-1': '',
|
|
116
138
|
};
|
|
117
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
118
143
|
get events() {
|
|
119
144
|
return {
|
|
120
145
|
'click [data-play]': 'play',
|
|
@@ -145,11 +170,11 @@ export class MediaControl extends UICorePlugin {
|
|
|
145
170
|
};
|
|
146
171
|
}
|
|
147
172
|
/**
|
|
148
|
-
* Current volume
|
|
173
|
+
* Current volume [0..100]
|
|
149
174
|
*/
|
|
150
175
|
get volume() {
|
|
151
|
-
return this.
|
|
152
|
-
? this.
|
|
176
|
+
return this.core.activeContainer.isReady
|
|
177
|
+
? this.core.activeContainer.volume
|
|
153
178
|
: this.intendedVolume;
|
|
154
179
|
}
|
|
155
180
|
/**
|
|
@@ -165,7 +190,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
165
190
|
this.kibo = new Kibo(this.options.focusElement);
|
|
166
191
|
this.bindKeyEvents();
|
|
167
192
|
this.userDisabled = false;
|
|
168
|
-
if (
|
|
193
|
+
if (this.core.activeContainer.mediaControlDisabled ||
|
|
169
194
|
this.options.chromeless) {
|
|
170
195
|
this.disable();
|
|
171
196
|
}
|
|
@@ -174,12 +199,18 @@ export class MediaControl extends UICorePlugin {
|
|
|
174
199
|
$(document).bind('touchend', this.stopDrag);
|
|
175
200
|
$(document).bind('touchmove', this.updateDrag);
|
|
176
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
177
205
|
getExternalInterface() {
|
|
178
206
|
return {
|
|
179
207
|
setVolume: this.setVolume,
|
|
180
208
|
getVolume: () => this.volume,
|
|
181
209
|
};
|
|
182
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
183
214
|
bindEvents() {
|
|
184
215
|
// @ts-ignore
|
|
185
216
|
this.stopListening();
|
|
@@ -235,12 +266,18 @@ export class MediaControl extends UICorePlugin {
|
|
|
235
266
|
this.listenToOnce(this.container, Events.CONTAINER_LOADEDMETADATA, this.onLoadedMetadataOnVideoTag);
|
|
236
267
|
}
|
|
237
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Disables the plugin and unmounts its UI
|
|
271
|
+
*/
|
|
238
272
|
disable() {
|
|
239
273
|
this.userDisabled = true;
|
|
240
274
|
this.hide();
|
|
241
275
|
this.unbindKeyEvents();
|
|
242
276
|
this.$el.hide();
|
|
243
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
|
|
280
|
+
*/
|
|
244
281
|
enable() {
|
|
245
282
|
if (this.options.chromeless) {
|
|
246
283
|
return;
|
|
@@ -249,24 +286,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
249
286
|
this.bindKeyEvents();
|
|
250
287
|
this.show();
|
|
251
288
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Start the playback
|
|
254
|
-
*/
|
|
255
|
-
play() {
|
|
256
|
-
this.container && this.container.play();
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Pause the playback
|
|
260
|
-
*/
|
|
261
|
-
pause() {
|
|
262
|
-
this.container && this.container.pause();
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Stop the playback
|
|
266
|
-
*/
|
|
267
|
-
stop() {
|
|
268
|
-
this.container && this.container.stop();
|
|
269
|
-
}
|
|
270
289
|
/**
|
|
271
290
|
* Set the initial volume, which is preserved when playback is interrupted by an advertisement
|
|
272
291
|
*/
|
|
@@ -765,14 +784,31 @@ export class MediaControl extends UICorePlugin {
|
|
|
765
784
|
/**
|
|
766
785
|
* Get a media control element DOM node
|
|
767
786
|
* @param name - The name of the media control element
|
|
768
|
-
* @returns The DOM node to render
|
|
787
|
+
* @returns The DOM node to render to or extend
|
|
788
|
+
* @remarks
|
|
789
|
+
* Use this method to render custom media control UI in a plugin
|
|
790
|
+
* @example
|
|
791
|
+
* ```ts
|
|
792
|
+
* class MyPlugin extends UICorePlugin {
|
|
793
|
+
* override render() {
|
|
794
|
+
* const mediaControl = this.core.getPlugin('media_control')
|
|
795
|
+
* const clipText = mediaControl.getElement('clipText')
|
|
796
|
+
* clipText?.el.text('Here we go')
|
|
797
|
+
* return this
|
|
798
|
+
* }
|
|
799
|
+
* }
|
|
800
|
+
* ```
|
|
769
801
|
*/
|
|
770
802
|
getElement(name) {
|
|
771
803
|
switch (name) {
|
|
772
804
|
case 'clipText':
|
|
773
805
|
return this.$clipText;
|
|
806
|
+
case 'bottomGear':
|
|
807
|
+
return this.$bottomGear;
|
|
774
808
|
case 'pip':
|
|
775
809
|
return this.$pip;
|
|
810
|
+
case 'playbackRate':
|
|
811
|
+
return this.$playbackRate;
|
|
776
812
|
case 'seekBarContainer':
|
|
777
813
|
return this.$seekBarContainer;
|
|
778
814
|
}
|
|
@@ -906,6 +942,9 @@ export class MediaControl extends UICorePlugin {
|
|
|
906
942
|
element &&
|
|
907
943
|
$(element).find('svg path').css({ fill: this.buttonsColor });
|
|
908
944
|
}
|
|
945
|
+
/**
|
|
946
|
+
* @internal
|
|
947
|
+
*/
|
|
909
948
|
destroy() {
|
|
910
949
|
$(document).unbind('mouseup', this.stopDrag);
|
|
911
950
|
$(document).unbind('mousemove', this.updateDrag);
|
|
@@ -918,6 +957,9 @@ export class MediaControl extends UICorePlugin {
|
|
|
918
957
|
this.advertisementPlaying ? this.disable() : this.enable();
|
|
919
958
|
this.trigger(Events.MEDIACONTROL_OPTIONS_CHANGE);
|
|
920
959
|
}
|
|
960
|
+
/**
|
|
961
|
+
* @internal
|
|
962
|
+
*/
|
|
921
963
|
render() {
|
|
922
964
|
const timeout = this.options.hideMediaControlDelay || 2000;
|
|
923
965
|
const html = MediaControl.template({ settings: this.settings ?? {} });
|
|
@@ -1005,10 +1047,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
1005
1047
|
this.hide();
|
|
1006
1048
|
}
|
|
1007
1049
|
}
|
|
1008
|
-
// TODO
|
|
1009
|
-
setMuted(value) {
|
|
1010
|
-
this.container.options.mute = value;
|
|
1011
|
-
}
|
|
1012
1050
|
static getPageX(event) {
|
|
1013
1051
|
return getPageX(event);
|
|
1014
1052
|
}
|
|
@@ -1022,7 +1060,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
1022
1060
|
return 0;
|
|
1023
1061
|
}
|
|
1024
1062
|
/**
|
|
1025
|
-
* Enable the
|
|
1063
|
+
* Enable the user interaction disabled earlier
|
|
1026
1064
|
*/
|
|
1027
1065
|
enableControlButton() {
|
|
1028
1066
|
this.disabledClickableList.forEach((element) => {
|
|
@@ -1030,7 +1068,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
1030
1068
|
});
|
|
1031
1069
|
}
|
|
1032
1070
|
/**
|
|
1033
|
-
* Disable the control
|
|
1071
|
+
* Disable the user interaction for the control buttons
|
|
1034
1072
|
*/
|
|
1035
1073
|
disabledControlButton() {
|
|
1036
1074
|
this.disabledClickableList.forEach((element) => {
|
|
@@ -1044,7 +1082,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
1044
1082
|
return isFinite(this.core.activePlayback.getDuration());
|
|
1045
1083
|
}
|
|
1046
1084
|
}
|
|
1047
|
-
// TODO drop?
|
|
1048
1085
|
MediaControl.extend = function (properties) {
|
|
1049
1086
|
return extend(MediaControl, properties);
|
|
1050
1087
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Browser, Events, Playback, template, UICorePlugin } from '@clappr/core';
|
|
2
2
|
import { reportError, trace } from '@gcorevideo/utils';
|
|
3
|
-
import { CLAPPR_VERSION } from '
|
|
3
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
4
4
|
import pluginHtml from '../../../assets/multi-camera/multicamera.ejs';
|
|
5
5
|
import '../../../assets/multi-camera/style.scss';
|
|
6
6
|
import streamsIcon from '../../../assets/icons/old/streams.svg';
|
|
7
7
|
import streamsMomentoIcon from '../../../assets/icons/old/language.svg';
|
|
8
8
|
import streamsWhiteNightsIcon from '../../../assets/icons/old/wn.svg';
|
|
9
9
|
const VERSION = '0.0.1';
|
|
10
|
-
const T = 'plugins.
|
|
10
|
+
const T = 'plugins.media_control_multicamera';
|
|
11
11
|
export class MultiCamera extends UICorePlugin {
|
|
12
12
|
currentCamera = null;
|
|
13
13
|
currentTime = 0;
|
|
@@ -15,7 +15,7 @@ export class MultiCamera extends UICorePlugin {
|
|
|
15
15
|
multicamera = [];
|
|
16
16
|
noActiveStreams = false;
|
|
17
17
|
get name() {
|
|
18
|
-
return '
|
|
18
|
+
return 'media_control_multicamera';
|
|
19
19
|
}
|
|
20
20
|
get supportedVersion() {
|
|
21
21
|
return { min: CLAPPR_VERSION };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { UICorePlugin, template, Events } from '@clappr/core';
|
|
2
2
|
import { trace } from '@gcorevideo/utils';
|
|
3
|
-
import { CLAPPR_VERSION } from '
|
|
3
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
4
4
|
import pipIcon from '../../../assets/icons/new/pip.svg';
|
|
5
5
|
import buttonHtml from '../../../assets/picture-in-picture/button.ejs';
|
|
6
6
|
import '../../../assets/picture-in-picture/button.scss';
|
|
7
7
|
const VERSION = '0.0.1';
|
|
8
|
-
const T = `plugins.
|
|
8
|
+
const T = `plugins.media_control_pip`;
|
|
9
9
|
export class PictureInPicture extends UICorePlugin {
|
|
10
10
|
get name() {
|
|
11
|
-
return '
|
|
11
|
+
return 'media_control_pip';
|
|
12
12
|
}
|
|
13
13
|
get supportedVersion() {
|
|
14
14
|
return { min: CLAPPR_VERSION };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaybackRate.d.ts","sourceRoot":"","sources":["../../../src/plugins/playback-rate/PlaybackRate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAsB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PlaybackRate.d.ts","sourceRoot":"","sources":["../../../src/plugins/playback-rate/PlaybackRate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAsB,MAAM,cAAc,CAAC;AAiCxE,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,CAAC,eAAe,CAAyB;IAEhD,OAAO,CAAC,aAAa,CAAgD;IAErE,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,OAAO,CAAC,YAAY,CAAiC;IAErD,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;IAED,IAAI,QAAQ,QAEX;IAED,IAAa,UAAU;;;MAKtB;IAED,IAAa,MAAM;;;;MAMlB;IAEQ,UAAU;IAoBnB,YAAY;IAOZ,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,gBAAgB;IAcxB,MAAM;IAKN,OAAO,CAAC,YAAY;IAUX,MAAM;IAyCf,SAAS;IAMT,UAAU;IAMV,MAAM;IAWN,MAAM;IAIN,YAAY,CAAC,KAAK,EAAE,UAAU;IAW9B,UAAU;IAaV,MAAM;IAIN,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAI/B,eAAe,CAAC,IAAI,EAAE,MAAM;IAQ5B,QAAQ;IAYR,oBAAoB;CASrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Events, UICorePlugin, Playback, template } from '@clappr/core';
|
|
2
|
-
import { CLAPPR_VERSION } from '
|
|
2
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
3
3
|
import pluginHtml from '../../../assets/playback-rate/playback-rate-selector.ejs';
|
|
4
4
|
import buttonHtml from '../../../assets/playback-rate/button.ejs';
|
|
5
5
|
import listHtml from '../../../assets/playback-rate/list.ejs';
|
|
@@ -17,6 +17,7 @@ const DEFAULT_PLAYBACK_RATES = [
|
|
|
17
17
|
{ value: '2.0', label: '2x' }
|
|
18
18
|
];
|
|
19
19
|
const DEFAULT_PLAYBACK_RATE = '1.0';
|
|
20
|
+
// TODO
|
|
20
21
|
const MEDIACONTROL_PLAYBACKRATE = 'playbackRate';
|
|
21
22
|
export class PlaybackRate extends UICorePlugin {
|
|
22
23
|
currentPlayback = null;
|
|
@@ -24,7 +25,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
24
25
|
prevSelectedRate;
|
|
25
26
|
selectedRate = DEFAULT_PLAYBACK_RATE;
|
|
26
27
|
get name() {
|
|
27
|
-
return '
|
|
28
|
+
return 'media_control_playback_rate';
|
|
28
29
|
}
|
|
29
30
|
get supportedVersion() {
|
|
30
31
|
return { min: CLAPPR_VERSION };
|
|
@@ -202,4 +203,3 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
202
203
|
currentLevelElement.find('a').addClass('gcore-skin-active');
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
// PlaybackRate.MEDIACONTROL_PLAYBACKRATE = 'playbackRate';
|
|
@@ -1,27 +1,75 @@
|
|
|
1
1
|
import { UIContainerPlugin } from '@clappr/core';
|
|
2
2
|
import '../../../assets/poster/poster.scss';
|
|
3
|
+
/**
|
|
4
|
+
* Displays a poster image in the background and a big play button on top when playback is stopped
|
|
5
|
+
* @beta
|
|
6
|
+
* @remarks
|
|
7
|
+
* When the playback is stopped, media control UI is disabled.
|
|
8
|
+
*
|
|
9
|
+
* Configuration options:
|
|
10
|
+
*
|
|
11
|
+
* - `poster.custom` - custom CSS background
|
|
12
|
+
*
|
|
13
|
+
* - `poster.showForNoOp` - whether to show the poster when the playback is not started
|
|
14
|
+
*
|
|
15
|
+
* - `poster.url` - the URL of the poster image
|
|
16
|
+
*
|
|
17
|
+
* - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* new Player({
|
|
22
|
+
* ...
|
|
23
|
+
* poster: {
|
|
24
|
+
* showForNoOp: true,
|
|
25
|
+
* url: 'https://via.placeholder.com/150.png',
|
|
26
|
+
* }
|
|
27
|
+
* })
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
3
30
|
export declare class Poster extends UIContainerPlugin {
|
|
4
31
|
private hasFatalError;
|
|
5
32
|
private hasStartedPlaying;
|
|
6
33
|
private playRequested;
|
|
7
34
|
private $playButton;
|
|
8
35
|
private $playWrapper;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
9
39
|
get name(): string;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
10
43
|
get supportedVersion(): {
|
|
11
44
|
min: string;
|
|
12
45
|
};
|
|
13
|
-
|
|
14
|
-
get shouldRender()
|
|
46
|
+
private static readonly template;
|
|
47
|
+
private get shouldRender();
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
15
51
|
get attributes(): {
|
|
16
52
|
class: string;
|
|
17
53
|
'data-poster': string;
|
|
18
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
19
58
|
get events(): {
|
|
20
59
|
click: string;
|
|
21
60
|
};
|
|
22
|
-
get showOnVideoEnd()
|
|
61
|
+
private get showOnVideoEnd();
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
23
65
|
bindEvents(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Reenables earlier disabled plugin
|
|
68
|
+
*/
|
|
24
69
|
enable(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Disables the plugin, unmounting it from the DOM
|
|
72
|
+
*/
|
|
25
73
|
disable(): void;
|
|
26
74
|
private onError;
|
|
27
75
|
private onPlay;
|
|
@@ -36,7 +84,13 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
36
84
|
private updatePoster;
|
|
37
85
|
private showPoster;
|
|
38
86
|
private hidePoster;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
39
90
|
render(): this;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
40
94
|
destroy(): this;
|
|
41
95
|
}
|
|
42
96
|
//# sourceMappingURL=Poster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Poster.d.ts","sourceRoot":"","sources":["../../../src/plugins/poster/Poster.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,iBAAiB,EAIlB,MAAM,cAAc,CAAA;AAMrB,OAAO,oCAAoC,CAAA;AAO3C,qBAAa,MAAO,SAAQ,iBAAiB;IAC3C,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,iBAAiB,CAAQ;IAEjC,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,WAAW,CAA2B;IAE9C,OAAO,CAAC,YAAY,CAA2B;IAE/C,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;IAED,
|
|
1
|
+
{"version":3,"file":"Poster.d.ts","sourceRoot":"","sources":["../../../src/plugins/poster/Poster.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,iBAAiB,EAIlB,MAAM,cAAc,CAAA;AAMrB,OAAO,oCAAoC,CAAA;AAO3C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,MAAO,SAAQ,iBAAiB;IAC3C,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,iBAAiB,CAAQ;IAEjC,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,WAAW,CAA2B;IAE9C,OAAO,CAAC,YAAY,CAA2B;IAE/C;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD,OAAO,KAAK,YAAY,GAUvB;IAED;;OAEG;IACH,IAAa,UAAU;;;MAKtB;IAED;;OAEG;IACH,IAAa,MAAM;;MAIlB;IAED,OAAO,KAAK,cAAc,GAEzB;IAED;;OAEG;IACM,UAAU;IAiBnB;;OAEG;IACM,MAAM;IAMf;;OAEG;IACM,OAAO;IAOhB,OAAO,CAAC,OAAO;IAef,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,OAAO;IAqBf,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,UAAU;IAYlB;;OAEG;IACM,MAAM;IAuCf;;OAEG;IACM,OAAO;CAIjB"}
|
|
@@ -3,45 +3,78 @@
|
|
|
3
3
|
// license that can be found in the LICENSE file.
|
|
4
4
|
import { Events, Playback, PlayerError, UIContainerPlugin, template, $, } from '@clappr/core';
|
|
5
5
|
import { trace } from '@gcorevideo/utils';
|
|
6
|
-
import { CLAPPR_VERSION } from '
|
|
6
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
7
7
|
import '../../../assets/poster/poster.scss';
|
|
8
8
|
import posterHTML from '../../../assets/poster/poster.ejs';
|
|
9
9
|
import playIcon from '../../../assets/icons/new/play.svg';
|
|
10
10
|
const T = 'plugins.poster_custom';
|
|
11
|
+
/**
|
|
12
|
+
* Displays a poster image in the background and a big play button on top when playback is stopped
|
|
13
|
+
* @beta
|
|
14
|
+
* @remarks
|
|
15
|
+
* When the playback is stopped, media control UI is disabled.
|
|
16
|
+
*
|
|
17
|
+
* Configuration options:
|
|
18
|
+
*
|
|
19
|
+
* - `poster.custom` - custom CSS background
|
|
20
|
+
*
|
|
21
|
+
* - `poster.showForNoOp` - whether to show the poster when the playback is not started
|
|
22
|
+
*
|
|
23
|
+
* - `poster.url` - the URL of the poster image
|
|
24
|
+
*
|
|
25
|
+
* - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* new Player({
|
|
30
|
+
* ...
|
|
31
|
+
* poster: {
|
|
32
|
+
* showForNoOp: true,
|
|
33
|
+
* url: 'https://via.placeholder.com/150.png',
|
|
34
|
+
* }
|
|
35
|
+
* })
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
11
38
|
export class Poster extends UIContainerPlugin {
|
|
12
39
|
hasFatalError = false;
|
|
13
40
|
hasStartedPlaying = false;
|
|
14
41
|
playRequested = false;
|
|
15
42
|
$playButton = null;
|
|
16
43
|
$playWrapper = null;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
17
47
|
get name() {
|
|
18
48
|
return 'poster_custom';
|
|
19
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
20
53
|
get supportedVersion() {
|
|
21
54
|
return { min: CLAPPR_VERSION };
|
|
22
55
|
}
|
|
23
|
-
|
|
24
|
-
return template(posterHTML);
|
|
25
|
-
}
|
|
56
|
+
static template = template(posterHTML);
|
|
26
57
|
get shouldRender() {
|
|
27
58
|
if (!this.enabled) {
|
|
28
59
|
return false;
|
|
29
60
|
}
|
|
30
|
-
// const showOnError = this.options.poster?.showOnError !== false
|
|
31
|
-
trace(`${T} shouldRender`, {
|
|
32
|
-
hasFatalError: this.hasFatalError,
|
|
33
|
-
});
|
|
34
61
|
const showForNoOp = !!this.options.poster?.showForNoOp;
|
|
35
62
|
return (this.container.playback.name !== 'html_img' &&
|
|
36
63
|
(this.container.playback.getPlaybackType() !== Playback.NO_OP ||
|
|
37
64
|
showForNoOp));
|
|
38
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
39
69
|
get attributes() {
|
|
40
70
|
return {
|
|
41
71
|
class: 'player-poster',
|
|
42
72
|
'data-poster': '',
|
|
43
73
|
};
|
|
44
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
45
78
|
get events() {
|
|
46
79
|
return {
|
|
47
80
|
click: 'clicked',
|
|
@@ -50,6 +83,9 @@ export class Poster extends UIContainerPlugin {
|
|
|
50
83
|
get showOnVideoEnd() {
|
|
51
84
|
return this.options.poster?.showOnVideoEnd !== false;
|
|
52
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
53
89
|
bindEvents() {
|
|
54
90
|
this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop);
|
|
55
91
|
this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay);
|
|
@@ -62,11 +98,17 @@ export class Poster extends UIContainerPlugin {
|
|
|
62
98
|
this.listenTo(this.container, Events.CONTAINER_READY, this.render);
|
|
63
99
|
this.listenTo(this.container, Events.PLAYBACK_PLAY_INTENT, this.onPlayIntent);
|
|
64
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Reenables earlier disabled plugin
|
|
103
|
+
*/
|
|
65
104
|
enable() {
|
|
66
105
|
super.enable();
|
|
67
106
|
this.hasStartedPlaying = this.container.playback.isPlaying();
|
|
68
107
|
this.update();
|
|
69
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Disables the plugin, unmounting it from the DOM
|
|
111
|
+
*/
|
|
70
112
|
disable() {
|
|
71
113
|
trace(`${T} disable`);
|
|
72
114
|
this.hasStartedPlaying = false;
|
|
@@ -197,11 +239,14 @@ export class Poster extends UIContainerPlugin {
|
|
|
197
239
|
this.$el.hide();
|
|
198
240
|
}
|
|
199
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
200
245
|
render() {
|
|
201
246
|
if (!this.shouldRender) {
|
|
202
247
|
return this;
|
|
203
248
|
}
|
|
204
|
-
this.$el.html(
|
|
249
|
+
this.$el.html(Poster.template());
|
|
205
250
|
const isRegularPoster = this.options.poster && this.options.poster.custom === undefined;
|
|
206
251
|
if (isRegularPoster) {
|
|
207
252
|
const posterUrl = this.options.poster.url || this.options.poster;
|
|
@@ -225,6 +270,9 @@ export class Poster extends UIContainerPlugin {
|
|
|
225
270
|
this.update();
|
|
226
271
|
return this;
|
|
227
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
*/
|
|
228
276
|
destroy() {
|
|
229
277
|
this.container.$el.removeClass('container-with-poster-clickable');
|
|
230
278
|
return this;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style
|
|
3
3
|
// license that can be found in the LICENSE file.
|
|
4
4
|
import { Events, Playback, UICorePlugin, Utils, template } from '@clappr/core';
|
|
5
|
-
import { CLAPPR_VERSION } from '
|
|
5
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
6
6
|
import seekTimeHTML from '../../../assets/seek-time/seek-time.html';
|
|
7
7
|
import '../../../assets/seek-time/seek-time.scss';
|
|
8
8
|
const { formatTime } = Utils;
|
|
9
9
|
export class SeekTime extends UICorePlugin {
|
|
10
10
|
get name() {
|
|
11
|
-
return '
|
|
11
|
+
return 'media_control_seek_time';
|
|
12
12
|
}
|
|
13
13
|
get supportedVersion() {
|
|
14
14
|
return { min: CLAPPR_VERSION };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Events, UICorePlugin, template } from '@clappr/core';
|
|
2
|
-
import { CLAPPR_VERSION } from '
|
|
2
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
3
3
|
import pluginHtml from '../../../assets/share/share.ejs';
|
|
4
4
|
import '../../../assets/share/style.scss';
|
|
5
5
|
import shareIcon from '../../../assets/icons/old/share.svg';
|
|
@@ -10,7 +10,7 @@ export class Share extends UICorePlugin {
|
|
|
10
10
|
hide = false;
|
|
11
11
|
container = null;
|
|
12
12
|
get name() {
|
|
13
|
-
return '
|
|
13
|
+
return 'media_control_share';
|
|
14
14
|
}
|
|
15
15
|
get supportedVersion() {
|
|
16
16
|
return { min: CLAPPR_VERSION };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UICorePlugin as UICorePluginOriginal, Browser, Playback, Events, template } from '@clappr/core';
|
|
2
|
-
import { CLAPPR_VERSION } from '
|
|
2
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
3
3
|
import pluginHtml from '../../../assets/skip-time/skip-time.ejs';
|
|
4
4
|
import '../../../assets/skip-time/style.scss';
|
|
5
5
|
export class SkipTime extends UICorePluginOriginal {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceController.d.ts","sourceRoot":"","sources":["../../../src/plugins/source-controller/SourceController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,KAAK,IAAI,IAAI,UAAU,EACxB,MAAM,cAAc,CAAA;AA4BrB;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAuC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,IAAI,CAAiB;IAE7B,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;gBAEW,IAAI,EAAE,UAAU;IAW5B;;OAEG;IACM,UAAU;IAMnB,OAAO,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"SourceController.d.ts","sourceRoot":"","sources":["../../../src/plugins/source-controller/SourceController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,KAAK,IAAI,IAAI,UAAU,EACxB,MAAM,cAAc,CAAA;AA4BrB;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAuC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,IAAI,CAAiB;IAE7B,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;gBAEW,IAAI,EAAE,UAAU;IAW5B;;OAEG;IACM,UAAU;IAMnB,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,2BAA2B;IAsCnC,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,aAAa;IA0BrB,OAAO,CAAC,kBAAkB;IAe1B,MAAM,KAAK,OAAO,WAEjB;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Events as ClapprEvents, CorePlugin, } from '@clappr/core';
|
|
2
2
|
import { PlaybackErrorCode, } from '../../playback.types.js';
|
|
3
3
|
import { trace } from '@gcorevideo/utils';
|
|
4
|
-
import { CLAPPR_VERSION } from '
|
|
4
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
5
5
|
const T = 'plugins.source_controller';
|
|
6
6
|
const INITIAL_RETRY_DELAY = 1000;
|
|
7
7
|
const MAX_RETRY_DELAY = 5000;
|
|
@@ -109,7 +109,6 @@ export class SourceController extends CorePlugin {
|
|
|
109
109
|
else {
|
|
110
110
|
this.sync = noSync;
|
|
111
111
|
}
|
|
112
|
-
// TODO bind to CORE_ACTIVE_CONTAINER_CHANGED
|
|
113
112
|
this.bindContainerEventListeners();
|
|
114
113
|
if (this.active) {
|
|
115
114
|
this.core.activeContainer?.getPlugin('poster_custom')?.disable();
|
|
@@ -6,7 +6,7 @@ import { PlaybackErrorCode } from '../../playback.types.js';
|
|
|
6
6
|
import { trace } from '@gcorevideo/utils';
|
|
7
7
|
import spinnerHTML from '../../../assets/spinner-three-bounce/spinner.ejs';
|
|
8
8
|
import '../../../assets/spinner-three-bounce/spinner.scss';
|
|
9
|
-
import { CLAPPR_VERSION } from '
|
|
9
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
10
10
|
const T = 'plugins.spinner';
|
|
11
11
|
export class SpinnerThreeBounce extends UIContainerPlugin {
|
|
12
12
|
get name() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ContainerPlugin, Events, Playback } from '@clappr/core';
|
|
3
3
|
import { reportError } from '@gcorevideo/utils';
|
|
4
4
|
import assert from 'assert';
|
|
5
|
-
import { CLAPPR_VERSION } from '
|
|
5
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
6
6
|
const CUSTOM_EVENTS_CONTAINER_START = 'container:start';
|
|
7
7
|
const WATCH_CUTOFF = 5;
|
|
8
8
|
const HEATMAP_INTERVAL = 10;
|