@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// license that can be found in the {@link https://github.com/clappr/clappr-plugins/blob/master/LICENSE | LICENSE}.
|
|
6
6
|
import assert from 'assert';
|
|
7
7
|
import { Events, UICorePlugin, Browser, Playback, Utils, template, $, } from '@clappr/core';
|
|
8
|
-
import { reportError, trace } from '@gcorevideo/utils';
|
|
8
|
+
import { reportError /* , trace */ } from '@gcorevideo/utils';
|
|
9
9
|
// TODO replace Kibo with mousetrap
|
|
10
10
|
import { Kibo } from '../kibo/index.js';
|
|
11
11
|
import { CLAPPR_VERSION } from '../../build.js';
|
|
@@ -48,10 +48,10 @@ const INITIAL_SETTINGS = {
|
|
|
48
48
|
default: [],
|
|
49
49
|
seekEnabled: false,
|
|
50
50
|
};
|
|
51
|
-
const T = 'plugins.media_control'
|
|
51
|
+
// const T = 'plugins.media_control'
|
|
52
52
|
/**
|
|
53
53
|
* Extended events for the {@link MediaControl} plugin
|
|
54
|
-
* @
|
|
54
|
+
* @public
|
|
55
55
|
*/
|
|
56
56
|
export var ExtendedEvents;
|
|
57
57
|
(function (ExtendedEvents) {
|
|
@@ -135,7 +135,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* @returns Default media control layout settings
|
|
138
|
-
* @
|
|
138
|
+
* @remarks
|
|
139
139
|
* The method can be used to change the default dashboard layout, for example, removing the standard UI elements
|
|
140
140
|
* @example
|
|
141
141
|
* ```ts
|
|
@@ -330,7 +330,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
330
330
|
* Hides the media control UI
|
|
331
331
|
*/
|
|
332
332
|
disable() {
|
|
333
|
-
trace(`${T} disable`);
|
|
334
333
|
this.userDisabled = true; // TODO distinguish between user and system (e.g., unplayable) disabled?
|
|
335
334
|
this.hide();
|
|
336
335
|
this.unbindKeyEvents();
|
|
@@ -340,7 +339,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
340
339
|
* Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
|
|
341
340
|
*/
|
|
342
341
|
enable() {
|
|
343
|
-
trace(`${T} enable`);
|
|
344
342
|
if (this.options.chromeless) {
|
|
345
343
|
return;
|
|
346
344
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { UICorePlugin } from '@clappr/core';
|
|
2
2
|
import '../../../assets/picture-in-picture/style.scss';
|
|
3
3
|
/**
|
|
4
|
-
* `PLUGIN` that enables picture
|
|
5
|
-
* @
|
|
4
|
+
* `PLUGIN` that enables picture-in-picture mode.
|
|
5
|
+
* @public
|
|
6
6
|
* @remarks
|
|
7
7
|
* Depends on:
|
|
8
8
|
*
|
|
9
9
|
* - {@link MediaControl}
|
|
10
10
|
*
|
|
11
|
-
* It renders a button to toggle picture
|
|
11
|
+
* It renders a button to toggle picture-in-picture mode in the media control UI.
|
|
12
12
|
*/
|
|
13
13
|
export declare class PictureInPicture extends UICorePlugin {
|
|
14
14
|
/**
|
|
@@ -8,14 +8,14 @@ import assert from 'assert';
|
|
|
8
8
|
const VERSION = '0.0.1';
|
|
9
9
|
const T = `plugins.pip`;
|
|
10
10
|
/**
|
|
11
|
-
* `PLUGIN` that enables picture
|
|
12
|
-
* @
|
|
11
|
+
* `PLUGIN` that enables picture-in-picture mode.
|
|
12
|
+
* @public
|
|
13
13
|
* @remarks
|
|
14
14
|
* Depends on:
|
|
15
15
|
*
|
|
16
16
|
* - {@link MediaControl}
|
|
17
17
|
*
|
|
18
|
-
* It renders a button to toggle picture
|
|
18
|
+
* It renders a button to toggle picture-in-picture mode in the media control UI.
|
|
19
19
|
*/
|
|
20
20
|
export class PictureInPicture extends UICorePlugin {
|
|
21
21
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { UICorePlugin, Core } from '@clappr/core';
|
|
2
2
|
/**
|
|
3
|
-
* @
|
|
3
|
+
* @public
|
|
4
4
|
*/
|
|
5
5
|
export type PlaybackRateOption = {
|
|
6
6
|
value: number;
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* @
|
|
10
|
+
* @public
|
|
11
11
|
*/
|
|
12
12
|
export type PlaybackRateSettings = {
|
|
13
13
|
options?: PlaybackRateOption[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaybackRate.d.ts","sourceRoot":"","sources":["../../../src/plugins/playback-rate/PlaybackRate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAsB,IAAI,EAAK,MAAM,cAAc,CAAA;AAkBhF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAI5C,OAAO,CAAC,YAAY,CAAwB;IAE5C,OAAO,CAAC,cAAc,CAAQ;IAE9B,OAAO,CAAC,YAAY,CAAuB;IAE3C;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAuB;IAE7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAqB;gBAE7C,IAAI,EAAE,IAAI;IAOtB,OAAO,KAAK,aAAa,GAExB;IAED;;OAEG;IACH,IAAa,UAAU;;MAItB;IAED;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,sBAAsB;IAK9B,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,KAAK;IAsBb,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAA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BAAoB;IAe5B,OAAO,CAAC,WAAW;IAenB;;OAEG;IACM,MAAM;IAcf;;OAEG;IACM,OAAO;IAwBhB,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,MAAM;IAEd,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,qBAAqB;CAG9B"}
|
|
@@ -177,10 +177,6 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
shouldMount() {
|
|
180
|
-
trace(`${T} shouldMount`, {
|
|
181
|
-
playbackType: this.core.activePlayback?.getPlaybackType(),
|
|
182
|
-
dvrEnabled: this.core.activePlayback?.dvrEnabled,
|
|
183
|
-
});
|
|
184
180
|
if (!this.core.activePlayback || !this.metadataLoaded) {
|
|
185
181
|
return false;
|
|
186
182
|
}
|
|
@@ -194,9 +190,6 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
194
190
|
* @internal
|
|
195
191
|
*/
|
|
196
192
|
render() {
|
|
197
|
-
trace(`${T} render`, {
|
|
198
|
-
shouldMount: this.shouldMount(),
|
|
199
|
-
});
|
|
200
193
|
this.$el.html(PlaybackRate.listTemplate({
|
|
201
194
|
arrowLeftIcon,
|
|
202
195
|
checkIcon,
|
|
@@ -292,9 +285,6 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
292
285
|
.addClass('gcore-skin-active');
|
|
293
286
|
}
|
|
294
287
|
updateGearOptionLabel() {
|
|
295
|
-
trace(`${T} updateGearOptionLabel`, {
|
|
296
|
-
selectedRate: this.selectedRate,
|
|
297
|
-
});
|
|
298
288
|
this.mount();
|
|
299
289
|
}
|
|
300
290
|
}
|
|
@@ -2,7 +2,7 @@ import { UIContainerPlugin } from '@clappr/core';
|
|
|
2
2
|
import '../../../assets/poster/poster.scss';
|
|
3
3
|
/**
|
|
4
4
|
* Config options for the {@link Poster} plugin
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export interface PosterPluginSettings {
|
|
8
8
|
/**
|
|
@@ -24,7 +24,7 @@ export interface PosterPluginSettings {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
27
|
-
* @
|
|
27
|
+
* @public
|
|
28
28
|
* @remarks
|
|
29
29
|
* When the playback is stopped or not yet started, the media control UI is disabled and hidden.
|
|
30
30
|
* Media control gets activated once the metadata is loaded after playback is initiated.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Poster.d.ts","sourceRoot":"","sources":["../../../src/plugins/poster/Poster.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,iBAAiB,EAElB,MAAM,cAAc,CAAA;AAMrB,OAAO,oCAAoC,CAAA;AAK3C;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAID;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,MAAO,SAAQ,iBAAiB;IAG3C,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,OAAO,CAAQ;IAEvB,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,WAAW,CAA2B;IAE9C;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD,OAAO,KAAK,YAAY,GASvB;IAED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AAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,UAAU;IASlB;;OAEG;IACM,MAAM;IAgCf;;OAEG;IACM,OAAO;CAIjB"}
|
|
@@ -2,15 +2,15 @@
|
|
|
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, PlayerError, UIContainerPlugin, template, } from '@clappr/core';
|
|
5
|
-
import { trace } from '@gcorevideo/utils'
|
|
5
|
+
// import { trace } from '@gcorevideo/utils'
|
|
6
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
|
-
const T = 'plugins.poster'
|
|
10
|
+
// const T = 'plugins.poster'
|
|
11
11
|
/**
|
|
12
12
|
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
13
|
-
* @
|
|
13
|
+
* @public
|
|
14
14
|
* @remarks
|
|
15
15
|
* When the playback is stopped or not yet started, the media control UI is disabled and hidden.
|
|
16
16
|
* Media control gets activated once the metadata is loaded after playback is initiated.
|
|
@@ -98,7 +98,6 @@ export class Poster extends UIContainerPlugin {
|
|
|
98
98
|
* Reenables earlier disabled plugin
|
|
99
99
|
*/
|
|
100
100
|
enable() {
|
|
101
|
-
trace(`${T} enable`);
|
|
102
101
|
super.enable();
|
|
103
102
|
this.playing = this.container.playback.isPlaying();
|
|
104
103
|
this.update();
|
|
@@ -107,16 +106,11 @@ export class Poster extends UIContainerPlugin {
|
|
|
107
106
|
* Disables the plugin, unmounting it from the DOM
|
|
108
107
|
*/
|
|
109
108
|
disable() {
|
|
110
|
-
trace(`${T} disable`);
|
|
111
109
|
this.playing = false;
|
|
112
110
|
this.playRequested = false;
|
|
113
111
|
super.disable();
|
|
114
112
|
}
|
|
115
113
|
onError(error) {
|
|
116
|
-
trace(`${T} onError`, {
|
|
117
|
-
error,
|
|
118
|
-
enabled: this.enabled,
|
|
119
|
-
});
|
|
120
114
|
if (this.hasFatalError) {
|
|
121
115
|
return;
|
|
122
116
|
}
|
|
@@ -124,24 +118,20 @@ export class Poster extends UIContainerPlugin {
|
|
|
124
118
|
// this.hasFatalError is reset on container recreate
|
|
125
119
|
}
|
|
126
120
|
onPlay() {
|
|
127
|
-
trace(`${T} onPlay`);
|
|
128
121
|
this.playing = true;
|
|
129
122
|
this.playRequested = false;
|
|
130
123
|
this.update();
|
|
131
124
|
}
|
|
132
125
|
onPlayIntent() {
|
|
133
|
-
trace(`${T} onPlayIntent`);
|
|
134
126
|
this.playRequested = true;
|
|
135
127
|
this.update();
|
|
136
128
|
}
|
|
137
129
|
onStop() {
|
|
138
|
-
trace(`${T} onStop`);
|
|
139
130
|
this.playing = false;
|
|
140
131
|
this.playRequested = false;
|
|
141
132
|
this.update();
|
|
142
133
|
}
|
|
143
134
|
updatePlayButton() {
|
|
144
|
-
trace(`${T} updatePlayButton`);
|
|
145
135
|
const show = !this.isNoOp &&
|
|
146
136
|
!(this.options.chromeless && !this.options.allowUserInteraction) &&
|
|
147
137
|
!this.playRequested &&
|
|
@@ -157,18 +147,15 @@ export class Poster extends UIContainerPlugin {
|
|
|
157
147
|
}
|
|
158
148
|
}
|
|
159
149
|
showPlayButton() {
|
|
160
|
-
trace(`${T} showPlayButton`);
|
|
161
150
|
this.$el.find('#poster-play').show();
|
|
162
151
|
this.$el.addClass('clickable');
|
|
163
152
|
this.container.$el.addClass('container-with-poster-clickable');
|
|
164
153
|
}
|
|
165
154
|
hidePlayButton() {
|
|
166
|
-
trace(`${T} hidePlayButton`);
|
|
167
155
|
this.$el.find('#poster-play').hide();
|
|
168
156
|
this.$el.removeClass('clickable');
|
|
169
157
|
}
|
|
170
158
|
clicked(e) {
|
|
171
|
-
trace(`${T} clicked`);
|
|
172
159
|
e.preventDefault();
|
|
173
160
|
e.stopPropagation();
|
|
174
161
|
if (this.options.chromeless && !this.options.allowUserInteraction) {
|
|
@@ -186,12 +173,10 @@ export class Poster extends UIContainerPlugin {
|
|
|
186
173
|
return !this.container.playback.isAudioOnly;
|
|
187
174
|
}
|
|
188
175
|
update() {
|
|
189
|
-
trace(`${T} update`);
|
|
190
176
|
this.updatePlayButton();
|
|
191
177
|
this.updatePoster();
|
|
192
178
|
}
|
|
193
179
|
updatePoster() {
|
|
194
|
-
trace(`${T} updatePoster`);
|
|
195
180
|
if (!this.playing) {
|
|
196
181
|
this.showPoster();
|
|
197
182
|
}
|
|
@@ -204,7 +189,6 @@ export class Poster extends UIContainerPlugin {
|
|
|
204
189
|
this.$el.show();
|
|
205
190
|
}
|
|
206
191
|
hidePoster() {
|
|
207
|
-
trace(`${T} hidePoster`);
|
|
208
192
|
if (!this.options.disableMediaControl) {
|
|
209
193
|
this.container.enableMediaControl();
|
|
210
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeekTime.d.ts","sourceRoot":"","sources":["../../../src/plugins/seek-time/SeekTime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,YAAY,EAAmB,MAAM,cAAc,CAAA;AAO9E,OAAO,0CAA0C,CAAA;AAGjD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAMD;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACxC,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAEzD,IAAa,UAAU;;MAItB;IAED,OAAO,KAAK,mBAAmB,GAM9B;IAED,OAAO,KAAK,YAAY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AM;IA6Cd,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACM,MAAM;IAQf,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -6,9 +6,8 @@ import assert from 'assert';
|
|
|
6
6
|
import { CLAPPR_VERSION } from '../../build.js';
|
|
7
7
|
import seekTimeHTML from '../../../assets/seek-time/seek-time.html';
|
|
8
8
|
import '../../../assets/seek-time/seek-time.scss';
|
|
9
|
-
import { trace } from '@gcorevideo/utils';
|
|
10
9
|
const { formatTime } = Utils;
|
|
11
|
-
const T = 'plugins.seek_time'
|
|
10
|
+
// const T = 'plugins.seek_time'
|
|
12
11
|
/**
|
|
13
12
|
* `PLUGIN` that adds a seek time indicator when the mouse pointer is over the seek bar.
|
|
14
13
|
* @beta
|
|
@@ -67,13 +66,9 @@ export class SeekTime extends UICorePlugin {
|
|
|
67
66
|
showTime(event) {
|
|
68
67
|
this.hoveringOverSeekBar = true;
|
|
69
68
|
this.calculateHoverPosition(event);
|
|
70
|
-
trace(`${T} showTime`, {
|
|
71
|
-
hoverPosition: this.hoverPosition,
|
|
72
|
-
});
|
|
73
69
|
this.update();
|
|
74
70
|
}
|
|
75
71
|
hideTime() {
|
|
76
|
-
trace(`${T} hideTime`);
|
|
77
72
|
this.hoveringOverSeekBar = false;
|
|
78
73
|
this.update();
|
|
79
74
|
}
|
|
@@ -2,7 +2,7 @@ import { UICorePlugin } from '@clappr/core';
|
|
|
2
2
|
import '../../../assets/skip-time/style.scss';
|
|
3
3
|
/**
|
|
4
4
|
* `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export declare class SkipTime extends UICorePlugin {
|
|
8
8
|
get name(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkipTime.d.ts","sourceRoot":"","sources":["../../../src/plugins/skip-time/SkipTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuC,MAAM,cAAc,CAAA;AAMhF,OAAO,sCAAsC,CAAA;AAM7C;;;GAGG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACxC,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;IAED,IAAI,SAAS,QAEZ;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,UAAU;;MAItB;IAED,OAAO,CAAC,QAAQ,CAAkB;IAElC;;OAEG;IACH,IAAa,MAAM;;;;MAMlB;IAED;;OAEG;IACM,UAAU;IAKnB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"SkipTime.d.ts","sourceRoot":"","sources":["../../../src/plugins/skip-time/SkipTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuC,MAAM,cAAc,CAAA;AAMhF,OAAO,sCAAsC,CAAA;AAM7C;;;GAGG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACxC,IAAI,IAAI,WAEP;IAED,IAAI,gBAAgB;;MAEnB;IAED,IAAI,SAAS,QAEZ;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,UAAU;;MAItB;IAED,OAAO,CAAC,QAAQ,CAAkB;IAElC;;OAEG;IACH,IAAa,MAAM;;;;MAMlB;IAED;;OAEG;IACM,UAAU;IAKnB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,gBAAgB;IAMxB;;OAEG;IACM,MAAM;IAMf,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UICorePlugin, Browser, Playback, Events, template } from '@clappr/core';
|
|
2
|
-
import { trace } from '@gcorevideo/utils'
|
|
2
|
+
// import { trace } from '@gcorevideo/utils'
|
|
3
3
|
import { CLAPPR_VERSION } from '../../build.js';
|
|
4
4
|
import pluginHtml from '../../../assets/skip-time/skip-time.ejs';
|
|
5
5
|
import '../../../assets/skip-time/style.scss';
|
|
6
|
-
const T = 'plugins.skip_time'
|
|
6
|
+
// const T = 'plugins.skip_time'
|
|
7
7
|
/**
|
|
8
8
|
* `PLUGIN` that allows skipping time by tapping on the left or right side of the video.
|
|
9
|
-
* @
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export class SkipTime extends UICorePlugin {
|
|
12
12
|
get name() {
|
|
@@ -50,13 +50,9 @@ export class SkipTime extends UICorePlugin {
|
|
|
50
50
|
this.mount();
|
|
51
51
|
}
|
|
52
52
|
setBack() {
|
|
53
|
-
trace(`${T} setBack`);
|
|
54
53
|
this.position = 'left';
|
|
55
54
|
}
|
|
56
55
|
handleRewindClicks() {
|
|
57
|
-
trace(`${T} handleRewindClicks`, {
|
|
58
|
-
position: this.position,
|
|
59
|
-
});
|
|
60
56
|
if (this.core.getPlaybackType() === Playback.LIVE &&
|
|
61
57
|
!this.container.isDvrEnabled()) {
|
|
62
58
|
this.toggleFullscreen();
|
|
@@ -65,9 +61,6 @@ export class SkipTime extends UICorePlugin {
|
|
|
65
61
|
this.handleSkip();
|
|
66
62
|
}
|
|
67
63
|
handleSkip() {
|
|
68
|
-
trace(`${T} handleSkip`, {
|
|
69
|
-
position: this.position,
|
|
70
|
-
});
|
|
71
64
|
if (Browser.isMobile) {
|
|
72
65
|
if (this.position === 'left') {
|
|
73
66
|
const seekPos = this.container.getCurrentTime() - 10;
|
|
@@ -89,15 +82,12 @@ export class SkipTime extends UICorePlugin {
|
|
|
89
82
|
}
|
|
90
83
|
}
|
|
91
84
|
setMidClick() {
|
|
92
|
-
trace(`${T} setMidClick`);
|
|
93
85
|
this.position = 'mid';
|
|
94
86
|
}
|
|
95
87
|
setForward() {
|
|
96
|
-
trace(`${T} setForward`);
|
|
97
88
|
this.position = 'right';
|
|
98
89
|
}
|
|
99
90
|
toggleFullscreen() {
|
|
100
|
-
trace(`${T} toggleFullscreen`);
|
|
101
91
|
this.trigger(Events.MEDIACONTROL_FULLSCREEN, this.name);
|
|
102
92
|
this.container.fullscreen();
|
|
103
93
|
this.core.toggleFullscreen();
|
|
@@ -106,12 +96,10 @@ export class SkipTime extends UICorePlugin {
|
|
|
106
96
|
* @internal
|
|
107
97
|
*/
|
|
108
98
|
render() {
|
|
109
|
-
trace(`${T} render`);
|
|
110
99
|
this.$el.html(SkipTime.template());
|
|
111
100
|
return this;
|
|
112
101
|
}
|
|
113
102
|
mount() {
|
|
114
|
-
trace(`${T} mount`);
|
|
115
103
|
this.core.activeContainer.$el.append(this.el);
|
|
116
104
|
}
|
|
117
105
|
}
|
|
@@ -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;AAwBrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAwC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAO,CAAC,IAAI,CAAiB;IAE7B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;gBACS,IAAI,EAAE,UAAU;IAW5B;;OAEG;IACM,UAAU;IAWnB,OAAO,CAAC,WAAW;
|
|
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;AAwBrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAwC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAO,CAAC,IAAI,CAAiB;IAE7B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;gBACS,IAAI,EAAE,UAAU;IAW5B;;OAEG;IACM,UAAU;IAWnB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,2BAA2B;IAqDnC,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACH,MAAM,KAAK,OAAO,WAEjB;CACF"}
|
|
@@ -146,14 +146,9 @@ export class SourceController extends CorePlugin {
|
|
|
146
146
|
this.listenTo(this.core, Events.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
|
|
147
147
|
}
|
|
148
148
|
onCoreReady() {
|
|
149
|
-
trace(`${T} onCoreReady`);
|
|
150
149
|
this.core.getPlugin('error_screen')?.disable(); // TODO test
|
|
151
150
|
}
|
|
152
151
|
onActiveContainerChanged() {
|
|
153
|
-
trace(`${T} onActiveContainerChanged`, {
|
|
154
|
-
retrying: this.active,
|
|
155
|
-
currentSource: this.sourcesList[this.currentSourceIndex],
|
|
156
|
-
});
|
|
157
152
|
const spinner = this.core.activeContainer?.getPlugin('spinner');
|
|
158
153
|
if (spinner) {
|
|
159
154
|
this.sync = (cb) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerThreeBounce.d.ts","sourceRoot":"","sources":["../../../src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,SAAS,EAET,iBAAiB,EAElB,MAAM,cAAc,CAAA;AAKrB,OAAO,mDAAmD,CAAA;AAM1D;;;GAGG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,IAAI,yBAAyB;CAC9B;AAED;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,OAAO,CAAC,SAAS,CAAQ;IAEzB;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,IAAa,UAAU;;;MAKtB;IAED,OAAO,CAAC,WAAW,CAAuB;IAE1C,OAAO,CAAC,QAAQ,CAAwB;IAExC,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,YAAY,CAAQ;gBAEhB,SAAS,EAAE,SAAS;IAmBhC,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"SpinnerThreeBounce.d.ts","sourceRoot":"","sources":["../../../src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,SAAS,EAET,iBAAiB,EAElB,MAAM,cAAc,CAAA;AAKrB,OAAO,mDAAmD,CAAA;AAM1D;;;GAGG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,IAAI,yBAAyB;CAC9B;AAED;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,OAAO,CAAC,SAAS,CAAQ;IAEzB;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,IAAa,UAAU;;;MAKtB;IAED,OAAO,CAAC,WAAW,CAAuB;IAE1C,OAAO,CAAC,QAAQ,CAAwB;IAExC,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,YAAY,CAAQ;gBAEhB,SAAS,EAAE,SAAS;IAmBhC,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,OAAO;IAKf;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,SAAM;IAKhB;;OAEG;IACH,IAAI;IAKJ,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,KAAK;IAYb;;OAEG;IACM,MAAM;CAchB"}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
// license that can be found in the LICENSE file.
|
|
5
5
|
// https://github.com/clappr/clappr-plugins/blob/ffaa9d27005fa5a8a7c243ffc47eb5655b84b371/LICENSE
|
|
6
6
|
import { Events as ClapprEvents, UIContainerPlugin, template, } from '@clappr/core';
|
|
7
|
-
import { trace } from '@gcorevideo/utils'
|
|
7
|
+
// import { trace } from '@gcorevideo/utils'
|
|
8
8
|
import { PlaybackErrorCode } from '../../playback.types.js';
|
|
9
9
|
import spinnerHTML from '../../../assets/spinner-three-bounce/spinner.ejs';
|
|
10
10
|
import '../../../assets/spinner-three-bounce/spinner.scss';
|
|
11
11
|
import { CLAPPR_VERSION } from '../../build.js';
|
|
12
|
-
const T = 'plugins.spinner'
|
|
12
|
+
// const T = 'plugins.spinner'
|
|
13
13
|
/**
|
|
14
14
|
* Custom events emitted by the plugin
|
|
15
15
|
* @public
|
|
@@ -79,22 +79,13 @@ export class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
79
79
|
this.hasBuffering = false;
|
|
80
80
|
}
|
|
81
81
|
onPlay() {
|
|
82
|
-
trace(`${T} onPlay`);
|
|
83
82
|
this._hide();
|
|
84
83
|
}
|
|
85
84
|
onStop() {
|
|
86
|
-
trace(`${T} onStop`, {
|
|
87
|
-
hasFatalError: this.hasFatalError,
|
|
88
|
-
});
|
|
89
85
|
this._hide();
|
|
90
86
|
}
|
|
91
87
|
onError(e) {
|
|
92
88
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
93
|
-
trace(`${T} onError`, {
|
|
94
|
-
e,
|
|
95
|
-
hasFatalError: this.hasFatalError,
|
|
96
|
-
error: e.code,
|
|
97
|
-
});
|
|
98
89
|
this._hide();
|
|
99
90
|
}
|
|
100
91
|
/**
|
|
@@ -105,7 +96,6 @@ export class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
105
96
|
* @param delay - The delay in milliseconds before the spinner is shown.
|
|
106
97
|
*/
|
|
107
98
|
show(delay = 300) {
|
|
108
|
-
trace(`${T} show`);
|
|
109
99
|
this.userShown = true;
|
|
110
100
|
this._show(delay);
|
|
111
101
|
}
|
|
@@ -125,9 +115,6 @@ export class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
125
115
|
}
|
|
126
116
|
}
|
|
127
117
|
_hide() {
|
|
128
|
-
trace(`${T} _hide`, {
|
|
129
|
-
userShown: this.userShown,
|
|
130
|
-
});
|
|
131
118
|
if (this.userShown) {
|
|
132
119
|
return;
|
|
133
120
|
}
|
|
@@ -142,9 +129,6 @@ export class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
142
129
|
* @internal
|
|
143
130
|
*/
|
|
144
131
|
render() {
|
|
145
|
-
trace(`${T} render`, {
|
|
146
|
-
buffering: this.container.buffering,
|
|
147
|
-
});
|
|
148
132
|
this.$el.html(this.template());
|
|
149
133
|
this.el.firstElementChild?.addEventListener('animationiteration', () => {
|
|
150
134
|
this.trigger(SpinnerEvents.SYNC);
|
|
@@ -2,7 +2,7 @@ import { UICorePlugin } from '@clappr/core';
|
|
|
2
2
|
import '../../../assets/subtitles/style.scss';
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the {@link ClosedCaptions} plugin.
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export type ClosedCaptionsPluginSettings = {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export type ClosedCaptionsPluginSettings = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
15
|
-
* @
|
|
15
|
+
* @public
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
18
|
* The plugin is activated when closed captions tracks are detected in the media source.
|
|
@@ -23,6 +23,14 @@ export type ClosedCaptionsPluginSettings = {
|
|
|
23
23
|
* - {@link MediaControl}
|
|
24
24
|
*
|
|
25
25
|
* Configuration options - {@link ClosedCaptionsPluginSettings}
|
|
26
|
+
*
|
|
27
|
+
* Known issues:
|
|
28
|
+
*
|
|
29
|
+
* 1. When media source changes, the subtitles tracks aren't reloaded. Possible solution: use `playback.recycleVideo = false`
|
|
30
|
+
* {@link PlayerConfig | main config option}, which will force new video element creation every time media source changes.
|
|
31
|
+
* However, this may lead to other issues, such as autoplay not working (after media source has been changed).
|
|
32
|
+
* {@link https://github.com/video-dev/hls.js/issues/2198 | related discussion}
|
|
33
|
+
*
|
|
26
34
|
* @example
|
|
27
35
|
* ```ts
|
|
28
36
|
* import { ClosedCaptions } from '@gcorevideo/player'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClosedCaptions.d.ts","sourceRoot":"","sources":["../../../src/plugins/subtitles/ClosedCaptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAwB,MAAM,cAAc,CAAA;AAOzE,OAAO,sCAAsC,CAAA;AAgB7C;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"ClosedCaptions.d.ts","sourceRoot":"","sources":["../../../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AC,QAAQ;IAIhB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,yBAAyB;IAgBjC,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,yBAAyB;IAiBjC,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,KAAK;CAMd"}
|
|
@@ -14,7 +14,7 @@ const LOCAL_STORAGE_CC_ID = 'gplayer.plugins.cc.selected';
|
|
|
14
14
|
const T = 'plugins.cc';
|
|
15
15
|
/**
|
|
16
16
|
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
17
|
-
* @
|
|
17
|
+
* @public
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
20
|
* The plugin is activated when closed captions tracks are detected in the media source.
|
|
@@ -25,6 +25,14 @@ const T = 'plugins.cc';
|
|
|
25
25
|
* - {@link MediaControl}
|
|
26
26
|
*
|
|
27
27
|
* Configuration options - {@link ClosedCaptionsPluginSettings}
|
|
28
|
+
*
|
|
29
|
+
* Known issues:
|
|
30
|
+
*
|
|
31
|
+
* 1. When media source changes, the subtitles tracks aren't reloaded. Possible solution: use `playback.recycleVideo = false`
|
|
32
|
+
* {@link PlayerConfig | main config option}, which will force new video element creation every time media source changes.
|
|
33
|
+
* However, this may lead to other issues, such as autoplay not working (after media source has been changed).
|
|
34
|
+
* {@link https://github.com/video-dev/hls.js/issues/2198 | related discussion}
|
|
35
|
+
*
|
|
28
36
|
* @example
|
|
29
37
|
* ```ts
|
|
30
38
|
* import { ClosedCaptions } from '@gcorevideo/player'
|
|
@@ -133,7 +141,9 @@ export class ClosedCaptions extends UICorePlugin {
|
|
|
133
141
|
});
|
|
134
142
|
}
|
|
135
143
|
onSubtitleAvailable() {
|
|
136
|
-
trace(`${T} onSubtitleAvailable
|
|
144
|
+
trace(`${T} onSubtitleAvailable`, {
|
|
145
|
+
tracks: this.core.activePlayback.closedCaptionsTracks.length,
|
|
146
|
+
});
|
|
137
147
|
this.applyTracks();
|
|
138
148
|
this.mount();
|
|
139
149
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { UICorePlugin, Core } from '@clappr/core';
|
|
2
2
|
/**
|
|
3
3
|
* Events emitted by the VolumeFade plugin.
|
|
4
|
-
* @
|
|
4
|
+
* @public
|
|
5
5
|
*/
|
|
6
6
|
export declare enum VolumeFadeEvents {
|
|
7
7
|
FADE = "core:volume:fade"
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* @
|
|
10
|
+
* @public
|
|
11
11
|
*/
|
|
12
12
|
export type VolumeFadeSettings = {
|
|
13
13
|
/**
|
package/lib/types.d.ts
CHANGED