@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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
9
9
|
|
|
10
|
-
PLUGIN that collects and reports the performance statistics.
|
|
10
|
+
`PLUGIN` that collects and reports the performance statistics.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
`PLUGIN` that displays the thumbnails of the video when available.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
## TimePosition.current property
|
|
6
6
|
|
|
7
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
7
|
Current playback time, 0..duration, seconds.
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
## TimePosition interface
|
|
6
6
|
|
|
7
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
7
|
Current playback time and total duration of the media.
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
@@ -53,7 +50,7 @@ Description
|
|
|
53
50
|
|
|
54
51
|
</td><td>
|
|
55
52
|
|
|
56
|
-
|
|
53
|
+
Current playback time, 0..duration, seconds.
|
|
57
54
|
|
|
58
55
|
|
|
59
56
|
</td></tr>
|
|
@@ -72,7 +69,7 @@ Description
|
|
|
72
69
|
|
|
73
70
|
</td><td>
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
Total duration of the media, seconds.
|
|
76
73
|
|
|
77
74
|
|
|
78
75
|
</td></tr>
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
## TimeValue type
|
|
6
6
|
|
|
7
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
7
|
Playback time in seconds since the beginning of the stream (or a segment for the live streams)
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
@@ -4,15 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## TransportPreference type
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
Preferred media delivery protocol
|
|
7
|
+
Preferred streaming media delivery protocol
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
13
10
|
|
|
14
11
|
```typescript
|
|
15
|
-
export type TransportPreference =
|
|
12
|
+
export type TransportPreference = 'dash' | 'hls';
|
|
16
13
|
```
|
|
17
|
-
**References:** [MediaTransport](./player.mediatransport.md)
|
|
18
|
-
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
`PLUGIN` that applies fade effect to the player's volume change.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
package/lib/Player.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ContainerSize, PlayerPluginConstructor } from './types.js';
|
|
|
2
2
|
import { PlayerConfig, PlayerEvent } from './types.js';
|
|
3
3
|
import { PlaybackError, TimePosition } from './playback.types.js';
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.Seek ? [number] : E extends PlayerEvent.VolumeUpdate ? [number] : E extends PlayerEvent.TimeUpdate ? [TimePosition] : E extends PlayerEvent.Resize ? [{
|
|
8
8
|
width: number;
|
|
@@ -11,17 +11,17 @@ export type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.See
|
|
|
11
11
|
/**
|
|
12
12
|
* Type of a listener callback function for a player event.
|
|
13
13
|
* See the description of the event parameters in {@link PlayerEvent}.
|
|
14
|
-
* @
|
|
14
|
+
* @public
|
|
15
15
|
*/
|
|
16
16
|
export type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
|
|
17
17
|
/**
|
|
18
18
|
* Module to perform the playback.
|
|
19
|
-
* @
|
|
19
|
+
* @public
|
|
20
20
|
*/
|
|
21
21
|
export type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @
|
|
23
|
+
* `MAIN` component to use in the application code.
|
|
24
|
+
* @public
|
|
25
25
|
* @remarks
|
|
26
26
|
* The Player object provides very basic API to control playback.
|
|
27
27
|
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
package/lib/Player.js
CHANGED
|
@@ -17,8 +17,8 @@ const DEFAULT_OPTIONS = {
|
|
|
17
17
|
strings: {},
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @
|
|
20
|
+
* `MAIN` component to use in the application code.
|
|
21
|
+
* @public
|
|
22
22
|
* @remarks
|
|
23
23
|
* The Player object provides very basic API to control playback.
|
|
24
24
|
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
package/lib/index.d.ts
CHANGED
|
@@ -3,9 +3,26 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @remarks
|
|
5
5
|
* This package provides a video player for the Gcore streaming platform.
|
|
6
|
-
* It is built on top of the Clappr library and provides a framework for building custom integrations.
|
|
6
|
+
* It is built on top of the {@link https://github.com/clappr/clappr | 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
|
export * from './index.core.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -3,9 +3,26 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @remarks
|
|
5
5
|
* This package provides a video player for the Gcore streaming platform.
|
|
6
|
-
* It is built on top of the Clappr library and provides a framework for building custom integrations.
|
|
6
|
+
* It is built on top of the {@link https://github.com/clappr/clappr | 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
|
export * from './index.core.js';
|
package/lib/playback.types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Playback time in seconds since the beginning of the stream (or a segment for the live streams)
|
|
3
|
-
* @
|
|
3
|
+
* @public
|
|
4
4
|
*/
|
|
5
5
|
export type TimeValue = number;
|
|
6
6
|
/**
|
|
7
7
|
* Current playback time and total duration of the media.
|
|
8
|
-
* @
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
10
|
export interface TimePosition {
|
|
11
11
|
/**
|
|
@@ -33,7 +33,7 @@ export type TimeUpdate = TimePosition & {
|
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* A level of quality within a media source.
|
|
36
|
-
* @
|
|
36
|
+
* @public
|
|
37
37
|
*/
|
|
38
38
|
export interface QualityLevel {
|
|
39
39
|
/**
|
|
@@ -55,7 +55,7 @@ export interface QualityLevel {
|
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Codes of errors occurring within the playback component.
|
|
58
|
-
* @
|
|
58
|
+
* @public
|
|
59
59
|
*/
|
|
60
60
|
export declare enum PlaybackErrorCode {
|
|
61
61
|
/**
|
|
@@ -73,17 +73,17 @@ export declare enum PlaybackErrorCode {
|
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
76
|
-
* @
|
|
76
|
+
* @public
|
|
77
77
|
*/
|
|
78
78
|
export type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
|
|
79
79
|
/**
|
|
80
80
|
* Subsystems of a player component.
|
|
81
|
-
* @
|
|
81
|
+
* @public
|
|
82
82
|
*/
|
|
83
83
|
export type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
84
84
|
/**
|
|
85
85
|
* An error occurred during the playback.
|
|
86
|
-
* @
|
|
86
|
+
* @public
|
|
87
87
|
*/
|
|
88
88
|
export interface PlaybackError {
|
|
89
89
|
/**
|
|
@@ -120,6 +120,7 @@ export interface PlaybackError {
|
|
|
120
120
|
UI?: {
|
|
121
121
|
title: string;
|
|
122
122
|
message: string;
|
|
123
|
+
icon?: string;
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
126
|
//# sourceMappingURL=playback.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playback.types.d.ts","sourceRoot":"","sources":["../src/playback.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,OAAO,kBAAkB;IACzB;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,+BAA+B;CACvD;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"playback.types.d.ts","sourceRoot":"","sources":["../src/playback.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,OAAO,kBAAkB;IACzB;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,+BAA+B;CACvD;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF"}
|
package/lib/playback.types.js
CHANGED
|
@@ -2,7 +2,7 @@ import { UICorePlugin } from '@clappr/core';
|
|
|
2
2
|
import { AudioTrackLoadedData, AudioTrackSwitchedData, Events as HlsEvents } from 'hls.js';
|
|
3
3
|
import '../../../assets/audio-selector/style.scss';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* `PLUGIN` that adds an audio track selector to the media control UI.
|
|
6
6
|
* @beta
|
|
7
7
|
*/
|
|
8
8
|
export declare class AudioSelector extends UICorePlugin {
|
|
@@ -9,7 +9,7 @@ const VERSION = '0.0.1';
|
|
|
9
9
|
// const T = 'plugins.audio_selector';
|
|
10
10
|
const AUTO = 0;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* `PLUGIN` that adds an audio track selector to the media control UI.
|
|
13
13
|
* @beta
|
|
14
14
|
*/
|
|
15
15
|
export class AudioSelector extends UICorePlugin {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UICorePlugin } from '@clappr/core';
|
|
2
2
|
import '../../../assets/big-mute-button/big-mute-button.scss';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
5
5
|
* Once pressed, it unmutes the video.
|
|
6
6
|
* @beta
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigMuteButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/big-mute-button/BigMuteButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAS,MAAM,cAAc,CAAA;AAQpE,OAAO,sDAAsD,CAAA;AAM7D;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,qBAAqB,CAAQ;IAErC,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,oBAAoB,CAA2B;IAEvD,OAAO,CAAC,cAAc,CAA2B;IAEjD;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;
|
|
1
|
+
{"version":3,"file":"BigMuteButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/big-mute-button/BigMuteButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAS,MAAM,cAAc,CAAA;AAQpE,OAAO,sDAAsD,CAAA;AAM7D;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,qBAAqB,CAAQ;IAErC,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,oBAAoB,CAA2B;IAEvD,OAAO,CAAC,cAAc,CAA2B;IAEjD;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;IAcnB,OAAO,CAAC,WAAW;IAkBnB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACM,MAAM;IAuBf,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,qBAAqB;CAS9B"}
|
|
@@ -7,7 +7,7 @@ import '../../../assets/big-mute-button/big-mute-button.scss';
|
|
|
7
7
|
const T = 'plugins.big_mute_button';
|
|
8
8
|
// TODO rewrite as a container plugin
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
11
11
|
* Once pressed, it unmutes the video.
|
|
12
12
|
* @beta
|
|
13
13
|
*/
|
|
@@ -42,7 +42,6 @@ export class BigMuteButton extends UICorePlugin {
|
|
|
42
42
|
* @internal
|
|
43
43
|
*/
|
|
44
44
|
bindEvents() {
|
|
45
|
-
super.bindEvents();
|
|
46
45
|
this.listenTo(this.core, Events.CORE_READY, this.onCoreReady);
|
|
47
46
|
this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
|
|
48
47
|
this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
|
|
@@ -8,7 +8,7 @@ import { ZeptoResult } from '../../types.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export type GearItemElement = 'quality' | 'rate' | 'nerd';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* `PLUGIN` that adds the gear button with an extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
12
12
|
* @beta
|
|
13
13
|
* @remarks
|
|
14
14
|
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
@@ -11,7 +11,7 @@ import { MediaControlEvents } from '../media-control/MediaControl';
|
|
|
11
11
|
const VERSION = '2.19.12';
|
|
12
12
|
const T = 'plugins.bottom_gear';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* `PLUGIN` that adds the gear button with an extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
15
15
|
* @beta
|
|
16
16
|
* @remarks
|
|
17
17
|
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UICorePlugin, Core } from '@clappr/core';
|
|
2
2
|
import '../../../assets/clappr-nerd-stats/clappr-nerd-stats.scss';
|
|
3
3
|
/**
|
|
4
|
-
* PLUGIN that displays useful network-related statistics.
|
|
4
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
5
5
|
* @beta
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
@@ -81,7 +81,7 @@ const drawSummary = (customMetrics, vodContainer, liveContainer) => {
|
|
|
81
81
|
};
|
|
82
82
|
// const T = 'plugins.clappr_nerd_stats';
|
|
83
83
|
/**
|
|
84
|
-
* PLUGIN that displays useful network-related statistics.
|
|
84
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
85
85
|
* @beta
|
|
86
86
|
*
|
|
87
87
|
* @remarks
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container, ContainerPlugin } from '@clappr/core';
|
|
2
2
|
import type { Metrics, MetricsUpdateFn } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
5
5
|
* @beta
|
|
6
6
|
* @remarks
|
|
7
7
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -6,7 +6,7 @@ import { newMetrics } from './utils.js';
|
|
|
6
6
|
// TODO: fix
|
|
7
7
|
const updateMetrics = () => { };
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
10
10
|
* @beta
|
|
11
11
|
* @remarks
|
|
12
12
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContainerPlugin } from '@clappr/core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
4
4
|
* @beta
|
|
5
5
|
*/
|
|
6
6
|
export declare class ClickToPause extends ContainerPlugin {
|
|
@@ -6,7 +6,7 @@ import { trace } from '@gcorevideo/utils';
|
|
|
6
6
|
import { CLAPPR_VERSION } from '../../build.js';
|
|
7
7
|
const T = 'plugins.click_to_pause_custom';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
10
10
|
* @beta
|
|
11
11
|
*/
|
|
12
12
|
export class ClickToPause extends ContainerPlugin {
|
|
@@ -11,7 +11,7 @@ export interface ClipsPluginSettings {
|
|
|
11
11
|
text: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* PLUGIN that shows text over the seekbar to indicate the current clip.
|
|
14
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
15
15
|
* @beta
|
|
16
16
|
* @remarks
|
|
17
17
|
* Depends on:
|
|
@@ -3,7 +3,7 @@ import { strtimeToMiliseconds } from '../utils.js';
|
|
|
3
3
|
import '../../../assets/clips/clips.scss';
|
|
4
4
|
import assert from 'assert';
|
|
5
5
|
/**
|
|
6
|
-
* PLUGIN that shows text over the seekbar to indicate the current clip.
|
|
6
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
7
7
|
* @beta
|
|
8
8
|
* @remarks
|
|
9
9
|
* Depends on:
|
|
@@ -10,7 +10,7 @@ export interface ContextMenuPluginSettings {
|
|
|
10
10
|
preventShowContextMenu?: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
14
14
|
* @beta
|
|
15
15
|
* @remarks
|
|
16
16
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -4,7 +4,7 @@ import '../../../assets/context-menu/context_menu.scss';
|
|
|
4
4
|
import templateHtml from '../../../assets/context-menu/context_menu.ejs';
|
|
5
5
|
import { version } from '../../version.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
8
8
|
* @beta
|
|
9
9
|
* @remarks
|
|
10
10
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UICorePlugin } from '@clappr/core';
|
|
2
2
|
import '../../../assets/dvr-controls/dvr_controls.scss';
|
|
3
3
|
/**
|
|
4
|
-
* PLUGIN that adds the DVR controls to the media control UI
|
|
4
|
+
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
5
5
|
*
|
|
6
6
|
* @beta
|
|
7
7
|
*
|
|
@@ -10,7 +10,9 @@ import '../../../assets/dvr-controls/dvr_controls.scss';
|
|
|
10
10
|
*
|
|
11
11
|
* - {@link MediaControl}
|
|
12
12
|
*
|
|
13
|
-
* The plugin renders live stream indicator
|
|
13
|
+
* The plugin renders live stream indicator.
|
|
14
|
+
* If DVR is enabled, the indicator shows whether the current position is at the live edge of the stream or not.
|
|
15
|
+
* In the latter case, the indicator can be clicked to seek to the live edge.
|
|
14
16
|
*/
|
|
15
17
|
export declare class DvrControls extends UICorePlugin {
|
|
16
18
|
private static readonly template;
|
|
@@ -37,11 +39,11 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
37
39
|
class: string;
|
|
38
40
|
'data-dvr-controls': string;
|
|
39
41
|
};
|
|
40
|
-
constructor(core: Core);
|
|
41
42
|
/**
|
|
42
43
|
* @internal
|
|
43
44
|
*/
|
|
44
45
|
bindEvents(): void;
|
|
46
|
+
private onCoreReady;
|
|
45
47
|
private bindContainerEvents;
|
|
46
48
|
private onDvrChanged;
|
|
47
49
|
private click;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DvrControls.d.ts","sourceRoot":"","sources":["../../../src/plugins/dvr-controls/DvrControls.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DvrControls.d.ts","sourceRoot":"","sources":["../../../src/plugins/dvr-controls/DvrControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,YAAY,EAAY,MAAM,cAAc,CAAA;AAM7E,OAAO,gDAAgD,CAAA;AAMvD;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAEpD;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,IAAa,MAAM;;MAIlB;IAED;;OAEG;IACH,IAAa,UAAU;;;MAKtB;IAED;;OAEG;IACM,UAAU;IAUnB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,KAAK;IAQb,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACM,MAAM;CAoBhB"}
|