@gcorevideo/player 2.20.8 → 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 +22 -17
- package/dist/index.css +1343 -1346
- package/dist/index.js +119 -109
- package/dist/player.d.ts +238 -179
- package/dist/plugins/index.css +461 -464
- package/dist/plugins/index.js +97 -93
- package/docs/api/player.audioselector.md +1 -1
- package/docs/api/player.bigmutebutton.md +1 -1
- package/docs/api/player.bottomgear.md +15 -1
- package/docs/api/player.bottomgear.refresh.md +20 -0
- package/docs/api/player.clapprnerdstats.md +1 -1
- package/docs/api/player.clapprstats.exportmetrics.md +1 -1
- package/docs/api/player.clapprstats.md +1 -15
- package/docs/api/player.clapprstats.setupdatemetrics.md +2 -0
- package/docs/api/player.clicktopause.md +1 -1
- package/docs/api/player.clipsplugin.md +1 -1
- package/docs/api/player.clipspluginsettings.md +5 -2
- package/docs/api/player.clipspluginsettings.text.md +3 -0
- package/docs/api/player.containerpluginconstructor.md +17 -0
- package/docs/api/player.containersize.md +0 -3
- package/docs/api/player.contextmenu.md +1 -1
- package/docs/api/player.corepluginconstructor.md +17 -0
- 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 -220
- package/docs/api/{player.errorscreen.render.md → player.errorscreenpluginsettings.md} +7 -7
- 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 +3 -9
- package/docs/api/{player.errorscreen.bindevents.md → player.levelselectorpluginsettings.labels.md} +11 -5
- package/docs/api/player.levelselectorpluginsettings.md +79 -0
- package/docs/api/{player.errorscreen.unbindevents.md → player.levelselectorpluginsettings.restrictresolution.md} +5 -7
- package/docs/api/player.logo.md +1 -1
- package/docs/api/player.md +131 -65
- package/docs/api/{player.errorscreen.container.md → player.mediacontrol.currentseekpos.md} +3 -3
- package/docs/api/player.mediacontrol.disable.md +1 -1
- package/docs/api/player.mediacontrol.md +24 -3
- package/docs/api/{player.gearevents.md → player.mediacontrolevents.md} +4 -4
- package/docs/api/player.multicamera.md +1 -29
- 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 +25 -9
- 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 +17 -0
- package/docs/api/player.playbackerrorcode.md +6 -9
- package/docs/api/player.playbackmodule.md +0 -3
- package/docs/api/{player.dvrcontrols._constructor_.md → player.playbackrate._constructor_.md} +3 -3
- package/docs/api/player.playbackrate.md +35 -2
- 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 +2 -5
- 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 +14 -0
- 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.attributes.md +3 -0
- package/docs/api/player.share.bindevents.md +3 -0
- package/docs/api/player.share.canshowshare.md +3 -0
- package/docs/api/player.share.events.md +3 -0
- package/docs/api/player.share.hideshare.md +3 -0
- package/docs/api/player.share.initializeicons.md +3 -0
- package/docs/api/player.share.md +40 -1
- package/docs/api/player.share.name.md +3 -0
- package/docs/api/player.share.onshareembedclick.md +3 -0
- package/docs/api/player.share.onsharefb.md +3 -0
- package/docs/api/player.share.onsharehide.md +3 -0
- package/docs/api/player.share.onsharelinkclick.md +3 -0
- package/docs/api/player.share.onshareshow.md +3 -0
- package/docs/api/player.share.onsharetw.md +3 -0
- package/docs/api/player.share.render.md +3 -0
- package/docs/api/player.share.showshare.md +3 -0
- package/docs/api/player.share.supportedversion.md +3 -0
- package/docs/api/player.share.template.md +3 -0
- package/docs/api/player.share.unbindevents.md +3 -0
- package/docs/api/player.skiptime.attributes.md +3 -0
- package/docs/api/player.skiptime.bindevents.md +3 -0
- package/docs/api/player.skiptime.container.md +3 -0
- package/docs/api/player.skiptime.events.md +3 -0
- package/docs/api/player.skiptime.handlerewindclicks.md +3 -0
- package/docs/api/player.skiptime.md +30 -1
- package/docs/api/player.skiptime.name.md +3 -0
- package/docs/api/player.skiptime.render.md +3 -0
- package/docs/api/player.skiptime.setback.md +3 -0
- package/docs/api/player.skiptime.setforward.md +3 -0
- package/docs/api/player.skiptime.setmidclick.md +3 -0
- package/docs/api/player.skiptime.supportedversion.md +3 -0
- package/docs/api/player.skiptime.template.md +3 -0
- package/docs/api/player.skiptime.togglefullscreen.md +3 -0
- package/docs/api/player.sourcecontroller.md +1 -1
- package/docs/api/player.spinnerevents.md +4 -1
- package/docs/api/player.spinnerthreebounce.hide.md +1 -1
- package/docs/api/player.spinnerthreebounce.md +7 -5
- package/docs/api/player.spinnerthreebounce.show.md +40 -2
- package/docs/api/player.subtitles.md +1 -1
- package/docs/api/player.telemetry.md +1 -1
- package/docs/api/player.telemetrypluginsettings.md +1 -1
- package/docs/api/{player.errorscreen.hide.md → player.telemetrysendfn.md} +6 -6
- 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 +18 -9
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +19 -14
- package/lib/index.core.d.ts +0 -1
- package/lib/index.core.d.ts.map +1 -1
- package/lib/index.core.js +0 -1
- package/lib/index.d.ts +18 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -1
- package/lib/index.plugins.d.ts +0 -1
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +0 -1
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +1 -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 +2 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +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-nerd-stats/speedtest/Speedtest.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.js +8 -8
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +4 -5
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +4 -3
- 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 +3 -2
- package/lib/plugins/clips/Clips.d.ts.map +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.d.ts.map +1 -1
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +7 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +29 -36
- package/lib/plugins/error-screen/ErrorScreen.d.ts +8 -14
- 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/index.d.ts +0 -1
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/index.js +0 -1
- package/lib/plugins/kibo/index.d.ts +0 -3
- package/lib/plugins/kibo/index.d.ts.map +1 -1
- package/lib/plugins/kibo/index.js +0 -3
- package/lib/plugins/level-selector/LevelSelector.d.ts +6 -4
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +2 -4
- 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 +11 -5
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +17 -5
- package/lib/plugins/multi-camera/MultiCamera.d.ts +3 -11
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +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 +3 -3
- 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 +2 -1
- package/lib/plugins/share/Share.d.ts.map +1 -1
- package/lib/plugins/share/Share.js +2 -1
- package/lib/plugins/skip-time/SkipTime.d.ts +2 -1
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
- package/lib/plugins/skip-time/SkipTime.js +2 -1
- package/lib/plugins/source-controller/SourceController.d.ts +1 -1
- package/lib/plugins/source-controller/SourceController.js +4 -4
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +6 -3
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +6 -3
- package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
- package/lib/plugins/subtitles/Subtitles.js +1 -1
- package/lib/plugins/telemetry/Telemetry.d.ts +2 -3
- package/lib/plugins/telemetry/Telemetry.d.ts.map +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/vast-ads/VastAds.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.js +3 -3
- package/lib/plugins/vast-ads/roll.d.ts +1 -1
- package/lib/plugins/vast-ads/roll.d.ts.map +1 -1
- package/lib/plugins/vast-ads/rollmanager.d.ts +1 -1
- package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -1
- package/lib/plugins/vast-ads/rollmanager.js +2 -2
- 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 +38 -27
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -1
- package/lib/utils/types.d.ts +0 -6
- package/lib/utils/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Player.ts +23 -21
- package/src/index.core.ts +0 -1
- package/src/index.plugins.ts +0 -1
- package/src/index.ts +18 -1
- package/src/playback/hls-playback/HlsPlayback.ts +7 -11
- package/src/playback.types.ts +8 -7
- package/src/plugins/audio-selector/AudioSelector.ts +2 -2
- package/src/plugins/big-mute-button/BigMuteButton.ts +2 -3
- package/src/plugins/bottom-gear/BottomGear.ts +2 -2
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +2 -2
- package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +184 -187
- package/src/plugins/clappr-stats/ClapprStats.ts +5 -4
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/clips/Clips.ts +4 -3
- package/src/plugins/context-menu/ContextMenu.ts +1 -3
- package/src/plugins/dvr-controls/DvrControls.ts +34 -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 +10 -17
- package/src/plugins/favicon/Favicon.ts +2 -2
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/index.ts +0 -1
- package/src/plugins/kibo/index.ts +0 -3
- package/src/plugins/level-selector/LevelSelector.ts +7 -5
- package/src/plugins/logo/Logo.ts +2 -2
- package/src/plugins/media-control/MediaControl.ts +20 -6
- package/src/plugins/multi-camera/MultiCamera.ts +4 -4
- package/src/plugins/picture-in-picture/PictureInPicture.ts +1 -1
- package/src/plugins/playback-rate/PlaybackRate.ts +2 -2
- package/src/plugins/poster/Poster.ts +4 -4
- package/src/plugins/seek-time/SeekTime.ts +2 -2
- package/src/plugins/share/Share.ts +2 -1
- package/src/plugins/skip-time/SkipTime.ts +2 -1
- package/src/plugins/source-controller/SourceController.ts +4 -4
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +2 -2
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +6 -3
- package/src/plugins/subtitles/Subtitles.ts +2 -2
- package/src/plugins/telemetry/Telemetry.ts +2 -2
- package/src/plugins/thumbnails/Thumbnails.ts +2 -2
- package/src/plugins/vast-ads/VastAds.ts +5 -4
- package/src/plugins/vast-ads/roll.ts +2 -1
- package/src/plugins/vast-ads/rollmanager.ts +3 -3
- package/src/plugins/volume-fade/VolumeFade.ts +1 -1
- package/src/testUtils.ts +28 -4
- package/src/types.ts +41 -28
- package/src/utils/types.ts +0 -8
- package/temp/player.api.json +680 -786
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.clapprstats.onbitrate.md +0 -52
- package/docs/api/player.errorscreen.attributes.md +0 -17
- package/docs/api/player.errorscreen.name.md +0 -14
- package/docs/api/player.errorscreen.show.md +0 -54
- package/docs/api/player.errorscreen.supportedversion.md +0 -16
- package/docs/api/player.errorscreen.template.md +0 -14
- package/docs/api/player.mediatransport.md +0 -16
- package/docs/api/player.multicamera.getcameraslist.md +0 -18
- package/docs/api/player.multicamera.getcurrentcamera.md +0 -18
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
|
|
@@ -218,13 +235,18 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
218
235
|
* @internal
|
|
219
236
|
*/
|
|
220
237
|
render(): this;
|
|
221
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Re-renders the gear menu.
|
|
240
|
+
* It fires the {@link MediaControlEvents.MEDIACONTROL_GEAR_RENDERED | MEDIACONTROL_GEAR_RENDERED} event,
|
|
241
|
+
* which the plugins that attach to the gear menu can listen to to re-render themselves.
|
|
242
|
+
*/
|
|
243
|
+
refresh(): void;
|
|
222
244
|
private toggleGearMenu;
|
|
223
245
|
private hide;
|
|
224
246
|
}
|
|
225
247
|
|
|
226
248
|
/**
|
|
227
|
-
*
|
|
249
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
228
250
|
* @beta
|
|
229
251
|
*
|
|
230
252
|
* @remarks
|
|
@@ -302,7 +324,7 @@ export declare class ClapprNerdStats extends UICorePlugin {
|
|
|
302
324
|
}
|
|
303
325
|
|
|
304
326
|
/**
|
|
305
|
-
*
|
|
327
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
306
328
|
* @beta
|
|
307
329
|
* @remarks
|
|
308
330
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -338,7 +360,7 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
338
360
|
private _stop;
|
|
339
361
|
/**
|
|
340
362
|
* Registers a callback to receive the metrics.
|
|
341
|
-
* @param updateMetricsFn
|
|
363
|
+
* @param updateMetricsFn - The callback to receive the metrics
|
|
342
364
|
*/
|
|
343
365
|
setUpdateMetrics(updateMetricsFn: MetricsUpdateFn): void;
|
|
344
366
|
private _defaultReport;
|
|
@@ -353,10 +375,10 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
353
375
|
destroy(): void;
|
|
354
376
|
/**
|
|
355
377
|
* Returns the collected metrics.
|
|
356
|
-
* @returns
|
|
378
|
+
* @returns Currently collected metrics
|
|
357
379
|
*/
|
|
358
380
|
exportMetrics(): Metrics;
|
|
359
|
-
onBitrate
|
|
381
|
+
private onBitrate;
|
|
360
382
|
private stopReporting;
|
|
361
383
|
private startTimers;
|
|
362
384
|
private onFirstPlaying;
|
|
@@ -381,7 +403,7 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
381
403
|
}
|
|
382
404
|
|
|
383
405
|
/**
|
|
384
|
-
*
|
|
406
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
385
407
|
* @beta
|
|
386
408
|
*/
|
|
387
409
|
export declare class ClickToPause extends ContainerPlugin {
|
|
@@ -408,7 +430,7 @@ export declare class ClickToPause extends ContainerPlugin {
|
|
|
408
430
|
}
|
|
409
431
|
|
|
410
432
|
/**
|
|
411
|
-
*
|
|
433
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
412
434
|
* @beta
|
|
413
435
|
* @remarks
|
|
414
436
|
* Depends on:
|
|
@@ -455,7 +477,8 @@ export declare class ClipsPlugin extends UICorePlugin {
|
|
|
455
477
|
}
|
|
456
478
|
|
|
457
479
|
/**
|
|
458
|
-
* Configuration options
|
|
480
|
+
* Configuration options for the {@link ClipsPlugin | clips} plugin.
|
|
481
|
+
* @beta
|
|
459
482
|
*/
|
|
460
483
|
export declare interface ClipsPluginSettings {
|
|
461
484
|
/**
|
|
@@ -464,9 +487,17 @@ export declare interface ClipsPluginSettings {
|
|
|
464
487
|
text: string;
|
|
465
488
|
}
|
|
466
489
|
|
|
490
|
+
/**
|
|
491
|
+
* @public
|
|
492
|
+
*/
|
|
493
|
+
export declare type ContainerPluginConstructor = {
|
|
494
|
+
new (container: Container): PlayerPlugin;
|
|
495
|
+
type: string;
|
|
496
|
+
};
|
|
497
|
+
|
|
467
498
|
/**
|
|
468
499
|
* Dimensions of the player container DOM element.
|
|
469
|
-
* @
|
|
500
|
+
* @public
|
|
470
501
|
*/
|
|
471
502
|
export declare type ContainerSize = {
|
|
472
503
|
width: number;
|
|
@@ -474,7 +505,7 @@ export declare type ContainerSize = {
|
|
|
474
505
|
};
|
|
475
506
|
|
|
476
507
|
/**
|
|
477
|
-
*
|
|
508
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
478
509
|
* @beta
|
|
479
510
|
* @remarks
|
|
480
511
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -539,15 +570,24 @@ export declare interface ContextMenuPluginSettings {
|
|
|
539
570
|
preventShowContextMenu?: boolean;
|
|
540
571
|
}
|
|
541
572
|
|
|
573
|
+
/**
|
|
574
|
+
* @public
|
|
575
|
+
*/
|
|
576
|
+
export declare type CorePluginConstructor = {
|
|
577
|
+
new (core: Core): PlayerPlugin;
|
|
578
|
+
type: string;
|
|
579
|
+
};
|
|
580
|
+
|
|
542
581
|
/**
|
|
543
582
|
* A plain JS object that must conform to the DASH.js settings schema.
|
|
544
|
-
* @
|
|
583
|
+
* @public
|
|
545
584
|
* {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html | DASH.js settings}
|
|
546
585
|
*/
|
|
547
586
|
export declare type DashSettings = Record<string, unknown>;
|
|
548
587
|
|
|
549
588
|
/**
|
|
550
|
-
*
|
|
589
|
+
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
590
|
+
*
|
|
551
591
|
* @beta
|
|
552
592
|
*
|
|
553
593
|
* @remarks
|
|
@@ -555,7 +595,9 @@ export declare type DashSettings = Record<string, unknown>;
|
|
|
555
595
|
*
|
|
556
596
|
* - {@link MediaControl}
|
|
557
597
|
*
|
|
558
|
-
* 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.
|
|
559
601
|
*/
|
|
560
602
|
export declare class DvrControls extends UICorePlugin {
|
|
561
603
|
private static readonly template;
|
|
@@ -582,13 +624,13 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
582
624
|
class: string;
|
|
583
625
|
'data-dvr-controls': string;
|
|
584
626
|
};
|
|
585
|
-
constructor(core: Core);
|
|
586
627
|
/**
|
|
587
628
|
* @internal
|
|
588
629
|
*/
|
|
589
630
|
bindEvents(): void;
|
|
631
|
+
private onCoreReady;
|
|
590
632
|
private bindContainerEvents;
|
|
591
|
-
private
|
|
633
|
+
private onDvrChanged;
|
|
592
634
|
private click;
|
|
593
635
|
private settingsUpdate;
|
|
594
636
|
private shouldRender;
|
|
@@ -600,50 +642,68 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
600
642
|
|
|
601
643
|
/**
|
|
602
644
|
* Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
603
|
-
* @
|
|
645
|
+
* @public
|
|
604
646
|
*/
|
|
605
647
|
export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
|
|
606
648
|
|
|
607
649
|
/**
|
|
608
|
-
*
|
|
650
|
+
* `PLUGIN` that displays errors nicely in the overlay on top of the player.
|
|
609
651
|
* @beta
|
|
610
652
|
*/
|
|
611
653
|
export declare class ErrorScreen extends UICorePlugin {
|
|
612
|
-
private _retry;
|
|
613
654
|
private err;
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
655
|
+
/**
|
|
656
|
+
* @internal
|
|
657
|
+
*/
|
|
617
658
|
get name(): string;
|
|
659
|
+
/**
|
|
660
|
+
* @internal
|
|
661
|
+
*/
|
|
618
662
|
get supportedVersion(): {
|
|
619
663
|
min: string;
|
|
620
664
|
};
|
|
621
|
-
|
|
622
|
-
|
|
665
|
+
private static readonly template;
|
|
666
|
+
/**
|
|
667
|
+
* @internal
|
|
668
|
+
*/
|
|
623
669
|
get attributes(): {
|
|
624
670
|
class: string;
|
|
625
671
|
'data-error-screen': string;
|
|
626
672
|
};
|
|
673
|
+
/**
|
|
674
|
+
* @internal
|
|
675
|
+
*/
|
|
627
676
|
bindEvents(): void;
|
|
628
|
-
private onCoreReady;
|
|
629
677
|
private onPlay;
|
|
630
|
-
private
|
|
631
|
-
|
|
632
|
-
|
|
678
|
+
private unmount;
|
|
679
|
+
/**
|
|
680
|
+
* @internal
|
|
681
|
+
*/
|
|
682
|
+
get events(): {
|
|
683
|
+
'click .player-error-screen__reload': string;
|
|
684
|
+
};
|
|
633
685
|
private reload;
|
|
634
|
-
private
|
|
635
|
-
private onContainerChanged;
|
|
636
|
-
private onStartAd;
|
|
637
|
-
private onFinishAd;
|
|
686
|
+
private onActiveContainerChanged;
|
|
638
687
|
private onError;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
688
|
+
/**
|
|
689
|
+
* @internal
|
|
690
|
+
*/
|
|
642
691
|
render(): this;
|
|
643
692
|
}
|
|
644
693
|
|
|
645
694
|
/**
|
|
646
|
-
*
|
|
695
|
+
* Configuration options for the {@link ErrorScreen | error screen} plugin.
|
|
696
|
+
* @beta
|
|
697
|
+
*/
|
|
698
|
+
export declare type ErrorScreenPluginSettings = {
|
|
699
|
+
/**
|
|
700
|
+
* Whether to hide the reload button.
|
|
701
|
+
*/
|
|
702
|
+
noReload?: boolean;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* `PLUGIN` that adds custom favicon to the player's tab.
|
|
647
707
|
* @beta
|
|
648
708
|
*/
|
|
649
709
|
export declare class Favicon extends CorePlugin {
|
|
@@ -669,17 +729,6 @@ export declare class Favicon extends CorePlugin {
|
|
|
669
729
|
private changeIcon;
|
|
670
730
|
}
|
|
671
731
|
|
|
672
|
-
/**
|
|
673
|
-
* Custom events emitted by the plugin
|
|
674
|
-
* @beta
|
|
675
|
-
*/
|
|
676
|
-
export declare enum GearEvents {
|
|
677
|
-
/**
|
|
678
|
-
* Emitted when the gear menu is rendered
|
|
679
|
-
*/
|
|
680
|
-
MEDIACONTROL_GEAR_RENDERED = "mediacontrol:gear:rendered"
|
|
681
|
-
}
|
|
682
|
-
|
|
683
732
|
/**
|
|
684
733
|
* An element inside the gear menu
|
|
685
734
|
* @beta
|
|
@@ -687,7 +736,7 @@ export declare enum GearEvents {
|
|
|
687
736
|
export declare type GearItemElement = 'quality' | 'rate' | 'nerd';
|
|
688
737
|
|
|
689
738
|
/**
|
|
690
|
-
*
|
|
739
|
+
* `PLUGIN` that integrates with Google Analytics
|
|
691
740
|
* @beta
|
|
692
741
|
*/
|
|
693
742
|
export declare class GoogleAnalytics extends ContainerPlugin {
|
|
@@ -727,40 +776,15 @@ export declare interface InitEventData {
|
|
|
727
776
|
event: TelemetryEvent.Init;
|
|
728
777
|
}
|
|
729
778
|
|
|
730
|
-
declare type KeyboardEventHandler = (e: KeyboardEvent) => boolean | undefined;
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* @internal
|
|
734
|
-
*/
|
|
735
|
-
export declare class Kibo {
|
|
736
|
-
private element;
|
|
737
|
-
private lastKeyCode;
|
|
738
|
-
private lastModifiers;
|
|
739
|
-
private keysDown;
|
|
740
|
-
private keysUp;
|
|
741
|
-
private downHandler;
|
|
742
|
-
private upHandler;
|
|
743
|
-
constructor(element?: Document | Element);
|
|
744
|
-
private handler;
|
|
745
|
-
private registerKeys;
|
|
746
|
-
private unregisterKeys;
|
|
747
|
-
off(keys: string | string[]): Kibo;
|
|
748
|
-
delegate(upOrDown: UpDown, keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
749
|
-
down(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
750
|
-
up(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
751
|
-
lastKey(modifier?: string): string | boolean;
|
|
752
|
-
lastModifiersAndKey(): string;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
779
|
/**
|
|
756
780
|
* An ISO 639-1 language code.
|
|
757
781
|
* @example `pt`
|
|
758
|
-
* @
|
|
782
|
+
* @public
|
|
759
783
|
*/
|
|
760
784
|
export declare type LangTag = string;
|
|
761
785
|
|
|
762
786
|
/**
|
|
763
|
-
*
|
|
787
|
+
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
764
788
|
* @beta
|
|
765
789
|
*
|
|
766
790
|
* @remarks
|
|
@@ -770,15 +794,9 @@ export declare type LangTag = string;
|
|
|
770
794
|
*
|
|
771
795
|
* - {@link BottomGear}
|
|
772
796
|
*
|
|
773
|
-
* The plugin is rendered as an item in the gear menu.
|
|
797
|
+
* The plugin is rendered as an item in the gear menu, which, when clicked, shows a list of quality levels to choose from.
|
|
774
798
|
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
* Configuration options:
|
|
778
|
-
*
|
|
779
|
-
* - `labels`: The labels to show in the level selector. [video resolution]: string
|
|
780
|
-
*
|
|
781
|
-
* - `restrictResolution`: The maximum resolution to allow in the level selector.
|
|
799
|
+
* Configuration options - {@link LevelSelectorPluginSettings}
|
|
782
800
|
*
|
|
783
801
|
* @example
|
|
784
802
|
* ```ts
|
|
@@ -830,6 +848,8 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
830
848
|
* @internal
|
|
831
849
|
*/
|
|
832
850
|
bindEvents(): void;
|
|
851
|
+
private onCoreReady;
|
|
852
|
+
private onGearRendered;
|
|
833
853
|
private bindPlaybackEvents;
|
|
834
854
|
private onStop;
|
|
835
855
|
private shouldRender;
|
|
@@ -857,10 +877,29 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
857
877
|
private deferRender;
|
|
858
878
|
}
|
|
859
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Configuration options for the {@link LevelSelector | level selector} plugin.
|
|
882
|
+
* @beta
|
|
883
|
+
*/
|
|
884
|
+
export declare interface LevelSelectorPluginSettings {
|
|
885
|
+
/**
|
|
886
|
+
* The maximum resolution to allow in the level selector.
|
|
887
|
+
*/
|
|
888
|
+
restrictResolution?: number;
|
|
889
|
+
/**
|
|
890
|
+
* The labels to show in the level selector.
|
|
891
|
+
* @example
|
|
892
|
+
* ```ts
|
|
893
|
+
* { 360: 'SD', 720: 'HD' }
|
|
894
|
+
* ```
|
|
895
|
+
*/
|
|
896
|
+
labels?: Record<number, string>;
|
|
897
|
+
}
|
|
898
|
+
|
|
860
899
|
export { Logger }
|
|
861
900
|
|
|
862
901
|
/**
|
|
863
|
-
*
|
|
902
|
+
* `PLUGIN` that adds custom logo to the player.
|
|
864
903
|
* @beta
|
|
865
904
|
*/
|
|
866
905
|
export declare class Logo extends UIContainerPlugin {
|
|
@@ -893,11 +932,11 @@ export declare class Logo extends UIContainerPlugin {
|
|
|
893
932
|
export { LogTracer }
|
|
894
933
|
|
|
895
934
|
/**
|
|
896
|
-
*
|
|
935
|
+
* `PLUGIN` that provides a foundation for developing custom media controls UI.
|
|
897
936
|
* @beta
|
|
898
937
|
* @remarks
|
|
899
938
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
900
|
-
* 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.
|
|
901
940
|
* @example
|
|
902
941
|
* ```ts
|
|
903
942
|
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
@@ -970,12 +1009,12 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
970
1009
|
private get disabled();
|
|
971
1010
|
/**
|
|
972
1011
|
* @internal
|
|
973
|
-
* @deprecated
|
|
1012
|
+
* @deprecated Use core.activeContainer directly
|
|
974
1013
|
*/
|
|
975
1014
|
get container(): any;
|
|
976
1015
|
/**
|
|
977
1016
|
* @internal
|
|
978
|
-
* @deprecated
|
|
1017
|
+
* @deprecated Use core.activePlayback directly
|
|
979
1018
|
*/
|
|
980
1019
|
get playback(): any;
|
|
981
1020
|
/**
|
|
@@ -1015,6 +1054,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1015
1054
|
'mouseenter .media-control-layer[data-controls]': string;
|
|
1016
1055
|
'mouseleave .media-control-layer[data-controls]': string;
|
|
1017
1056
|
};
|
|
1057
|
+
get currentSeekPos(): number;
|
|
1018
1058
|
/**
|
|
1019
1059
|
* Current volume [0..100]
|
|
1020
1060
|
*/
|
|
@@ -1037,7 +1077,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1037
1077
|
bindEvents(): void;
|
|
1038
1078
|
private bindContainerEvents;
|
|
1039
1079
|
/**
|
|
1040
|
-
*
|
|
1080
|
+
* Hides the media control UI
|
|
1041
1081
|
*/
|
|
1042
1082
|
disable(): void;
|
|
1043
1083
|
/**
|
|
@@ -1159,19 +1199,16 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1159
1199
|
*/
|
|
1160
1200
|
export declare type MediaControlElement = 'audioTracksSelector' | 'bottomGear' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'subtitlesSelector';
|
|
1161
1201
|
|
|
1162
|
-
declare type MediaSourceInfo = {
|
|
1163
|
-
live: boolean;
|
|
1164
|
-
source: string;
|
|
1165
|
-
id: number;
|
|
1166
|
-
dvr: boolean;
|
|
1167
|
-
projection: string | null;
|
|
1168
|
-
};
|
|
1169
|
-
|
|
1170
1202
|
/**
|
|
1171
|
-
*
|
|
1203
|
+
* Custom events emitted by the plugins to communicate with one another
|
|
1172
1204
|
* @beta
|
|
1173
1205
|
*/
|
|
1174
|
-
export declare
|
|
1206
|
+
export declare enum MediaControlEvents {
|
|
1207
|
+
/**
|
|
1208
|
+
* Emitted when the gear menu is rendered
|
|
1209
|
+
*/
|
|
1210
|
+
MEDIACONTROL_GEAR_RENDERED = "mediacontrol:gear:rendered"
|
|
1211
|
+
}
|
|
1175
1212
|
|
|
1176
1213
|
/**
|
|
1177
1214
|
* @beta
|
|
@@ -1221,7 +1258,7 @@ declare type Metrics = {
|
|
|
1221
1258
|
declare type MetricsUpdateFn = (metrics: Metrics) => void;
|
|
1222
1259
|
|
|
1223
1260
|
/**
|
|
1224
|
-
*
|
|
1261
|
+
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
1225
1262
|
* @beta
|
|
1226
1263
|
*/
|
|
1227
1264
|
export declare class MultiCamera extends UICorePlugin {
|
|
@@ -1262,8 +1299,8 @@ export declare class MultiCamera extends UICorePlugin {
|
|
|
1262
1299
|
private showError;
|
|
1263
1300
|
private hideError;
|
|
1264
1301
|
private changeById;
|
|
1265
|
-
getCamerasList
|
|
1266
|
-
getCurrentCamera
|
|
1302
|
+
private getCamerasList;
|
|
1303
|
+
private getCurrentCamera;
|
|
1267
1304
|
private findElementById;
|
|
1268
1305
|
private findIndexById;
|
|
1269
1306
|
private onShowLevelSelectMenu;
|
|
@@ -1274,7 +1311,7 @@ export declare class MultiCamera extends UICorePlugin {
|
|
|
1274
1311
|
}
|
|
1275
1312
|
|
|
1276
1313
|
/**
|
|
1277
|
-
*
|
|
1314
|
+
* `PLUGIN` that enables picture in picture mode.
|
|
1278
1315
|
* @beta
|
|
1279
1316
|
* @remarks
|
|
1280
1317
|
* Depends on:
|
|
@@ -1321,7 +1358,7 @@ export declare class PictureInPicture extends UICorePlugin {
|
|
|
1321
1358
|
|
|
1322
1359
|
/**
|
|
1323
1360
|
* An error occurred during the playback.
|
|
1324
|
-
* @
|
|
1361
|
+
* @public
|
|
1325
1362
|
*/
|
|
1326
1363
|
export declare interface PlaybackError {
|
|
1327
1364
|
/**
|
|
@@ -1352,35 +1389,43 @@ export declare interface PlaybackError {
|
|
|
1352
1389
|
* Component subsystem of the error origin
|
|
1353
1390
|
*/
|
|
1354
1391
|
scope: PlayerComponentType;
|
|
1392
|
+
/**
|
|
1393
|
+
* UI description of the error.
|
|
1394
|
+
*/
|
|
1395
|
+
UI?: {
|
|
1396
|
+
title: string;
|
|
1397
|
+
message: string;
|
|
1398
|
+
icon?: string;
|
|
1399
|
+
};
|
|
1355
1400
|
}
|
|
1356
1401
|
|
|
1357
1402
|
/**
|
|
1358
1403
|
* Codes of errors occurring within the playback component.
|
|
1359
|
-
* @
|
|
1404
|
+
* @public
|
|
1360
1405
|
*/
|
|
1361
1406
|
export declare enum PlaybackErrorCode {
|
|
1362
1407
|
/**
|
|
1363
1408
|
* An unknown or uncategorised error.
|
|
1364
1409
|
*/
|
|
1365
|
-
Generic =
|
|
1410
|
+
Generic = "GENERIC_ERROR",
|
|
1366
1411
|
/**
|
|
1367
1412
|
* The media source is not available. Typically a network error.
|
|
1368
1413
|
*/
|
|
1369
|
-
MediaSourceUnavailable =
|
|
1414
|
+
MediaSourceUnavailable = "MEDIA_SOURCE_UNAVAILABLE",
|
|
1370
1415
|
/**
|
|
1371
1416
|
* The media source is not accessible due to some protection policy.
|
|
1372
1417
|
*/
|
|
1373
|
-
MediaSourceAccessDenied =
|
|
1418
|
+
MediaSourceAccessDenied = "MEDIA_SOURCE_ACCESS_DENIED"
|
|
1374
1419
|
}
|
|
1375
1420
|
|
|
1376
1421
|
/**
|
|
1377
1422
|
* Module to perform the playback.
|
|
1378
|
-
* @
|
|
1423
|
+
* @public
|
|
1379
1424
|
*/
|
|
1380
1425
|
export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
1381
1426
|
|
|
1382
1427
|
/**
|
|
1383
|
-
*
|
|
1428
|
+
* `PLUGIN` that allows changing the playback speed of the video.
|
|
1384
1429
|
* @beta
|
|
1385
1430
|
*
|
|
1386
1431
|
* @remarks
|
|
@@ -1390,12 +1435,12 @@ export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
|
1390
1435
|
*
|
|
1391
1436
|
* - {@link BottomGear | bottom_gear}
|
|
1392
1437
|
*
|
|
1393
|
-
* It renders a button in the gear menu, which opens a dropdown with the
|
|
1438
|
+
* It renders a button in the gear menu, which opens a dropdown with the options to change the playback rate.
|
|
1394
1439
|
*/
|
|
1395
1440
|
export declare class PlaybackRate extends UICorePlugin {
|
|
1396
|
-
private currentPlayback;
|
|
1397
1441
|
private playbackRates;
|
|
1398
1442
|
private prevSelectedRate;
|
|
1443
|
+
private rendered;
|
|
1399
1444
|
private selectedRate;
|
|
1400
1445
|
/**
|
|
1401
1446
|
* @internal
|
|
@@ -1407,9 +1452,9 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1407
1452
|
get supportedVersion(): {
|
|
1408
1453
|
min: string;
|
|
1409
1454
|
};
|
|
1410
|
-
private static readonly template;
|
|
1411
1455
|
private static readonly buttonTemplate;
|
|
1412
1456
|
private static readonly listTemplate;
|
|
1457
|
+
constructor(core: Core);
|
|
1413
1458
|
/**
|
|
1414
1459
|
* @internal
|
|
1415
1460
|
*/
|
|
@@ -1429,12 +1474,13 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1429
1474
|
* @internal
|
|
1430
1475
|
*/
|
|
1431
1476
|
bindEvents(): void;
|
|
1432
|
-
private
|
|
1477
|
+
private onCoreReady;
|
|
1478
|
+
private onActiveContainerChange;
|
|
1479
|
+
private onGearRendered;
|
|
1480
|
+
private onDvrStateChanged;
|
|
1433
1481
|
private allRateElements;
|
|
1434
1482
|
private rateElement;
|
|
1435
|
-
private
|
|
1436
|
-
private updateLiveStatus;
|
|
1437
|
-
private reload;
|
|
1483
|
+
private onPlaybackRateChange;
|
|
1438
1484
|
private shouldRender;
|
|
1439
1485
|
/**
|
|
1440
1486
|
* @internal
|
|
@@ -1443,25 +1489,25 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1443
1489
|
private onStartAd;
|
|
1444
1490
|
private onFinishAd;
|
|
1445
1491
|
private onPlay;
|
|
1492
|
+
private resetPlaybackRate;
|
|
1446
1493
|
private onStop;
|
|
1447
1494
|
private onRateSelect;
|
|
1448
1495
|
private onShowMenu;
|
|
1449
1496
|
private goBack;
|
|
1450
|
-
private updatePlaybackRate;
|
|
1451
1497
|
private setSelectedRate;
|
|
1452
1498
|
private getTitle;
|
|
1453
1499
|
private highlightCurrentRate;
|
|
1454
1500
|
}
|
|
1455
1501
|
|
|
1456
1502
|
/**
|
|
1457
|
-
* Type of a stream
|
|
1458
|
-
* @
|
|
1503
|
+
* Type of a stream
|
|
1504
|
+
* @public
|
|
1459
1505
|
*/
|
|
1460
1506
|
export declare type PlaybackType = 'live' | 'vod';
|
|
1461
1507
|
|
|
1462
1508
|
/**
|
|
1463
|
-
*
|
|
1464
|
-
* @
|
|
1509
|
+
* `MAIN` component to use in the application code.
|
|
1510
|
+
* @public
|
|
1465
1511
|
* @remarks
|
|
1466
1512
|
* The Player object provides very basic API to control playback.
|
|
1467
1513
|
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
|
@@ -1626,12 +1672,23 @@ export declare class Player {
|
|
|
1626
1672
|
* Player.registerPlugin(MyPlugin)
|
|
1627
1673
|
* ```
|
|
1628
1674
|
*/
|
|
1629
|
-
static registerPlugin(plugin:
|
|
1675
|
+
static registerPlugin(plugin: PlayerPluginConstructor): void;
|
|
1630
1676
|
/**
|
|
1631
1677
|
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
1632
|
-
* @
|
|
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
|
|
1633
1688
|
*/
|
|
1634
|
-
static unregisterPlugin(
|
|
1689
|
+
static unregisterPlugin(name: string): void;
|
|
1690
|
+
private static getRegisteredPlugins;
|
|
1691
|
+
private static corePlugins;
|
|
1635
1692
|
private setConfig;
|
|
1636
1693
|
private initPlayer;
|
|
1637
1694
|
private tuneIn;
|
|
@@ -1647,7 +1704,7 @@ export declare class Player {
|
|
|
1647
1704
|
|
|
1648
1705
|
/**
|
|
1649
1706
|
* Subsystems of a player component.
|
|
1650
|
-
* @
|
|
1707
|
+
* @public
|
|
1651
1708
|
*/
|
|
1652
1709
|
export declare type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
1653
1710
|
|
|
@@ -1690,7 +1747,7 @@ export declare type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
|
1690
1747
|
* },
|
|
1691
1748
|
* }
|
|
1692
1749
|
* ```
|
|
1693
|
-
* @
|
|
1750
|
+
* @public
|
|
1694
1751
|
*/
|
|
1695
1752
|
export declare interface PlayerConfig extends Record<string, unknown> {
|
|
1696
1753
|
/**
|
|
@@ -1748,19 +1805,19 @@ export declare interface PlayerConfig extends Record<string, unknown> {
|
|
|
1748
1805
|
|
|
1749
1806
|
/**
|
|
1750
1807
|
* @remarks `true` is equivalent to `'all'`, `false` is equivalent to `'none'`
|
|
1751
|
-
* @
|
|
1808
|
+
* @public
|
|
1752
1809
|
*/
|
|
1753
1810
|
export declare type PlayerDebugSettings = PlayerDebugTag | boolean;
|
|
1754
1811
|
|
|
1755
1812
|
/**
|
|
1756
1813
|
* Debug output category selector
|
|
1757
|
-
* @
|
|
1814
|
+
* @public
|
|
1758
1815
|
*/
|
|
1759
1816
|
export declare type PlayerDebugTag = 'all' | 'clappr' | 'dash' | 'hls' | 'none';
|
|
1760
1817
|
|
|
1761
1818
|
/**
|
|
1762
1819
|
* A top-level event on the player object
|
|
1763
|
-
* @
|
|
1820
|
+
* @public
|
|
1764
1821
|
*/
|
|
1765
1822
|
export declare enum PlayerEvent {
|
|
1766
1823
|
/**
|
|
@@ -1817,12 +1874,12 @@ export declare enum PlayerEvent {
|
|
|
1817
1874
|
/**
|
|
1818
1875
|
* Type of a listener callback function for a player event.
|
|
1819
1876
|
* See the description of the event parameters in {@link PlayerEvent}.
|
|
1820
|
-
* @
|
|
1877
|
+
* @public
|
|
1821
1878
|
*/
|
|
1822
1879
|
export declare type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
|
|
1823
1880
|
|
|
1824
1881
|
/**
|
|
1825
|
-
* @
|
|
1882
|
+
* @public
|
|
1826
1883
|
*/
|
|
1827
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 ? [{
|
|
1828
1885
|
width: number;
|
|
@@ -1831,7 +1888,7 @@ export declare type PlayerEventParams<E extends PlayerEvent> = E extends PlayerE
|
|
|
1831
1888
|
|
|
1832
1889
|
/**
|
|
1833
1890
|
* A media source to fetch the media data from
|
|
1834
|
-
* @
|
|
1891
|
+
* @public
|
|
1835
1892
|
*/
|
|
1836
1893
|
export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
|
|
1837
1894
|
|
|
@@ -1841,7 +1898,7 @@ export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
|
|
|
1841
1898
|
* @remarks
|
|
1842
1899
|
* When the MIME type is provided, it helps the player determine the appropriate playback engine.
|
|
1843
1900
|
* If omitted, the player will attempt to detect the type from the source URL extension.
|
|
1844
|
-
* @
|
|
1901
|
+
* @public
|
|
1845
1902
|
*/
|
|
1846
1903
|
export declare interface PlayerMediaSourceDesc {
|
|
1847
1904
|
/**
|
|
@@ -1856,16 +1913,21 @@ export declare interface PlayerMediaSourceDesc {
|
|
|
1856
1913
|
}
|
|
1857
1914
|
|
|
1858
1915
|
/**
|
|
1859
|
-
* @
|
|
1860
|
-
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
1916
|
+
* @public
|
|
1917
|
+
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
1918
|
+
* {@link https://clappr.github.io/classes/ContainerPlugin.html}
|
|
1861
1919
|
*/
|
|
1862
1920
|
export declare type PlayerPlugin = {
|
|
1863
|
-
new (...args: any[]): unknown;
|
|
1864
1921
|
name: string;
|
|
1865
1922
|
};
|
|
1866
1923
|
|
|
1867
1924
|
/**
|
|
1868
|
-
*
|
|
1925
|
+
* @public
|
|
1926
|
+
*/
|
|
1927
|
+
export declare type PlayerPluginConstructor = CorePluginConstructor | ContainerPluginConstructor;
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
1869
1931
|
* @beta
|
|
1870
1932
|
* @remarks
|
|
1871
1933
|
* When the playback is stopped, media control UI is disabled.
|
|
@@ -1958,17 +2020,9 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
1958
2020
|
destroy(): this;
|
|
1959
2021
|
}
|
|
1960
2022
|
|
|
1961
|
-
declare type PresentationalError = {
|
|
1962
|
-
title: string;
|
|
1963
|
-
message: string;
|
|
1964
|
-
code: string;
|
|
1965
|
-
icon: string;
|
|
1966
|
-
reloadIcon: string;
|
|
1967
|
-
};
|
|
1968
|
-
|
|
1969
2023
|
/**
|
|
1970
2024
|
* A level of quality within a media source.
|
|
1971
|
-
* @
|
|
2025
|
+
* @public
|
|
1972
2026
|
*/
|
|
1973
2027
|
export declare interface QualityLevel {
|
|
1974
2028
|
/**
|
|
@@ -1992,7 +2046,7 @@ export declare interface QualityLevel {
|
|
|
1992
2046
|
export { reportError_2 as reportError }
|
|
1993
2047
|
|
|
1994
2048
|
/**
|
|
1995
|
-
*
|
|
2049
|
+
* `PLUGIN` that adds a seek time indicator to the media control UI.
|
|
1996
2050
|
* @beta
|
|
1997
2051
|
*/
|
|
1998
2052
|
export declare class SeekTime extends UICorePlugin {
|
|
@@ -2036,7 +2090,8 @@ export { SentryTracer }
|
|
|
2036
2090
|
export { setTracer }
|
|
2037
2091
|
|
|
2038
2092
|
/**
|
|
2039
|
-
*
|
|
2093
|
+
* `PLUGIN` that adds a share button to the media control UI.
|
|
2094
|
+
* @beta
|
|
2040
2095
|
*/
|
|
2041
2096
|
export declare class Share extends UICorePlugin {
|
|
2042
2097
|
private hide;
|
|
@@ -2075,7 +2130,8 @@ export declare class Share extends UICorePlugin {
|
|
|
2075
2130
|
}
|
|
2076
2131
|
|
|
2077
2132
|
/**
|
|
2078
|
-
*
|
|
2133
|
+
* `PLUGIN` that adds skip controls to the media control UI.
|
|
2134
|
+
* @beta
|
|
2079
2135
|
*/
|
|
2080
2136
|
export declare class SkipTime extends UICorePlugin {
|
|
2081
2137
|
get name(): string;
|
|
@@ -2104,7 +2160,7 @@ export declare class SkipTime extends UICorePlugin {
|
|
|
2104
2160
|
}
|
|
2105
2161
|
|
|
2106
2162
|
/**
|
|
2107
|
-
*
|
|
2163
|
+
* `PLUGIN` that is responsible for managing the automatic failover between sources.
|
|
2108
2164
|
* @beta
|
|
2109
2165
|
* @remarks
|
|
2110
2166
|
* Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details
|
|
@@ -2125,6 +2181,7 @@ export declare class SourceController extends CorePlugin {
|
|
|
2125
2181
|
private currentSourceIndex;
|
|
2126
2182
|
private sourcesDelay;
|
|
2127
2183
|
private active;
|
|
2184
|
+
private switching;
|
|
2128
2185
|
private sync;
|
|
2129
2186
|
/**
|
|
2130
2187
|
* @internal
|
|
@@ -2141,7 +2198,8 @@ export declare class SourceController extends CorePlugin {
|
|
|
2141
2198
|
* @internal
|
|
2142
2199
|
*/
|
|
2143
2200
|
bindEvents(): void;
|
|
2144
|
-
private
|
|
2201
|
+
private onCoreReady;
|
|
2202
|
+
private onActiveContainerChanged;
|
|
2145
2203
|
private bindContainerEventListeners;
|
|
2146
2204
|
private reset;
|
|
2147
2205
|
private retryPlayback;
|
|
@@ -2154,6 +2212,7 @@ export declare class SourceController extends CorePlugin {
|
|
|
2154
2212
|
|
|
2155
2213
|
/**
|
|
2156
2214
|
* Custom events emitted by the plugin
|
|
2215
|
+
* @beta
|
|
2157
2216
|
*/
|
|
2158
2217
|
export declare enum SpinnerEvents {
|
|
2159
2218
|
/**
|
|
@@ -2164,12 +2223,15 @@ export declare enum SpinnerEvents {
|
|
|
2164
2223
|
}
|
|
2165
2224
|
|
|
2166
2225
|
/**
|
|
2167
|
-
*
|
|
2226
|
+
* `PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state
|
|
2168
2227
|
* @beta
|
|
2169
2228
|
* @remarks
|
|
2170
|
-
*
|
|
2229
|
+
* Events emitted- {@link SpinnerEvents}
|
|
2230
|
+
* Other plugins can use {@link SpinnerThreeBounce.show | show} and {@link SpinnerThreeBounce.hide | hide} methods to
|
|
2231
|
+
* implement custom pending/progress indication scenarios.
|
|
2171
2232
|
*/
|
|
2172
2233
|
export declare class SpinnerThreeBounce extends UIContainerPlugin {
|
|
2234
|
+
private userShown;
|
|
2173
2235
|
/**
|
|
2174
2236
|
* @internal
|
|
2175
2237
|
*/
|
|
@@ -2198,13 +2260,17 @@ export declare class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
2198
2260
|
private onStop;
|
|
2199
2261
|
private onError;
|
|
2200
2262
|
/**
|
|
2201
|
-
* Shows the spinner
|
|
2263
|
+
* Shows the spinner.
|
|
2264
|
+
*
|
|
2265
|
+
* When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce.hide} is called
|
|
2202
2266
|
*/
|
|
2203
|
-
show(): void;
|
|
2267
|
+
show(delay?: number): void;
|
|
2204
2268
|
/**
|
|
2205
|
-
* Hides the spinner
|
|
2269
|
+
* Hides the spinner.
|
|
2206
2270
|
*/
|
|
2207
2271
|
hide(): void;
|
|
2272
|
+
private _show;
|
|
2273
|
+
private _hide;
|
|
2208
2274
|
/**
|
|
2209
2275
|
* @internal
|
|
2210
2276
|
*/
|
|
@@ -2240,7 +2306,7 @@ export declare interface StartEventData {
|
|
|
2240
2306
|
}
|
|
2241
2307
|
|
|
2242
2308
|
/**
|
|
2243
|
-
*
|
|
2309
|
+
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
2244
2310
|
* @beta
|
|
2245
2311
|
*
|
|
2246
2312
|
* @remarks
|
|
@@ -2348,7 +2414,7 @@ export declare class Subtitles extends UICorePlugin {
|
|
|
2348
2414
|
}
|
|
2349
2415
|
|
|
2350
2416
|
/**
|
|
2351
|
-
*
|
|
2417
|
+
* `PLUGIN` that collects and reports the performance statistics.
|
|
2352
2418
|
* @beta
|
|
2353
2419
|
* @remarks
|
|
2354
2420
|
* This plugin is experimental and its API is likely to change.
|
|
@@ -2460,10 +2526,10 @@ export declare type TelemetryRecord = {
|
|
|
2460
2526
|
* @param data - The telemetry record to send.
|
|
2461
2527
|
* @beta
|
|
2462
2528
|
*/
|
|
2463
|
-
declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
2529
|
+
export declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
2464
2530
|
|
|
2465
2531
|
/**
|
|
2466
|
-
*
|
|
2532
|
+
* `PLUGIN` that displays the thumbnails of the video when available.
|
|
2467
2533
|
* @beta
|
|
2468
2534
|
* @example
|
|
2469
2535
|
* ```ts
|
|
@@ -2555,7 +2621,7 @@ export declare type ThumbnailsPluginSettings = {
|
|
|
2555
2621
|
|
|
2556
2622
|
/**
|
|
2557
2623
|
* Current playback time and total duration of the media.
|
|
2558
|
-
* @
|
|
2624
|
+
* @public
|
|
2559
2625
|
*/
|
|
2560
2626
|
export declare interface TimePosition {
|
|
2561
2627
|
/**
|
|
@@ -2576,11 +2642,6 @@ export declare type TimeProgress = TimePosition & {
|
|
|
2576
2642
|
start: number;
|
|
2577
2643
|
};
|
|
2578
2644
|
|
|
2579
|
-
/**
|
|
2580
|
-
* @internal
|
|
2581
|
-
*/
|
|
2582
|
-
export declare type TimerId = ReturnType<typeof setTimeout>;
|
|
2583
|
-
|
|
2584
2645
|
/**
|
|
2585
2646
|
* For the plugin development
|
|
2586
2647
|
* @beta
|
|
@@ -2591,14 +2652,14 @@ export declare type TimeUpdate = TimePosition & {
|
|
|
2591
2652
|
|
|
2592
2653
|
/**
|
|
2593
2654
|
* Playback time in seconds since the beginning of the stream (or a segment for the live streams)
|
|
2594
|
-
* @
|
|
2655
|
+
* @public
|
|
2595
2656
|
*/
|
|
2596
2657
|
export declare type TimeValue = number;
|
|
2597
2658
|
|
|
2598
2659
|
export { trace }
|
|
2599
2660
|
|
|
2600
2661
|
/**
|
|
2601
|
-
* @
|
|
2662
|
+
* @public
|
|
2602
2663
|
*/
|
|
2603
2664
|
export declare type TranslationKey = string;
|
|
2604
2665
|
|
|
@@ -2624,17 +2685,15 @@ export declare type TranslationKey = string;
|
|
|
2624
2685
|
* }
|
|
2625
2686
|
* ```
|
|
2626
2687
|
*
|
|
2627
|
-
* @
|
|
2688
|
+
* @public
|
|
2628
2689
|
*/
|
|
2629
2690
|
export declare type TranslationSettings = Partial<Record<LangTag, Record<TranslationKey, string>>>;
|
|
2630
2691
|
|
|
2631
2692
|
/**
|
|
2632
|
-
* Preferred media delivery protocol
|
|
2633
|
-
* @
|
|
2693
|
+
* Preferred streaming media delivery protocol
|
|
2694
|
+
* @public
|
|
2634
2695
|
*/
|
|
2635
|
-
export declare type TransportPreference =
|
|
2636
|
-
|
|
2637
|
-
declare type UpDown = 'up' | 'down';
|
|
2696
|
+
export declare type TransportPreference = 'dash' | 'hls';
|
|
2638
2697
|
|
|
2639
2698
|
/**
|
|
2640
2699
|
* Version information about the gplayer and its main dependencies
|
|
@@ -2649,7 +2708,7 @@ export declare function version(): {
|
|
|
2649
2708
|
};
|
|
2650
2709
|
|
|
2651
2710
|
/**
|
|
2652
|
-
*
|
|
2711
|
+
* `PLUGIN` that applies fade effect to the player's volume change.
|
|
2653
2712
|
* @beta
|
|
2654
2713
|
*/
|
|
2655
2714
|
export declare class VolumeFade extends UICorePlugin {
|