@gcorevideo/player 2.20.9 → 2.20.11
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/assets/dvr-controls/dvr_controls.scss +0 -2
- package/dist/core.js +5 -5
- package/dist/index.css +1212 -1215
- package/dist/index.js +74 -71
- package/dist/player.d.ts +103 -96
- package/dist/plugins/index.css +668 -671
- package/dist/plugins/index.js +69 -67
- package/docs/api/player.audioselector.md +1 -1
- package/docs/api/player.bigmutebutton.md +1 -1
- package/docs/api/player.bottomgear.md +1 -1
- package/docs/api/player.clapprnerdstats.md +1 -1
- package/docs/api/player.clapprstats.md +1 -1
- package/docs/api/player.clicktopause.md +1 -1
- package/docs/api/player.clipsplugin.md +1 -1
- package/docs/api/player.containerpluginconstructor.md +3 -5
- package/docs/api/player.containersize.md +0 -3
- package/docs/api/player.contextmenu.md +1 -1
- package/docs/api/player.corepluginconstructor.md +3 -5
- package/docs/api/player.dashsettings.md +0 -3
- package/docs/api/player.dvrcontrols.md +2 -35
- package/docs/api/player.errorlevel.md +0 -3
- package/docs/api/player.errorscreen.md +1 -1
- package/docs/api/player.favicon.md +1 -1
- package/docs/api/player.googleanalytics.md +1 -1
- package/docs/api/player.langtag.md +0 -3
- package/docs/api/player.levelselector.md +1 -1
- package/docs/api/player.logo.md +1 -1
- package/docs/api/player.md +69 -80
- package/docs/api/player.mediacontrol.md +2 -2
- package/docs/api/player.multicamera.md +1 -1
- package/docs/api/player.pictureinpicture.md +1 -1
- package/docs/api/player.playbackerror.code.md +0 -3
- package/docs/api/player.playbackerror.description.md +0 -3
- package/docs/api/player.playbackerror.level.md +0 -3
- package/docs/api/player.playbackerror.md +8 -11
- package/docs/api/player.playbackerror.message.md +0 -3
- package/docs/api/player.playbackerror.origin.md +0 -3
- package/docs/api/player.playbackerror.scope.md +0 -3
- package/docs/api/player.playbackerror.ui.md +1 -3
- package/docs/api/player.playbackerrorcode.md +3 -6
- package/docs/api/player.playbackmodule.md +0 -3
- package/docs/api/player.playbackrate.md +1 -1
- package/docs/api/player.playbacktype.md +1 -4
- package/docs/api/player.player._constructor_.md +0 -3
- package/docs/api/player.player.attachto.md +0 -3
- package/docs/api/player.player.configure.md +0 -3
- package/docs/api/player.player.destroy.md +0 -3
- package/docs/api/player.player.getcurrenttime.md +0 -3
- package/docs/api/player.player.getduration.md +0 -3
- package/docs/api/player.player.getvolume.md +0 -3
- package/docs/api/player.player.isdvrenabled.md +0 -3
- package/docs/api/player.player.isdvrinuse.md +0 -3
- package/docs/api/player.player.ismuted.md +0 -3
- package/docs/api/player.player.isplaying.md +0 -3
- package/docs/api/player.player.md +25 -28
- package/docs/api/player.player.mute.md +0 -3
- package/docs/api/player.player.off.md +0 -3
- package/docs/api/player.player.on.md +0 -3
- package/docs/api/player.player.pause.md +0 -3
- package/docs/api/player.player.play.md +0 -3
- package/docs/api/player.player.registerplugin.md +0 -3
- package/docs/api/player.player.resize.md +0 -3
- package/docs/api/player.player.seek.md +0 -3
- package/docs/api/player.player.setvolume.md +0 -3
- package/docs/api/player.player.stop.md +0 -3
- package/docs/api/player.player.unmute.md +0 -3
- package/docs/api/player.player.unregisterplugin.md +14 -7
- package/docs/api/player.playercomponenttype.md +0 -3
- package/docs/api/player.playerconfig.autoplay.md +0 -3
- package/docs/api/player.playerconfig.dash.md +0 -3
- package/docs/api/player.playerconfig.debug.md +0 -3
- package/docs/api/player.playerconfig.language.md +0 -3
- package/docs/api/player.playerconfig.loop.md +0 -3
- package/docs/api/player.playerconfig.md +10 -13
- package/docs/api/player.playerconfig.mute.md +0 -3
- package/docs/api/player.playerconfig.playbacktype.md +0 -3
- package/docs/api/player.playerconfig.prioritytransport.md +0 -3
- package/docs/api/player.playerconfig.sources.md +0 -3
- package/docs/api/player.playerconfig.strings.md +0 -3
- package/docs/api/player.playerdebugsettings.md +0 -3
- package/docs/api/player.playerdebugtag.md +0 -3
- package/docs/api/player.playerevent.md +11 -14
- package/docs/api/player.playereventhandler.md +0 -3
- package/docs/api/player.playereventparams.md +0 -3
- package/docs/api/player.playermediasource.md +0 -3
- package/docs/api/player.playermediasourcedesc.md +2 -5
- package/docs/api/player.playermediasourcedesc.mimetype.md +0 -3
- package/docs/api/player.playermediasourcedesc.source.md +0 -3
- package/docs/api/player.playerplugin.md +0 -4
- package/docs/api/player.playerpluginconstructor.md +0 -3
- package/docs/api/player.poster.md +1 -1
- package/docs/api/player.qualitylevel.bitrate.md +0 -3
- package/docs/api/player.qualitylevel.height.md +0 -3
- package/docs/api/player.qualitylevel.level.md +0 -3
- package/docs/api/player.qualitylevel.md +4 -7
- package/docs/api/player.qualitylevel.width.md +0 -3
- package/docs/api/player.seektime.md +1 -1
- package/docs/api/player.share.md +1 -1
- package/docs/api/player.skiptime.md +1 -1
- package/docs/api/player.sourcecontroller.md +1 -1
- package/docs/api/player.spinnerthreebounce.md +1 -1
- package/docs/api/player.subtitles.md +1 -1
- package/docs/api/player.telemetry.md +1 -1
- package/docs/api/player.thumbnails.md +1 -1
- package/docs/api/player.timeposition.current.md +0 -3
- package/docs/api/player.timeposition.md +2 -5
- package/docs/api/player.timeposition.total.md +0 -3
- package/docs/api/player.timevalue.md +0 -3
- package/docs/api/player.translationkey.md +0 -3
- package/docs/api/player.translationsettings.md +0 -3
- package/docs/api/player.transportpreference.md +2 -7
- package/docs/api/player.volumefade.md +1 -1
- package/lib/Player.d.ts +5 -5
- package/lib/Player.js +2 -2
- package/lib/index.d.ts +18 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -1
- package/lib/playback.types.d.ts +8 -7
- package/lib/playback.types.d.ts.map +1 -1
- package/lib/playback.types.js +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +1 -1
- 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 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.d.ts +1 -1
- package/lib/plugins/clips/Clips.js +1 -1
- package/lib/plugins/context-menu/ContextMenu.d.ts +1 -1
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +6 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +28 -36
- package/lib/plugins/error-screen/ErrorScreen.d.ts +1 -18
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +1 -1
- package/lib/plugins/favicon/Favicon.d.ts +1 -1
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +1 -1
- package/lib/plugins/level-selector/LevelSelector.d.ts +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +1 -1
- package/lib/plugins/logo/Logo.d.ts +1 -1
- package/lib/plugins/logo/Logo.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +8 -2
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +15 -3
- package/lib/plugins/multi-camera/MultiCamera.d.ts +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +1 -1
- package/lib/plugins/poster/Poster.d.ts +1 -1
- package/lib/plugins/poster/Poster.js +1 -1
- package/lib/plugins/seek-time/SeekTime.d.ts +1 -1
- package/lib/plugins/seek-time/SeekTime.js +1 -1
- package/lib/plugins/share/Share.d.ts +1 -1
- package/lib/plugins/share/Share.js +1 -1
- package/lib/plugins/skip-time/SkipTime.d.ts +1 -1
- package/lib/plugins/skip-time/SkipTime.js +1 -1
- package/lib/plugins/source-controller/SourceController.d.ts +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
- package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
- package/lib/plugins/subtitles/Subtitles.js +1 -1
- package/lib/plugins/telemetry/Telemetry.d.ts +1 -1
- package/lib/plugins/telemetry/Telemetry.js +1 -1
- package/lib/plugins/thumbnails/Thumbnails.d.ts +1 -1
- package/lib/plugins/thumbnails/Thumbnails.js +1 -1
- package/lib/plugins/volume-fade/VolumeFade.d.ts +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +1 -1
- package/lib/testUtils.d.ts +11 -2
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +22 -3
- package/lib/types.d.ts +20 -25
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -1
- package/package.json +1 -1
- package/src/Player.ts +5 -5
- package/src/index.ts +18 -1
- package/src/playback.types.ts +8 -7
- package/src/plugins/audio-selector/AudioSelector.ts +1 -1
- package/src/plugins/big-mute-button/BigMuteButton.ts +1 -2
- package/src/plugins/bottom-gear/BottomGear.ts +1 -1
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +1 -1
- 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 +1 -1
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +33 -45
- package/src/plugins/dvr-controls/__tests__/DvrControls.test.ts +91 -0
- package/src/plugins/dvr-controls/__tests__/__snapshots__/DvrControls.test.ts.snap +43 -0
- package/src/plugins/error-screen/ErrorScreen.ts +3 -21
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/level-selector/LevelSelector.ts +1 -1
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +17 -3
- package/src/plugins/multi-camera/MultiCamera.ts +1 -1
- package/src/plugins/picture-in-picture/PictureInPicture.ts +1 -1
- package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
- package/src/plugins/poster/Poster.ts +1 -1
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/share/Share.ts +1 -1
- package/src/plugins/skip-time/SkipTime.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +1 -1
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +1 -1
- package/src/plugins/telemetry/Telemetry.ts +1 -1
- package/src/plugins/thumbnails/Thumbnails.ts +1 -1
- package/src/plugins/volume-fade/VolumeFade.ts +1 -1
- package/src/testUtils.ts +28 -4
- package/src/types.ts +20 -26
- package/temp/player.api.json +181 -251
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.dvrcontrols._constructor_.md +0 -50
- package/docs/api/player.errordesc.md +0 -28
- package/docs/api/player.mediatransport.md +0 -16
package/dist/player.d.ts
CHANGED
|
@@ -6,6 +6,23 @@
|
|
|
6
6
|
* It is built on top of the Clappr library and provides a framework for building custom integrations.
|
|
7
7
|
* Start with {@link Player} for more information.
|
|
8
8
|
*
|
|
9
|
+
* Various plugins (marked with `PLUGIN` keyword) are available to extend the player with additional features.
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { Player, MediaControl, ErrorScreen } from '@gcorevideo/player'
|
|
13
|
+
*
|
|
14
|
+
* Player.registerPlugin(MediaControl)
|
|
15
|
+
* Player.registerPlugin(ErrorScreen)
|
|
16
|
+
*
|
|
17
|
+
* const player = new Player({
|
|
18
|
+
* autoPlay: true,
|
|
19
|
+
* mute: true,
|
|
20
|
+
* sources: [{ source: 'https://example.com/a.mpd', mimeType: 'application/dash+xml' }],
|
|
21
|
+
* })
|
|
22
|
+
*
|
|
23
|
+
* player.attachTo(document.getElementById('container'))
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
9
26
|
* @packageDocumentation
|
|
10
27
|
*/
|
|
11
28
|
|
|
@@ -28,7 +45,7 @@ import { UICorePlugin } from '@clappr/core';
|
|
|
28
45
|
import { UIObject } from '@clappr/core';
|
|
29
46
|
|
|
30
47
|
/**
|
|
31
|
-
*
|
|
48
|
+
* `PLUGIN` that adds an audio track selector to the media control UI.
|
|
32
49
|
* @beta
|
|
33
50
|
*/
|
|
34
51
|
export declare class AudioSelector extends UICorePlugin {
|
|
@@ -98,7 +115,7 @@ export declare class AudioSelector extends UICorePlugin {
|
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
/**
|
|
101
|
-
*
|
|
118
|
+
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
102
119
|
* Once pressed, it unmutes the video.
|
|
103
120
|
* @beta
|
|
104
121
|
*/
|
|
@@ -158,7 +175,7 @@ declare type BitrateTrackRecord = {
|
|
|
158
175
|
};
|
|
159
176
|
|
|
160
177
|
/**
|
|
161
|
-
*
|
|
178
|
+
* `PLUGIN` that adds the gear button with an extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
162
179
|
* @beta
|
|
163
180
|
* @remarks
|
|
164
181
|
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
@@ -229,7 +246,7 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
229
246
|
}
|
|
230
247
|
|
|
231
248
|
/**
|
|
232
|
-
* PLUGIN that displays useful network-related statistics.
|
|
249
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
233
250
|
* @beta
|
|
234
251
|
*
|
|
235
252
|
* @remarks
|
|
@@ -307,7 +324,7 @@ export declare class ClapprNerdStats extends UICorePlugin {
|
|
|
307
324
|
}
|
|
308
325
|
|
|
309
326
|
/**
|
|
310
|
-
*
|
|
327
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
311
328
|
* @beta
|
|
312
329
|
* @remarks
|
|
313
330
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -386,7 +403,7 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
386
403
|
}
|
|
387
404
|
|
|
388
405
|
/**
|
|
389
|
-
*
|
|
406
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
390
407
|
* @beta
|
|
391
408
|
*/
|
|
392
409
|
export declare class ClickToPause extends ContainerPlugin {
|
|
@@ -413,7 +430,7 @@ export declare class ClickToPause extends ContainerPlugin {
|
|
|
413
430
|
}
|
|
414
431
|
|
|
415
432
|
/**
|
|
416
|
-
* PLUGIN that shows text over the seekbar to indicate the current clip.
|
|
433
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
417
434
|
* @beta
|
|
418
435
|
* @remarks
|
|
419
436
|
* Depends on:
|
|
@@ -471,15 +488,16 @@ export declare interface ClipsPluginSettings {
|
|
|
471
488
|
}
|
|
472
489
|
|
|
473
490
|
/**
|
|
474
|
-
* @
|
|
491
|
+
* @public
|
|
475
492
|
*/
|
|
476
|
-
export declare type ContainerPluginConstructor =
|
|
477
|
-
|
|
493
|
+
export declare type ContainerPluginConstructor = {
|
|
494
|
+
new (container: Container): PlayerPlugin;
|
|
495
|
+
type: string;
|
|
478
496
|
};
|
|
479
497
|
|
|
480
498
|
/**
|
|
481
499
|
* Dimensions of the player container DOM element.
|
|
482
|
-
* @
|
|
500
|
+
* @public
|
|
483
501
|
*/
|
|
484
502
|
export declare type ContainerSize = {
|
|
485
503
|
width: number;
|
|
@@ -487,7 +505,7 @@ export declare type ContainerSize = {
|
|
|
487
505
|
};
|
|
488
506
|
|
|
489
507
|
/**
|
|
490
|
-
*
|
|
508
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
491
509
|
* @beta
|
|
492
510
|
* @remarks
|
|
493
511
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -553,21 +571,23 @@ export declare interface ContextMenuPluginSettings {
|
|
|
553
571
|
}
|
|
554
572
|
|
|
555
573
|
/**
|
|
556
|
-
* @
|
|
574
|
+
* @public
|
|
557
575
|
*/
|
|
558
|
-
export declare type CorePluginConstructor =
|
|
559
|
-
|
|
576
|
+
export declare type CorePluginConstructor = {
|
|
577
|
+
new (core: Core): PlayerPlugin;
|
|
578
|
+
type: string;
|
|
560
579
|
};
|
|
561
580
|
|
|
562
581
|
/**
|
|
563
582
|
* A plain JS object that must conform to the DASH.js settings schema.
|
|
564
|
-
* @
|
|
583
|
+
* @public
|
|
565
584
|
* {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html | DASH.js settings}
|
|
566
585
|
*/
|
|
567
586
|
export declare type DashSettings = Record<string, unknown>;
|
|
568
587
|
|
|
569
588
|
/**
|
|
570
|
-
*
|
|
589
|
+
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
590
|
+
*
|
|
571
591
|
* @beta
|
|
572
592
|
*
|
|
573
593
|
* @remarks
|
|
@@ -575,7 +595,9 @@ export declare type DashSettings = Record<string, unknown>;
|
|
|
575
595
|
*
|
|
576
596
|
* - {@link MediaControl}
|
|
577
597
|
*
|
|
578
|
-
* The plugin renders
|
|
598
|
+
* The plugin renders live stream indicator.
|
|
599
|
+
* If DVR is enabled, the indicator shows whether the current position is at the live edge of the stream or not.
|
|
600
|
+
* In the latter case, the indicator can be clicked to seek to the live edge.
|
|
579
601
|
*/
|
|
580
602
|
export declare class DvrControls extends UICorePlugin {
|
|
581
603
|
private static readonly template;
|
|
@@ -602,11 +624,11 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
602
624
|
class: string;
|
|
603
625
|
'data-dvr-controls': string;
|
|
604
626
|
};
|
|
605
|
-
constructor(core: Core);
|
|
606
627
|
/**
|
|
607
628
|
* @internal
|
|
608
629
|
*/
|
|
609
630
|
bindEvents(): void;
|
|
631
|
+
private onCoreReady;
|
|
610
632
|
private bindContainerEvents;
|
|
611
633
|
private onDvrChanged;
|
|
612
634
|
private click;
|
|
@@ -618,32 +640,14 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
618
640
|
render(): this;
|
|
619
641
|
}
|
|
620
642
|
|
|
621
|
-
/**
|
|
622
|
-
* An error fired in the player and plugins code to be handled in the UI
|
|
623
|
-
* @beta
|
|
624
|
-
*/
|
|
625
|
-
export declare type ErrorDesc = {
|
|
626
|
-
description: string;
|
|
627
|
-
level: string;
|
|
628
|
-
code: string;
|
|
629
|
-
origin: string;
|
|
630
|
-
scope: string;
|
|
631
|
-
raw?: string;
|
|
632
|
-
UI?: {
|
|
633
|
-
icon?: string;
|
|
634
|
-
title: string;
|
|
635
|
-
message: string;
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
|
|
639
643
|
/**
|
|
640
644
|
* Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
641
|
-
* @
|
|
645
|
+
* @public
|
|
642
646
|
*/
|
|
643
647
|
export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
|
|
644
648
|
|
|
645
649
|
/**
|
|
646
|
-
* PLUGIN that displays errors nicely in the overlay on top of the player.
|
|
650
|
+
* `PLUGIN` that displays errors nicely in the overlay on top of the player.
|
|
647
651
|
* @beta
|
|
648
652
|
*/
|
|
649
653
|
export declare class ErrorScreen extends UICorePlugin {
|
|
@@ -699,7 +703,7 @@ export declare type ErrorScreenPluginSettings = {
|
|
|
699
703
|
};
|
|
700
704
|
|
|
701
705
|
/**
|
|
702
|
-
*
|
|
706
|
+
* `PLUGIN` that adds custom favicon to the player's tab.
|
|
703
707
|
* @beta
|
|
704
708
|
*/
|
|
705
709
|
export declare class Favicon extends CorePlugin {
|
|
@@ -732,7 +736,7 @@ export declare class Favicon extends CorePlugin {
|
|
|
732
736
|
export declare type GearItemElement = 'quality' | 'rate' | 'nerd';
|
|
733
737
|
|
|
734
738
|
/**
|
|
735
|
-
*
|
|
739
|
+
* `PLUGIN` that integrates with Google Analytics
|
|
736
740
|
* @beta
|
|
737
741
|
*/
|
|
738
742
|
export declare class GoogleAnalytics extends ContainerPlugin {
|
|
@@ -775,12 +779,12 @@ export declare interface InitEventData {
|
|
|
775
779
|
/**
|
|
776
780
|
* An ISO 639-1 language code.
|
|
777
781
|
* @example `pt`
|
|
778
|
-
* @
|
|
782
|
+
* @public
|
|
779
783
|
*/
|
|
780
784
|
export declare type LangTag = string;
|
|
781
785
|
|
|
782
786
|
/**
|
|
783
|
-
* PLUGIN that provides a UI to select the desired quality level of the playback.
|
|
787
|
+
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
784
788
|
* @beta
|
|
785
789
|
*
|
|
786
790
|
* @remarks
|
|
@@ -895,7 +899,7 @@ export declare interface LevelSelectorPluginSettings {
|
|
|
895
899
|
export { Logger }
|
|
896
900
|
|
|
897
901
|
/**
|
|
898
|
-
*
|
|
902
|
+
* `PLUGIN` that adds custom logo to the player.
|
|
899
903
|
* @beta
|
|
900
904
|
*/
|
|
901
905
|
export declare class Logo extends UIContainerPlugin {
|
|
@@ -928,11 +932,11 @@ export declare class Logo extends UIContainerPlugin {
|
|
|
928
932
|
export { LogTracer }
|
|
929
933
|
|
|
930
934
|
/**
|
|
931
|
-
* PLUGIN that provides a foundation for developing custom media controls UI.
|
|
935
|
+
* `PLUGIN` that provides a foundation for developing custom media controls UI.
|
|
932
936
|
* @beta
|
|
933
937
|
* @remarks
|
|
934
938
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
935
|
-
* The plugin registration should be arranged so that MediaControl is initialized before every other
|
|
939
|
+
* The plugin registration should be arranged so that MediaControl is initialized before every other `PLUGIN` that depends on it.
|
|
936
940
|
* @example
|
|
937
941
|
* ```ts
|
|
938
942
|
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
@@ -1206,12 +1210,6 @@ export declare enum MediaControlEvents {
|
|
|
1206
1210
|
MEDIACONTROL_GEAR_RENDERED = "mediacontrol:gear:rendered"
|
|
1207
1211
|
}
|
|
1208
1212
|
|
|
1209
|
-
/**
|
|
1210
|
-
* Media delivery protocol
|
|
1211
|
-
* @beta
|
|
1212
|
-
*/
|
|
1213
|
-
export declare type MediaTransport = 'dash' | 'hls';
|
|
1214
|
-
|
|
1215
1213
|
/**
|
|
1216
1214
|
* @beta
|
|
1217
1215
|
*/
|
|
@@ -1260,7 +1258,7 @@ declare type Metrics = {
|
|
|
1260
1258
|
declare type MetricsUpdateFn = (metrics: Metrics) => void;
|
|
1261
1259
|
|
|
1262
1260
|
/**
|
|
1263
|
-
* PLUGIN that adds support for loading multiple streams and switching between them using the media control UI.
|
|
1261
|
+
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
1264
1262
|
* @beta
|
|
1265
1263
|
*/
|
|
1266
1264
|
export declare class MultiCamera extends UICorePlugin {
|
|
@@ -1313,7 +1311,7 @@ export declare class MultiCamera extends UICorePlugin {
|
|
|
1313
1311
|
}
|
|
1314
1312
|
|
|
1315
1313
|
/**
|
|
1316
|
-
*
|
|
1314
|
+
* `PLUGIN` that enables picture in picture mode.
|
|
1317
1315
|
* @beta
|
|
1318
1316
|
* @remarks
|
|
1319
1317
|
* Depends on:
|
|
@@ -1360,7 +1358,7 @@ export declare class PictureInPicture extends UICorePlugin {
|
|
|
1360
1358
|
|
|
1361
1359
|
/**
|
|
1362
1360
|
* An error occurred during the playback.
|
|
1363
|
-
* @
|
|
1361
|
+
* @public
|
|
1364
1362
|
*/
|
|
1365
1363
|
export declare interface PlaybackError {
|
|
1366
1364
|
/**
|
|
@@ -1397,12 +1395,13 @@ export declare interface PlaybackError {
|
|
|
1397
1395
|
UI?: {
|
|
1398
1396
|
title: string;
|
|
1399
1397
|
message: string;
|
|
1398
|
+
icon?: string;
|
|
1400
1399
|
};
|
|
1401
1400
|
}
|
|
1402
1401
|
|
|
1403
1402
|
/**
|
|
1404
1403
|
* Codes of errors occurring within the playback component.
|
|
1405
|
-
* @
|
|
1404
|
+
* @public
|
|
1406
1405
|
*/
|
|
1407
1406
|
export declare enum PlaybackErrorCode {
|
|
1408
1407
|
/**
|
|
@@ -1421,12 +1420,12 @@ export declare enum PlaybackErrorCode {
|
|
|
1421
1420
|
|
|
1422
1421
|
/**
|
|
1423
1422
|
* Module to perform the playback.
|
|
1424
|
-
* @
|
|
1423
|
+
* @public
|
|
1425
1424
|
*/
|
|
1426
1425
|
export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
1427
1426
|
|
|
1428
1427
|
/**
|
|
1429
|
-
* PLUGIN that allows changing the playback speed of the video.
|
|
1428
|
+
* `PLUGIN` that allows changing the playback speed of the video.
|
|
1430
1429
|
* @beta
|
|
1431
1430
|
*
|
|
1432
1431
|
* @remarks
|
|
@@ -1501,14 +1500,14 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1501
1500
|
}
|
|
1502
1501
|
|
|
1503
1502
|
/**
|
|
1504
|
-
* Type of a stream
|
|
1505
|
-
* @
|
|
1503
|
+
* Type of a stream
|
|
1504
|
+
* @public
|
|
1506
1505
|
*/
|
|
1507
1506
|
export declare type PlaybackType = 'live' | 'vod';
|
|
1508
1507
|
|
|
1509
1508
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
* @
|
|
1509
|
+
* `MAIN` component to use in the application code.
|
|
1510
|
+
* @public
|
|
1512
1511
|
* @remarks
|
|
1513
1512
|
* The Player object provides very basic API to control playback.
|
|
1514
1513
|
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
|
@@ -1674,13 +1673,22 @@ export declare class Player {
|
|
|
1674
1673
|
* ```
|
|
1675
1674
|
*/
|
|
1676
1675
|
static registerPlugin(plugin: PlayerPluginConstructor): void;
|
|
1677
|
-
private static getRegisteredPlugins;
|
|
1678
|
-
private static corePlugins;
|
|
1679
1676
|
/**
|
|
1680
1677
|
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
1681
|
-
* @
|
|
1678
|
+
* @remarks
|
|
1679
|
+
* It can be also used to unregister a built-in default plugin.
|
|
1680
|
+
*
|
|
1681
|
+
* Currently, the plugins that are always registered are:
|
|
1682
|
+
*
|
|
1683
|
+
* - {@link https://github.com/clappr/clappr-core/blob/3126c3a38a6eee9d5aba3918b194e6380fa1178c/src/plugins/strings/strings.js | 'strings'}, which supports internationalization of the player UI
|
|
1684
|
+
*
|
|
1685
|
+
* - {@link https://github.com/clappr/clappr-core/blob/3126c3a38a6eee9d5aba3918b194e6380fa1178c/src/plugins/sources/sources.js | 'sources'}, which lets to specify multiple media sources and selects the first suitable playback module
|
|
1686
|
+
*
|
|
1687
|
+
* @param name - name of the plugin
|
|
1682
1688
|
*/
|
|
1683
|
-
static unregisterPlugin(
|
|
1689
|
+
static unregisterPlugin(name: string): void;
|
|
1690
|
+
private static getRegisteredPlugins;
|
|
1691
|
+
private static corePlugins;
|
|
1684
1692
|
private setConfig;
|
|
1685
1693
|
private initPlayer;
|
|
1686
1694
|
private tuneIn;
|
|
@@ -1696,7 +1704,7 @@ export declare class Player {
|
|
|
1696
1704
|
|
|
1697
1705
|
/**
|
|
1698
1706
|
* Subsystems of a player component.
|
|
1699
|
-
* @
|
|
1707
|
+
* @public
|
|
1700
1708
|
*/
|
|
1701
1709
|
export declare type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
1702
1710
|
|
|
@@ -1739,7 +1747,7 @@ export declare type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
|
1739
1747
|
* },
|
|
1740
1748
|
* }
|
|
1741
1749
|
* ```
|
|
1742
|
-
* @
|
|
1750
|
+
* @public
|
|
1743
1751
|
*/
|
|
1744
1752
|
export declare interface PlayerConfig extends Record<string, unknown> {
|
|
1745
1753
|
/**
|
|
@@ -1797,19 +1805,19 @@ export declare interface PlayerConfig extends Record<string, unknown> {
|
|
|
1797
1805
|
|
|
1798
1806
|
/**
|
|
1799
1807
|
* @remarks `true` is equivalent to `'all'`, `false` is equivalent to `'none'`
|
|
1800
|
-
* @
|
|
1808
|
+
* @public
|
|
1801
1809
|
*/
|
|
1802
1810
|
export declare type PlayerDebugSettings = PlayerDebugTag | boolean;
|
|
1803
1811
|
|
|
1804
1812
|
/**
|
|
1805
1813
|
* Debug output category selector
|
|
1806
|
-
* @
|
|
1814
|
+
* @public
|
|
1807
1815
|
*/
|
|
1808
1816
|
export declare type PlayerDebugTag = 'all' | 'clappr' | 'dash' | 'hls' | 'none';
|
|
1809
1817
|
|
|
1810
1818
|
/**
|
|
1811
1819
|
* A top-level event on the player object
|
|
1812
|
-
* @
|
|
1820
|
+
* @public
|
|
1813
1821
|
*/
|
|
1814
1822
|
export declare enum PlayerEvent {
|
|
1815
1823
|
/**
|
|
@@ -1866,12 +1874,12 @@ export declare enum PlayerEvent {
|
|
|
1866
1874
|
/**
|
|
1867
1875
|
* Type of a listener callback function for a player event.
|
|
1868
1876
|
* See the description of the event parameters in {@link PlayerEvent}.
|
|
1869
|
-
* @
|
|
1877
|
+
* @public
|
|
1870
1878
|
*/
|
|
1871
1879
|
export declare type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
|
|
1872
1880
|
|
|
1873
1881
|
/**
|
|
1874
|
-
* @
|
|
1882
|
+
* @public
|
|
1875
1883
|
*/
|
|
1876
1884
|
export declare type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.Seek ? [number] : E extends PlayerEvent.VolumeUpdate ? [number] : E extends PlayerEvent.TimeUpdate ? [TimePosition] : E extends PlayerEvent.Resize ? [{
|
|
1877
1885
|
width: number;
|
|
@@ -1880,7 +1888,7 @@ export declare type PlayerEventParams<E extends PlayerEvent> = E extends PlayerE
|
|
|
1880
1888
|
|
|
1881
1889
|
/**
|
|
1882
1890
|
* A media source to fetch the media data from
|
|
1883
|
-
* @
|
|
1891
|
+
* @public
|
|
1884
1892
|
*/
|
|
1885
1893
|
export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
|
|
1886
1894
|
|
|
@@ -1890,7 +1898,7 @@ export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
|
|
|
1890
1898
|
* @remarks
|
|
1891
1899
|
* When the MIME type is provided, it helps the player determine the appropriate playback engine.
|
|
1892
1900
|
* If omitted, the player will attempt to detect the type from the source URL extension.
|
|
1893
|
-
* @
|
|
1901
|
+
* @public
|
|
1894
1902
|
*/
|
|
1895
1903
|
export declare interface PlayerMediaSourceDesc {
|
|
1896
1904
|
/**
|
|
@@ -1905,22 +1913,21 @@ export declare interface PlayerMediaSourceDesc {
|
|
|
1905
1913
|
}
|
|
1906
1914
|
|
|
1907
1915
|
/**
|
|
1908
|
-
* @
|
|
1916
|
+
* @public
|
|
1909
1917
|
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
1910
1918
|
* {@link https://clappr.github.io/classes/ContainerPlugin.html}
|
|
1911
1919
|
*/
|
|
1912
1920
|
export declare type PlayerPlugin = {
|
|
1913
|
-
new (...args: any[]): unknown;
|
|
1914
1921
|
name: string;
|
|
1915
1922
|
};
|
|
1916
1923
|
|
|
1917
1924
|
/**
|
|
1918
|
-
* @
|
|
1925
|
+
* @public
|
|
1919
1926
|
*/
|
|
1920
1927
|
export declare type PlayerPluginConstructor = CorePluginConstructor | ContainerPluginConstructor;
|
|
1921
1928
|
|
|
1922
1929
|
/**
|
|
1923
|
-
*
|
|
1930
|
+
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
1924
1931
|
* @beta
|
|
1925
1932
|
* @remarks
|
|
1926
1933
|
* When the playback is stopped, media control UI is disabled.
|
|
@@ -2015,7 +2022,7 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
2015
2022
|
|
|
2016
2023
|
/**
|
|
2017
2024
|
* A level of quality within a media source.
|
|
2018
|
-
* @
|
|
2025
|
+
* @public
|
|
2019
2026
|
*/
|
|
2020
2027
|
export declare interface QualityLevel {
|
|
2021
2028
|
/**
|
|
@@ -2039,7 +2046,7 @@ export declare interface QualityLevel {
|
|
|
2039
2046
|
export { reportError_2 as reportError }
|
|
2040
2047
|
|
|
2041
2048
|
/**
|
|
2042
|
-
*
|
|
2049
|
+
* `PLUGIN` that adds a seek time indicator to the media control UI.
|
|
2043
2050
|
* @beta
|
|
2044
2051
|
*/
|
|
2045
2052
|
export declare class SeekTime extends UICorePlugin {
|
|
@@ -2083,7 +2090,7 @@ export { SentryTracer }
|
|
|
2083
2090
|
export { setTracer }
|
|
2084
2091
|
|
|
2085
2092
|
/**
|
|
2086
|
-
* PLUGIN that adds a share button to the media control UI.
|
|
2093
|
+
* `PLUGIN` that adds a share button to the media control UI.
|
|
2087
2094
|
* @beta
|
|
2088
2095
|
*/
|
|
2089
2096
|
export declare class Share extends UICorePlugin {
|
|
@@ -2123,7 +2130,7 @@ export declare class Share extends UICorePlugin {
|
|
|
2123
2130
|
}
|
|
2124
2131
|
|
|
2125
2132
|
/**
|
|
2126
|
-
* PLUGIN that adds skip controls to the media control UI.
|
|
2133
|
+
* `PLUGIN` that adds skip controls to the media control UI.
|
|
2127
2134
|
* @beta
|
|
2128
2135
|
*/
|
|
2129
2136
|
export declare class SkipTime extends UICorePlugin {
|
|
@@ -2153,7 +2160,7 @@ export declare class SkipTime extends UICorePlugin {
|
|
|
2153
2160
|
}
|
|
2154
2161
|
|
|
2155
2162
|
/**
|
|
2156
|
-
*
|
|
2163
|
+
* `PLUGIN` that is responsible for managing the automatic failover between sources.
|
|
2157
2164
|
* @beta
|
|
2158
2165
|
* @remarks
|
|
2159
2166
|
* Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details
|
|
@@ -2216,7 +2223,7 @@ export declare enum SpinnerEvents {
|
|
|
2216
2223
|
}
|
|
2217
2224
|
|
|
2218
2225
|
/**
|
|
2219
|
-
* PLUGIN that shows a pending operation indicator when playback is buffering or in a similar state
|
|
2226
|
+
* `PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state
|
|
2220
2227
|
* @beta
|
|
2221
2228
|
* @remarks
|
|
2222
2229
|
* Events emitted- {@link SpinnerEvents}
|
|
@@ -2299,7 +2306,7 @@ export declare interface StartEventData {
|
|
|
2299
2306
|
}
|
|
2300
2307
|
|
|
2301
2308
|
/**
|
|
2302
|
-
*
|
|
2309
|
+
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
2303
2310
|
* @beta
|
|
2304
2311
|
*
|
|
2305
2312
|
* @remarks
|
|
@@ -2407,7 +2414,7 @@ export declare class Subtitles extends UICorePlugin {
|
|
|
2407
2414
|
}
|
|
2408
2415
|
|
|
2409
2416
|
/**
|
|
2410
|
-
* PLUGIN that collects and reports the performance statistics.
|
|
2417
|
+
* `PLUGIN` that collects and reports the performance statistics.
|
|
2411
2418
|
* @beta
|
|
2412
2419
|
* @remarks
|
|
2413
2420
|
* This plugin is experimental and its API is likely to change.
|
|
@@ -2522,7 +2529,7 @@ export declare type TelemetryRecord = {
|
|
|
2522
2529
|
export declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
2523
2530
|
|
|
2524
2531
|
/**
|
|
2525
|
-
*
|
|
2532
|
+
* `PLUGIN` that displays the thumbnails of the video when available.
|
|
2526
2533
|
* @beta
|
|
2527
2534
|
* @example
|
|
2528
2535
|
* ```ts
|
|
@@ -2614,7 +2621,7 @@ export declare type ThumbnailsPluginSettings = {
|
|
|
2614
2621
|
|
|
2615
2622
|
/**
|
|
2616
2623
|
* Current playback time and total duration of the media.
|
|
2617
|
-
* @
|
|
2624
|
+
* @public
|
|
2618
2625
|
*/
|
|
2619
2626
|
export declare interface TimePosition {
|
|
2620
2627
|
/**
|
|
@@ -2645,14 +2652,14 @@ export declare type TimeUpdate = TimePosition & {
|
|
|
2645
2652
|
|
|
2646
2653
|
/**
|
|
2647
2654
|
* Playback time in seconds since the beginning of the stream (or a segment for the live streams)
|
|
2648
|
-
* @
|
|
2655
|
+
* @public
|
|
2649
2656
|
*/
|
|
2650
2657
|
export declare type TimeValue = number;
|
|
2651
2658
|
|
|
2652
2659
|
export { trace }
|
|
2653
2660
|
|
|
2654
2661
|
/**
|
|
2655
|
-
* @
|
|
2662
|
+
* @public
|
|
2656
2663
|
*/
|
|
2657
2664
|
export declare type TranslationKey = string;
|
|
2658
2665
|
|
|
@@ -2678,15 +2685,15 @@ export declare type TranslationKey = string;
|
|
|
2678
2685
|
* }
|
|
2679
2686
|
* ```
|
|
2680
2687
|
*
|
|
2681
|
-
* @
|
|
2688
|
+
* @public
|
|
2682
2689
|
*/
|
|
2683
2690
|
export declare type TranslationSettings = Partial<Record<LangTag, Record<TranslationKey, string>>>;
|
|
2684
2691
|
|
|
2685
2692
|
/**
|
|
2686
|
-
* Preferred media delivery protocol
|
|
2687
|
-
* @
|
|
2693
|
+
* Preferred streaming media delivery protocol
|
|
2694
|
+
* @public
|
|
2688
2695
|
*/
|
|
2689
|
-
export declare type TransportPreference =
|
|
2696
|
+
export declare type TransportPreference = 'dash' | 'hls';
|
|
2690
2697
|
|
|
2691
2698
|
/**
|
|
2692
2699
|
* Version information about the gplayer and its main dependencies
|
|
@@ -2701,7 +2708,7 @@ export declare function version(): {
|
|
|
2701
2708
|
};
|
|
2702
2709
|
|
|
2703
2710
|
/**
|
|
2704
|
-
*
|
|
2711
|
+
* `PLUGIN` that applies fade effect to the player's volume change.
|
|
2705
2712
|
* @beta
|
|
2706
2713
|
*/
|
|
2707
2714
|
export declare class VolumeFade extends UICorePlugin {
|