@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/index.js
CHANGED
|
@@ -12470,7 +12470,7 @@ const EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs$1(eventemitter3Expor
|
|
|
12470
12470
|
|
|
12471
12471
|
/**
|
|
12472
12472
|
* A top-level event on the player object
|
|
12473
|
-
* @
|
|
12473
|
+
* @public
|
|
12474
12474
|
*/
|
|
12475
12475
|
var PlayerEvent;
|
|
12476
12476
|
(function (PlayerEvent) {
|
|
@@ -12605,7 +12605,7 @@ const DASHJS = /*@__PURE__*/getDefaultExportFromCjs$1(dash_all_minExports);
|
|
|
12605
12605
|
|
|
12606
12606
|
/**
|
|
12607
12607
|
* Codes of errors occurring within the playback component.
|
|
12608
|
-
* @
|
|
12608
|
+
* @public
|
|
12609
12609
|
*/
|
|
12610
12610
|
var PlaybackErrorCode;
|
|
12611
12611
|
(function (PlaybackErrorCode) {
|
|
@@ -42638,8 +42638,8 @@ const DEFAULT_OPTIONS = {
|
|
|
42638
42638
|
strings: {},
|
|
42639
42639
|
};
|
|
42640
42640
|
/**
|
|
42641
|
-
*
|
|
42642
|
-
* @
|
|
42641
|
+
* `MAIN` component to use in the application code.
|
|
42642
|
+
* @public
|
|
42643
42643
|
* @remarks
|
|
42644
42644
|
* The Player object provides very basic API to control playback.
|
|
42645
42645
|
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
|
@@ -42894,6 +42894,23 @@ class Player {
|
|
|
42894
42894
|
}
|
|
42895
42895
|
Loader.registerPlugin(plugin);
|
|
42896
42896
|
}
|
|
42897
|
+
/**
|
|
42898
|
+
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
42899
|
+
* @remarks
|
|
42900
|
+
* It can be also used to unregister a built-in default plugin.
|
|
42901
|
+
*
|
|
42902
|
+
* Currently, the plugins that are always registered are:
|
|
42903
|
+
*
|
|
42904
|
+
* - {@link https://github.com/clappr/clappr-core/blob/3126c3a38a6eee9d5aba3918b194e6380fa1178c/src/plugins/strings/strings.js | 'strings'}, which supports internationalization of the player UI
|
|
42905
|
+
*
|
|
42906
|
+
* - {@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
|
|
42907
|
+
*
|
|
42908
|
+
* @param name - name of the plugin
|
|
42909
|
+
*/
|
|
42910
|
+
static unregisterPlugin(name) {
|
|
42911
|
+
Player.corePlugins = Player.corePlugins.filter((p) => p.prototype.name !== name);
|
|
42912
|
+
Loader.unregisterPlugin(name);
|
|
42913
|
+
}
|
|
42897
42914
|
static getRegisteredPlugins() {
|
|
42898
42915
|
for (const plugin of Player.corePlugins) {
|
|
42899
42916
|
Loader.registerPlugin(plugin);
|
|
@@ -42901,18 +42918,6 @@ class Player {
|
|
|
42901
42918
|
return Loader.registeredPlugins;
|
|
42902
42919
|
}
|
|
42903
42920
|
static corePlugins = [];
|
|
42904
|
-
/**
|
|
42905
|
-
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
42906
|
-
* @param plugin - a plugin class
|
|
42907
|
-
*/
|
|
42908
|
-
static unregisterPlugin(plugin) {
|
|
42909
|
-
assert.ok(plugin.type === 'core' || plugin.type === 'container', 'Invalid plugin type');
|
|
42910
|
-
if (plugin.type === 'core') {
|
|
42911
|
-
Player.corePlugins = Player.corePlugins.filter((p) => p !== plugin);
|
|
42912
|
-
return;
|
|
42913
|
-
}
|
|
42914
|
-
Loader.unregisterPlugin(plugin);
|
|
42915
|
-
}
|
|
42916
42921
|
setConfig(config) {
|
|
42917
42922
|
this.config = $.extend(true, this.config, config);
|
|
42918
42923
|
}
|
|
@@ -43085,7 +43090,7 @@ class Player {
|
|
|
43085
43090
|
}
|
|
43086
43091
|
}
|
|
43087
43092
|
|
|
43088
|
-
var version$1 = "2.20.
|
|
43093
|
+
var version$1 = "2.20.11";
|
|
43089
43094
|
|
|
43090
43095
|
var packages = {
|
|
43091
43096
|
"node_modules/@clappr/core": {
|
|
@@ -43117,7 +43122,7 @@ const VERSION$6 = '0.0.1';
|
|
|
43117
43122
|
// const T = 'plugins.audio_selector';
|
|
43118
43123
|
const AUTO = 0;
|
|
43119
43124
|
/**
|
|
43120
|
-
*
|
|
43125
|
+
* `PLUGIN` that adds an audio track selector to the media control UI.
|
|
43121
43126
|
* @beta
|
|
43122
43127
|
*/
|
|
43123
43128
|
class AudioSelector extends UICorePlugin {
|
|
@@ -43421,7 +43426,7 @@ const pluginHtml$6 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <
|
|
|
43421
43426
|
const T$f = 'plugins.big_mute_button';
|
|
43422
43427
|
// TODO rewrite as a container plugin
|
|
43423
43428
|
/**
|
|
43424
|
-
*
|
|
43429
|
+
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
43425
43430
|
* Once pressed, it unmutes the video.
|
|
43426
43431
|
* @beta
|
|
43427
43432
|
*/
|
|
@@ -43456,7 +43461,6 @@ class BigMuteButton extends UICorePlugin {
|
|
|
43456
43461
|
* @internal
|
|
43457
43462
|
*/
|
|
43458
43463
|
bindEvents() {
|
|
43459
|
-
super.bindEvents();
|
|
43460
43464
|
this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
|
|
43461
43465
|
this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
|
|
43462
43466
|
this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
|
|
@@ -43574,9 +43578,6 @@ const gearHdIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\
|
|
|
43574
43578
|
/* eslint-disable */
|
|
43575
43579
|
// Kibo is released under the MIT License. Copyright (c) 2013 marquete.
|
|
43576
43580
|
// see https://github.com/marquete/kibo
|
|
43577
|
-
/**
|
|
43578
|
-
* @internal
|
|
43579
|
-
*/
|
|
43580
43581
|
class Kibo {
|
|
43581
43582
|
element;
|
|
43582
43583
|
lastKeyCode = -1;
|
|
@@ -43845,9 +43846,11 @@ const fullscreenOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
|
|
|
43845
43846
|
|
|
43846
43847
|
const fullscreenOnIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15.1568 23.15C15.7408 23.15 16.2142 22.6766 16.2142 22.0926V17.1947C16.2142 16.7253 16.5948 16.3447 17.0642 16.3447H21.9621C22.5461 16.3447 23.0195 15.8713 23.0195 15.2873C23.0195 14.7034 22.5461 14.2299 21.9621 14.2299H16.0642C14.9832 14.2299 14.0995 15.1137 14.0995 16.1947V22.0926C14.0995 22.6766 14.5729 23.15 15.1568 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M1.90739 10.7701H7.80528C8.88627 10.7701 9.77006 9.88627 9.77006 8.80528V2.90739C9.77006 2.32341 9.29665 1.85 8.71267 1.85C8.12869 1.85 7.65528 2.32341 7.65528 2.90739V7.80528C7.65528 8.27472 7.27472 8.65528 6.80528 8.65528H1.90739C1.32341 8.65528 0.85 9.12869 0.85 9.71267C0.85 10.2966 1.32341 10.7701 1.90739 10.7701Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M8.71261 23.15C9.29659 23.15 9.77 22.6766 9.77 22.0926V16.1947C9.77 15.1137 8.88621 14.2299 7.80521 14.2299H1.90733C1.32335 14.2299 0.849939 14.7034 0.849939 15.2873C0.849939 15.8713 1.32335 16.3447 1.90733 16.3447H6.80521C7.27466 16.3447 7.65521 16.7253 7.65521 17.1947V22.0926C7.65521 22.6766 8.12862 23.15 8.71261 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M21.9621 10.7701C22.5461 10.7701 23.0195 10.2966 23.0195 9.71267C23.0195 9.12869 22.5461 8.65528 21.9621 8.65528H17.0642C16.5948 8.65528 16.2142 8.27472 16.2142 7.80528V2.90739C16.2142 2.32341 15.7408 1.85 15.1568 1.85C14.5729 1.85 14.0995 2.32341 14.0995 2.90739V8.80528C14.0995 9.88627 14.9832 10.7701 16.0642 10.7701H21.9621Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n</svg>\n";
|
|
43847
43848
|
|
|
43849
|
+
// This is a derived work from the {@link https://github.com/clappr/clappr-plugins/tree/ffaa9d27005fa5a8a7c243ffc47eb5655b84b371/src/plugins/media_control | Clappr MediaControl plugin}
|
|
43850
|
+
// It is redistributed under the terms of the {@link ../../../../../LICENSE | Apache 2.0} license.
|
|
43848
43851
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
43849
43852
|
// Use of this source code is governed by a BSD-style
|
|
43850
|
-
// license that can be found in the LICENSE
|
|
43853
|
+
// license that can be found in the {@link https://github.com/clappr/clappr-plugins/blob/master/LICENSE | LICENSE}.
|
|
43851
43854
|
/**
|
|
43852
43855
|
* Custom events emitted by the plugins to communicate with one another
|
|
43853
43856
|
* @beta
|
|
@@ -43876,11 +43879,11 @@ function orderByOrderPattern(arr, order) {
|
|
|
43876
43879
|
return [...ordered, ...rest];
|
|
43877
43880
|
}
|
|
43878
43881
|
/**
|
|
43879
|
-
*
|
|
43882
|
+
* `PLUGIN` that provides a foundation for developing custom media controls UI.
|
|
43880
43883
|
* @beta
|
|
43881
43884
|
* @remarks
|
|
43882
43885
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
43883
|
-
* The plugin registration should be arranged so that MediaControl is initialized before every other
|
|
43886
|
+
* The plugin registration should be arranged so that MediaControl is initialized before every other `PLUGIN` that depends on it.
|
|
43884
43887
|
* @example
|
|
43885
43888
|
* ```ts
|
|
43886
43889
|
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
@@ -43958,14 +43961,14 @@ class MediaControl extends UICorePlugin {
|
|
|
43958
43961
|
}
|
|
43959
43962
|
/**
|
|
43960
43963
|
* @internal
|
|
43961
|
-
* @deprecated
|
|
43964
|
+
* @deprecated Use core.activeContainer directly
|
|
43962
43965
|
*/
|
|
43963
43966
|
get container() {
|
|
43964
43967
|
return this.core.activeContainer;
|
|
43965
43968
|
}
|
|
43966
43969
|
/**
|
|
43967
43970
|
* @internal
|
|
43968
|
-
* @deprecated
|
|
43971
|
+
* @deprecated Use core.activePlayback directly
|
|
43969
43972
|
*/
|
|
43970
43973
|
get playback() {
|
|
43971
43974
|
return this.core.activePlayback;
|
|
@@ -44668,6 +44671,16 @@ class MediaControl extends UICorePlugin {
|
|
|
44668
44671
|
getRightPanel() {
|
|
44669
44672
|
return this.$el.find('.media-control-right-panel');
|
|
44670
44673
|
}
|
|
44674
|
+
/**
|
|
44675
|
+
* Get the left panel area to append custom elements to
|
|
44676
|
+
* @returns ZeptoSelector of the left panel element
|
|
44677
|
+
*/
|
|
44678
|
+
getLeftPanel() {
|
|
44679
|
+
return this.$el.find('.media-control-left-panel');
|
|
44680
|
+
}
|
|
44681
|
+
getCenterPanel() {
|
|
44682
|
+
return this.$el.find('.media-control-center-panel');
|
|
44683
|
+
}
|
|
44671
44684
|
resetIndicators() {
|
|
44672
44685
|
assert.ok(this.$duration && this.$position, 'duration and position elements must be present');
|
|
44673
44686
|
this.displayedPosition = this.$position.text();
|
|
@@ -44944,7 +44957,7 @@ MediaControl.extend = function (properties) {
|
|
|
44944
44957
|
const VERSION$5 = '2.19.12';
|
|
44945
44958
|
const T$d = 'plugins.bottom_gear';
|
|
44946
44959
|
/**
|
|
44947
|
-
*
|
|
44960
|
+
* `PLUGIN` that adds the gear button with an extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
44948
44961
|
* @beta
|
|
44949
44962
|
* @remarks
|
|
44950
44963
|
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
@@ -46708,7 +46721,7 @@ class Speedtest {
|
|
|
46708
46721
|
this._state = 1;
|
|
46709
46722
|
}
|
|
46710
46723
|
if (this._state !== 1) {
|
|
46711
|
-
throw
|
|
46724
|
+
throw "You can't add a server after server selection";
|
|
46712
46725
|
}
|
|
46713
46726
|
this._settings.mpot = true;
|
|
46714
46727
|
this._serverList.push(server);
|
|
@@ -46727,7 +46740,7 @@ class Speedtest {
|
|
|
46727
46740
|
setSelectedServer(server) {
|
|
46728
46741
|
this._checkServerDefinition(server);
|
|
46729
46742
|
if (this._state === 3) {
|
|
46730
|
-
throw
|
|
46743
|
+
throw "You can't select a server while the test is running";
|
|
46731
46744
|
}
|
|
46732
46745
|
this._selectedServer = server;
|
|
46733
46746
|
this._state = 2;
|
|
@@ -46741,7 +46754,7 @@ class Speedtest {
|
|
|
46741
46754
|
throw 'Server already selected';
|
|
46742
46755
|
}
|
|
46743
46756
|
if (this._state >= 3) {
|
|
46744
|
-
throw
|
|
46757
|
+
throw "You can't select a server while the test is running";
|
|
46745
46758
|
}
|
|
46746
46759
|
}
|
|
46747
46760
|
if (this._selectServerCalled) {
|
|
@@ -46751,7 +46764,7 @@ class Speedtest {
|
|
|
46751
46764
|
this._selectServerCalled = true;
|
|
46752
46765
|
}
|
|
46753
46766
|
/*this function goes through a list of servers. For each server, the ping is measured, then the server with the function result is called with the best server, or null if all the servers were down.
|
|
46754
|
-
|
|
46767
|
+
*/
|
|
46755
46768
|
const select = (serverList, result) => {
|
|
46756
46769
|
//pings the specified URL, then calls the function result. Result will receive a parameter which is either the time it took to ping the URL, or -1 if something went wrong.
|
|
46757
46770
|
const PING_TIMEOUT = 2000;
|
|
@@ -46853,7 +46866,7 @@ class Speedtest {
|
|
|
46853
46866
|
}
|
|
46854
46867
|
result(bestServer);
|
|
46855
46868
|
};
|
|
46856
|
-
serverList.forEach(server => {
|
|
46869
|
+
serverList.forEach((server) => {
|
|
46857
46870
|
checkServer(server, done);
|
|
46858
46871
|
});
|
|
46859
46872
|
if (i === serverList.length) {
|
|
@@ -46946,12 +46959,12 @@ class Speedtest {
|
|
|
46946
46959
|
if (typeof this._originalExtra !== 'undefined') {
|
|
46947
46960
|
this._settings.telemetry_extra = JSON.stringify({
|
|
46948
46961
|
server: this._selectedServer.name,
|
|
46949
|
-
extra: this._originalExtra
|
|
46962
|
+
extra: this._originalExtra,
|
|
46950
46963
|
});
|
|
46951
46964
|
}
|
|
46952
46965
|
else {
|
|
46953
46966
|
this._settings.telemetry_extra = JSON.stringify({
|
|
46954
|
-
server: this._selectedServer.name
|
|
46967
|
+
server: this._selectedServer.name,
|
|
46955
46968
|
});
|
|
46956
46969
|
}
|
|
46957
46970
|
}
|
|
@@ -46961,7 +46974,7 @@ class Speedtest {
|
|
|
46961
46974
|
}
|
|
46962
46975
|
abort() {
|
|
46963
46976
|
if (this._state < 3) {
|
|
46964
|
-
throw new Error(
|
|
46977
|
+
throw new Error("You cannot abort a test that's not started yet");
|
|
46965
46978
|
}
|
|
46966
46979
|
if (this._state < 4) {
|
|
46967
46980
|
this.worker?.postMessage('abort');
|
|
@@ -47206,7 +47219,7 @@ const drawSummary = (customMetrics, vodContainer, liveContainer) => {
|
|
|
47206
47219
|
};
|
|
47207
47220
|
// const T = 'plugins.clappr_nerd_stats';
|
|
47208
47221
|
/**
|
|
47209
|
-
*
|
|
47222
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
47210
47223
|
* @beta
|
|
47211
47224
|
*
|
|
47212
47225
|
* @remarks
|
|
@@ -47466,7 +47479,7 @@ function newMetrics() {
|
|
|
47466
47479
|
// TODO: fix
|
|
47467
47480
|
const updateMetrics = () => { };
|
|
47468
47481
|
/**
|
|
47469
|
-
*
|
|
47482
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
47470
47483
|
* @beta
|
|
47471
47484
|
* @remarks
|
|
47472
47485
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -47529,9 +47542,10 @@ class ClapprStats extends ContainerPlugin {
|
|
|
47529
47542
|
}
|
|
47530
47543
|
/**
|
|
47531
47544
|
* Registers a callback to receive the metrics.
|
|
47532
|
-
* @param updateMetricsFn
|
|
47545
|
+
* @param updateMetricsFn - The callback to receive the metrics
|
|
47533
47546
|
*/
|
|
47534
47547
|
setUpdateMetrics(updateMetricsFn) {
|
|
47548
|
+
// TODO use events instead
|
|
47535
47549
|
this.updateFn = updateMetricsFn;
|
|
47536
47550
|
}
|
|
47537
47551
|
_defaultReport(metrics) {
|
|
@@ -47579,7 +47593,7 @@ class ClapprStats extends ContainerPlugin {
|
|
|
47579
47593
|
}
|
|
47580
47594
|
/**
|
|
47581
47595
|
* Returns the collected metrics.
|
|
47582
|
-
* @returns
|
|
47596
|
+
* @returns Currently collected metrics
|
|
47583
47597
|
*/
|
|
47584
47598
|
exportMetrics() {
|
|
47585
47599
|
return structuredClone(this.metrics);
|
|
@@ -47823,7 +47837,7 @@ class ClapprStats extends ContainerPlugin {
|
|
|
47823
47837
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE.
|
|
47824
47838
|
const T$c = 'plugins.click_to_pause_custom';
|
|
47825
47839
|
/**
|
|
47826
|
-
*
|
|
47840
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
47827
47841
|
* @beta
|
|
47828
47842
|
*/
|
|
47829
47843
|
class ClickToPause extends ContainerPlugin {
|
|
@@ -47898,7 +47912,7 @@ class ClickToPause extends ContainerPlugin {
|
|
|
47898
47912
|
}
|
|
47899
47913
|
|
|
47900
47914
|
/**
|
|
47901
|
-
*
|
|
47915
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
47902
47916
|
* @beta
|
|
47903
47917
|
* @remarks
|
|
47904
47918
|
* Depends on:
|
|
@@ -48055,7 +48069,7 @@ class ClipsPlugin extends UICorePlugin {
|
|
|
48055
48069
|
const templateHtml$1 = "<ul class=\"context-menu-list\">\n <% if(options) { %>\n <% for (var i = 0; i < options.length; i++) { %>\n <li class=\"context-menu-list-item <%= options[i].class %>\"\n data-<%= options[i].name %>><%= options[i].label %></li>\n <% } %>\n <% } %>\n</ul>\n";
|
|
48056
48070
|
|
|
48057
48071
|
/**
|
|
48058
|
-
*
|
|
48072
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
48059
48073
|
* @beta
|
|
48060
48074
|
* @remarks
|
|
48061
48075
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -48167,7 +48181,8 @@ const dvrHTML = "<div class=\"live-info\"><%= live %></div>\n<button type=\"butt
|
|
|
48167
48181
|
|
|
48168
48182
|
const T$b = 'plugins.dvr_controls';
|
|
48169
48183
|
/**
|
|
48170
|
-
*
|
|
48184
|
+
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
48185
|
+
*
|
|
48171
48186
|
* @beta
|
|
48172
48187
|
*
|
|
48173
48188
|
* @remarks
|
|
@@ -48175,7 +48190,9 @@ const T$b = 'plugins.dvr_controls';
|
|
|
48175
48190
|
*
|
|
48176
48191
|
* - {@link MediaControl}
|
|
48177
48192
|
*
|
|
48178
|
-
* The plugin renders
|
|
48193
|
+
* The plugin renders live stream indicator.
|
|
48194
|
+
* If DVR is enabled, the indicator shows whether the current position is at the live edge of the stream or not.
|
|
48195
|
+
* In the latter case, the indicator can be clicked to seek to the live edge.
|
|
48179
48196
|
*/
|
|
48180
48197
|
class DvrControls extends UICorePlugin {
|
|
48181
48198
|
static template = tmpl(dvrHTML);
|
|
@@ -48208,67 +48225,60 @@ class DvrControls extends UICorePlugin {
|
|
|
48208
48225
|
'data-dvr-controls': '',
|
|
48209
48226
|
};
|
|
48210
48227
|
}
|
|
48211
|
-
constructor(core) {
|
|
48212
|
-
super(core);
|
|
48213
|
-
this.settingsUpdate();
|
|
48214
|
-
}
|
|
48215
48228
|
/**
|
|
48216
48229
|
* @internal
|
|
48217
48230
|
*/
|
|
48218
48231
|
bindEvents() {
|
|
48232
|
+
this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
|
|
48233
|
+
this.listenTo(this.core, Events$1.CORE_OPTIONS_CHANGE, this.render);
|
|
48234
|
+
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.bindContainerEvents);
|
|
48235
|
+
}
|
|
48236
|
+
onCoreReady() {
|
|
48219
48237
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48220
48238
|
assert(mediaControl, 'media_control plugin is required');
|
|
48221
48239
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.settingsUpdate);
|
|
48222
|
-
this.
|
|
48223
|
-
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.bindContainerEvents);
|
|
48240
|
+
this.settingsUpdate();
|
|
48224
48241
|
}
|
|
48225
48242
|
bindContainerEvents() {
|
|
48226
48243
|
this.listenToOnce(this.core.activeContainer, Events$1.CONTAINER_TIMEUPDATE, this.render);
|
|
48227
48244
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDvrChanged);
|
|
48228
48245
|
}
|
|
48229
|
-
onDvrChanged(
|
|
48246
|
+
onDvrChanged(dvrInUse) {
|
|
48230
48247
|
trace(`${T$b} onDvrChanged`, {
|
|
48231
|
-
|
|
48248
|
+
dvrInUse,
|
|
48232
48249
|
});
|
|
48233
48250
|
if (this.core.getPlaybackType() !== Playback.LIVE) {
|
|
48234
48251
|
return;
|
|
48235
48252
|
}
|
|
48236
|
-
this.
|
|
48237
|
-
this.core.
|
|
48238
|
-
|
|
48239
|
-
|
|
48240
|
-
|
|
48253
|
+
this.render();
|
|
48254
|
+
const mediaControl = this.core.getPlugin('media_control');
|
|
48255
|
+
mediaControl.$el.addClass('live');
|
|
48256
|
+
if (dvrInUse) {
|
|
48257
|
+
mediaControl.$el
|
|
48241
48258
|
.addClass('dvr')
|
|
48242
|
-
.find(
|
|
48259
|
+
.find(
|
|
48260
|
+
// TODO add API, test
|
|
48261
|
+
'.media-control-indicator[data-position], .media-control-indicator[data-duration]')
|
|
48243
48262
|
.hide();
|
|
48244
48263
|
}
|
|
48245
48264
|
else {
|
|
48246
|
-
|
|
48265
|
+
mediaControl.$el.removeClass('dvr');
|
|
48247
48266
|
}
|
|
48248
48267
|
}
|
|
48249
48268
|
click() {
|
|
48250
|
-
const mediaControl = this.core.getPlugin('media_control');
|
|
48251
48269
|
const container = this.core.activeContainer;
|
|
48252
48270
|
if (!container.isPlaying()) {
|
|
48253
48271
|
container.play();
|
|
48254
48272
|
}
|
|
48255
|
-
|
|
48256
|
-
container.seek(container.getDuration());
|
|
48257
|
-
}
|
|
48273
|
+
container.seek(container.getDuration());
|
|
48258
48274
|
}
|
|
48259
48275
|
settingsUpdate() {
|
|
48260
|
-
|
|
48261
|
-
this.
|
|
48262
|
-
this.
|
|
48263
|
-
if (this.shouldRender()) {
|
|
48264
|
-
this.render();
|
|
48265
|
-
this.$el.click(() => this.click());
|
|
48266
|
-
}
|
|
48267
|
-
this.bindEvents();
|
|
48276
|
+
trace(`${T$b} settingsUpdate`);
|
|
48277
|
+
this.core.getPlugin('media_control').$el.removeClass('live');
|
|
48278
|
+
this.render();
|
|
48268
48279
|
}
|
|
48269
48280
|
shouldRender() {
|
|
48270
|
-
const useDvrControls = this.core.options.useDvrControls
|
|
48271
|
-
!!this.core.options.useDvrControls;
|
|
48281
|
+
const useDvrControls = this.core.options.useDvrControls !== false;
|
|
48272
48282
|
return useDvrControls && this.core.getPlaybackType() === Playback.LIVE;
|
|
48273
48283
|
}
|
|
48274
48284
|
/**
|
|
@@ -48277,6 +48287,7 @@ class DvrControls extends UICorePlugin {
|
|
|
48277
48287
|
render() {
|
|
48278
48288
|
trace(`${T$b} render`, {
|
|
48279
48289
|
dvrEnabled: this.core.activePlayback?.dvrEnabled,
|
|
48290
|
+
playbackType: this.core.getPlaybackType(),
|
|
48280
48291
|
});
|
|
48281
48292
|
if (!this.shouldRender()) {
|
|
48282
48293
|
return this;
|
|
@@ -48286,12 +48297,8 @@ class DvrControls extends UICorePlugin {
|
|
|
48286
48297
|
backToLive: this.core.i18n.t('back_to_live'),
|
|
48287
48298
|
}));
|
|
48288
48299
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48289
|
-
assert(mediaControl, 'media_control plugin is required');
|
|
48290
|
-
// TODO don't tap into the $el directly
|
|
48291
48300
|
mediaControl.$el.addClass('live');
|
|
48292
|
-
mediaControl
|
|
48293
|
-
.$('.media-control-left-panel[data-media-control]')
|
|
48294
|
-
.append(this.$el);
|
|
48301
|
+
mediaControl.getLeftPanel().append(this.$el);
|
|
48295
48302
|
return this;
|
|
48296
48303
|
}
|
|
48297
48304
|
}
|
|
@@ -48302,7 +48309,7 @@ const templateHtml = "<div class=\"player-error-screen__content\" data-error-scr
|
|
|
48302
48309
|
|
|
48303
48310
|
const T$a = 'plugins.error_screen';
|
|
48304
48311
|
/**
|
|
48305
|
-
*
|
|
48312
|
+
* `PLUGIN` that displays errors nicely in the overlay on top of the player.
|
|
48306
48313
|
* @beta
|
|
48307
48314
|
*/
|
|
48308
48315
|
class ErrorScreen extends UICorePlugin {
|
|
@@ -48416,7 +48423,7 @@ const FAVICON_COLOR = '#567';
|
|
|
48416
48423
|
const FAVICON_SELECTOR = 'link[rel="shortcut icon"]';
|
|
48417
48424
|
// const oldIcon = $(FAVICON_SELECTOR);
|
|
48418
48425
|
/**
|
|
48419
|
-
*
|
|
48426
|
+
* `PLUGIN` that adds custom favicon to the player's tab.
|
|
48420
48427
|
* @beta
|
|
48421
48428
|
*/
|
|
48422
48429
|
class Favicon extends CorePlugin {
|
|
@@ -48522,7 +48529,7 @@ class Favicon extends CorePlugin {
|
|
|
48522
48529
|
// Use of this source code is governed by a BSD-style
|
|
48523
48530
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
48524
48531
|
/**
|
|
48525
|
-
*
|
|
48532
|
+
* `PLUGIN` that integrates with Google Analytics
|
|
48526
48533
|
* @beta
|
|
48527
48534
|
*/
|
|
48528
48535
|
class GoogleAnalytics extends ContainerPlugin {
|
|
@@ -48650,7 +48657,7 @@ const checkIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"
|
|
|
48650
48657
|
const T$9 = 'plugins.level_selector';
|
|
48651
48658
|
const VERSION$4 = '2.19.4';
|
|
48652
48659
|
/**
|
|
48653
|
-
*
|
|
48660
|
+
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
48654
48661
|
* @beta
|
|
48655
48662
|
*
|
|
48656
48663
|
* @remarks
|
|
@@ -48660,9 +48667,7 @@ const VERSION$4 = '2.19.4';
|
|
|
48660
48667
|
*
|
|
48661
48668
|
* - {@link BottomGear}
|
|
48662
48669
|
*
|
|
48663
|
-
* The plugin is rendered as an item in the gear menu.
|
|
48664
|
-
*
|
|
48665
|
-
* When clicked, it shows a list of quality levels to choose from.
|
|
48670
|
+
* The plugin is rendered as an item in the gear menu, which, when clicked, shows a list of quality levels to choose from.
|
|
48666
48671
|
*
|
|
48667
48672
|
* Configuration options - {@link LevelSelectorPluginSettings}
|
|
48668
48673
|
*
|
|
@@ -48987,7 +48992,7 @@ function calculateSize(original) {
|
|
|
48987
48992
|
const logoHTML = "<div class=\"clappr-logo control-need-disable\">\n <img class=\"clappr-logo-img\"/>\n</div>\n";
|
|
48988
48993
|
|
|
48989
48994
|
/**
|
|
48990
|
-
*
|
|
48995
|
+
* `PLUGIN` that adds custom logo to the player.
|
|
48991
48996
|
* @beta
|
|
48992
48997
|
*/
|
|
48993
48998
|
class Logo extends UIContainerPlugin {
|
|
@@ -49174,7 +49179,7 @@ const streamsWhiteNightsIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:
|
|
|
49174
49179
|
const VERSION$3 = '0.0.1';
|
|
49175
49180
|
const T$8 = 'plugins.multicamera';
|
|
49176
49181
|
/**
|
|
49177
|
-
*
|
|
49182
|
+
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
49178
49183
|
* @beta
|
|
49179
49184
|
*/
|
|
49180
49185
|
class MultiCamera extends UICorePlugin {
|
|
@@ -49527,7 +49532,7 @@ const buttonHtml$1 = "<button class=\"gplayer-lite-btn gcore-skin-button-color\"
|
|
|
49527
49532
|
const VERSION$2 = '0.0.1';
|
|
49528
49533
|
const T$7 = `plugins.pip`;
|
|
49529
49534
|
/**
|
|
49530
|
-
*
|
|
49535
|
+
* `PLUGIN` that enables picture in picture mode.
|
|
49531
49536
|
* @beta
|
|
49532
49537
|
* @remarks
|
|
49533
49538
|
* Depends on:
|
|
@@ -49633,7 +49638,7 @@ const DEFAULT_PLAYBACK_RATES = [
|
|
|
49633
49638
|
const DEFAULT_PLAYBACK_RATE = '1.0';
|
|
49634
49639
|
const T$6 = 'plugins.playback_rate';
|
|
49635
49640
|
/**
|
|
49636
|
-
* PLUGIN that allows changing the playback speed of the video.
|
|
49641
|
+
* `PLUGIN` that allows changing the playback speed of the video.
|
|
49637
49642
|
* @beta
|
|
49638
49643
|
*
|
|
49639
49644
|
* @remarks
|
|
@@ -49841,9 +49846,9 @@ const posterHTML = "<div class=\"play-wrapper\" data-poster></div>\n";
|
|
|
49841
49846
|
//Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
49842
49847
|
// Use of this source code is governed by a BSD-style
|
|
49843
49848
|
// license that can be found in the LICENSE file.
|
|
49844
|
-
const T$5 = 'plugins.
|
|
49849
|
+
const T$5 = 'plugins.poster';
|
|
49845
49850
|
/**
|
|
49846
|
-
*
|
|
49851
|
+
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
49847
49852
|
* @beta
|
|
49848
49853
|
* @remarks
|
|
49849
49854
|
* When the playback is stopped, media control UI is disabled.
|
|
@@ -49879,7 +49884,7 @@ class Poster extends UIContainerPlugin {
|
|
|
49879
49884
|
* @internal
|
|
49880
49885
|
*/
|
|
49881
49886
|
get name() {
|
|
49882
|
-
return '
|
|
49887
|
+
return 'poster';
|
|
49883
49888
|
}
|
|
49884
49889
|
/**
|
|
49885
49890
|
* @internal
|
|
@@ -50120,7 +50125,7 @@ const seekTimeHTML = "<span data-seek-time></span>\n<span data-duration></span>\
|
|
|
50120
50125
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
50121
50126
|
const { formatTime } = Utils;
|
|
50122
50127
|
/**
|
|
50123
|
-
*
|
|
50128
|
+
* `PLUGIN` that adds a seek time indicator to the media control UI.
|
|
50124
50129
|
* @beta
|
|
50125
50130
|
*/
|
|
50126
50131
|
class SeekTime extends UICorePlugin {
|
|
@@ -50280,7 +50285,8 @@ const fbIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"32px\"
|
|
|
50280
50285
|
const twIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"32px\" height=\"32px\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->\n <title>twitter</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"twitter\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\" id=\"Shape\">\n <path d=\"M32,30 C32,31.104 31.104,32 30,32 L2,32 C0.896,32 0,31.104 0,30 L0,2 C0,0.896 0.896,0 2,0 L30,0 C31.104,0 32,0.896 32,2 L32,30 Z\" fill=\"#55ACEE\"></path>\n <path class=\"icon-hover\" d=\"M25.987,9.894 C25.251,10.216 24.462,10.431 23.63,10.529 C24.48,10.031 25.13,9.24 25.436,8.298 C24.644,8.759 23.766,9.095 22.831,9.276 C22.083,8.491 21.017,8 19.838,8 C17.572,8 15.738,9.807 15.738,12.038 C15.738,12.352 15.774,12.663 15.842,12.96 C12.435,12.788 9.413,11.181 7.39,8.739 C7.038,9.336 6.834,10.029 6.834,10.771 C6.834,12.17 7.56,13.406 8.658,14.131 C7.987,14.109 7.354,13.928 6.802,13.625 C6.801,13.642 6.801,13.659 6.801,13.677 C6.801,15.632 8.215,17.266 10.091,17.637 C9.748,17.727 9.386,17.779 9.01,17.779 C8.746,17.779 8.49,17.755 8.24,17.707 C8.76,19.311 10.274,20.478 12.068,20.512 C10.67,21.594 8.9,22.24 6.979,22.24 C6.649,22.24 6.321,22.222 6,22.184 C7.814,23.329 9.971,23.997 12.287,23.997 C19.828,23.997 23.953,17.843 23.953,12.506 C23.953,12.333 23.948,12.156 23.941,11.985 C24.741,11.414 25.438,10.703 25.987,9.894 Z\" fill=\"#FFFFFF\"></path>\n </g>\n </g>\n</svg>";
|
|
50281
50286
|
|
|
50282
50287
|
/**
|
|
50283
|
-
*
|
|
50288
|
+
* `PLUGIN` that adds a share button to the media control UI.
|
|
50289
|
+
* @beta
|
|
50284
50290
|
*/
|
|
50285
50291
|
class Share extends UICorePlugin {
|
|
50286
50292
|
hide = false;
|
|
@@ -50400,7 +50406,8 @@ class Share extends UICorePlugin {
|
|
|
50400
50406
|
const pluginHtml$1 = "<div class=\"skip-container\" data-skip-container>\n <div class=\"skip-item\" data-skip-left>\n </div>\n <div class=\"skip-item\" data-skip-mid>\n </div>\n <div class=\"skip-item\" data-skip-right>\n </div>\n</div>\n";
|
|
50401
50407
|
|
|
50402
50408
|
/**
|
|
50403
|
-
*
|
|
50409
|
+
* `PLUGIN` that adds skip controls to the media control UI.
|
|
50410
|
+
* @beta
|
|
50404
50411
|
*/
|
|
50405
50412
|
class SkipTime extends UICorePlugin {
|
|
50406
50413
|
get name() {
|
|
@@ -50493,6 +50500,7 @@ const spinnerHTML = "<div data-bounce1></div>\n<div data-bounce2></div>\n<div da
|
|
|
50493
50500
|
const T$4 = 'plugins.spinner';
|
|
50494
50501
|
/**
|
|
50495
50502
|
* Custom events emitted by the plugin
|
|
50503
|
+
* @beta
|
|
50496
50504
|
*/
|
|
50497
50505
|
var SpinnerEvents;
|
|
50498
50506
|
(function (SpinnerEvents) {
|
|
@@ -50503,10 +50511,12 @@ var SpinnerEvents;
|
|
|
50503
50511
|
SpinnerEvents["SYNC"] = "plugins:spinner:sync";
|
|
50504
50512
|
})(SpinnerEvents || (SpinnerEvents = {}));
|
|
50505
50513
|
/**
|
|
50506
|
-
*
|
|
50514
|
+
* `PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state
|
|
50507
50515
|
* @beta
|
|
50508
50516
|
* @remarks
|
|
50509
|
-
*
|
|
50517
|
+
* Events emitted- {@link SpinnerEvents}
|
|
50518
|
+
* Other plugins can use {@link SpinnerThreeBounce.show | show} and {@link SpinnerThreeBounce.hide | hide} methods to
|
|
50519
|
+
* implement custom pending/progress indication scenarios.
|
|
50510
50520
|
*/
|
|
50511
50521
|
class SpinnerThreeBounce extends UIContainerPlugin {
|
|
50512
50522
|
userShown = false;
|
|
@@ -50586,7 +50596,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50586
50596
|
/**
|
|
50587
50597
|
* Shows the spinner.
|
|
50588
50598
|
*
|
|
50589
|
-
* When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce
|
|
50599
|
+
* When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce.hide} is called
|
|
50590
50600
|
*/
|
|
50591
50601
|
show(delay = 300) {
|
|
50592
50602
|
trace(`${T$4} show`);
|
|
@@ -50655,7 +50665,7 @@ function noSync(cb) {
|
|
|
50655
50665
|
queueMicrotask(cb);
|
|
50656
50666
|
}
|
|
50657
50667
|
/**
|
|
50658
|
-
*
|
|
50668
|
+
* `PLUGIN` that is responsible for managing the automatic failover between sources.
|
|
50659
50669
|
* @beta
|
|
50660
50670
|
* @remarks
|
|
50661
50671
|
* Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details
|
|
@@ -50767,7 +50777,7 @@ class SourceController extends CorePlugin {
|
|
|
50767
50777
|
}
|
|
50768
50778
|
this.bindContainerEventListeners();
|
|
50769
50779
|
if (this.active) {
|
|
50770
|
-
this.core.activeContainer?.getPlugin('
|
|
50780
|
+
this.core.activeContainer?.getPlugin('poster')?.disable();
|
|
50771
50781
|
spinner?.show(0);
|
|
50772
50782
|
}
|
|
50773
50783
|
}
|
|
@@ -50788,7 +50798,7 @@ class SourceController extends CorePlugin {
|
|
|
50788
50798
|
}
|
|
50789
50799
|
switch (error.code) {
|
|
50790
50800
|
case PlaybackErrorCode.MediaSourceUnavailable:
|
|
50791
|
-
this.core.activeContainer?.getPlugin('
|
|
50801
|
+
this.core.activeContainer?.getPlugin('poster')?.disable();
|
|
50792
50802
|
this.retryPlayback();
|
|
50793
50803
|
break;
|
|
50794
50804
|
}
|
|
@@ -50800,7 +50810,7 @@ class SourceController extends CorePlugin {
|
|
|
50800
50810
|
});
|
|
50801
50811
|
if (this.active) {
|
|
50802
50812
|
this.reset();
|
|
50803
|
-
this.core.activeContainer?.getPlugin('
|
|
50813
|
+
this.core.activeContainer?.getPlugin('poster')?.enable();
|
|
50804
50814
|
this.core.activeContainer?.getPlugin('spinner')?.hide();
|
|
50805
50815
|
}
|
|
50806
50816
|
});
|
|
@@ -50867,7 +50877,7 @@ const LOCAL_STORAGE_SUBTITLES_ID = 'gplayer.plugins.subtitles.selected';
|
|
|
50867
50877
|
const T$2 = 'plugins.subtitles';
|
|
50868
50878
|
const NO_TRACK = { language: 'off' };
|
|
50869
50879
|
/**
|
|
50870
|
-
*
|
|
50880
|
+
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
50871
50881
|
* @beta
|
|
50872
50882
|
*
|
|
50873
50883
|
* @remarks
|
|
@@ -51244,7 +51254,7 @@ var TelemetryEvent;
|
|
|
51244
51254
|
TelemetryEvent[TelemetryEvent["Stall"] = 4] = "Stall";
|
|
51245
51255
|
})(TelemetryEvent || (TelemetryEvent = {}));
|
|
51246
51256
|
/**
|
|
51247
|
-
*
|
|
51257
|
+
* `PLUGIN` that collects and reports the performance statistics.
|
|
51248
51258
|
* @beta
|
|
51249
51259
|
* @remarks
|
|
51250
51260
|
* This plugin is experimental and its API is likely to change.
|
|
@@ -51524,7 +51534,7 @@ const pluginHtml = "<div class=\"thumbnails-text\"></div>\n<% if (backdropHeight
|
|
|
51524
51534
|
|
|
51525
51535
|
const T = 'plugins.thumbnails';
|
|
51526
51536
|
/**
|
|
51527
|
-
*
|
|
51537
|
+
* `PLUGIN` that displays the thumbnails of the video when available.
|
|
51528
51538
|
* @beta
|
|
51529
51539
|
* @example
|
|
51530
51540
|
* ```ts
|
|
@@ -51973,7 +51983,7 @@ var VolumeFadeEvents;
|
|
|
51973
51983
|
VolumeFadeEvents["FADE"] = "core:volume:fade";
|
|
51974
51984
|
})(VolumeFadeEvents || (VolumeFadeEvents = {}));
|
|
51975
51985
|
/**
|
|
51976
|
-
*
|
|
51986
|
+
* `PLUGIN` that applies fade effect to the player's volume change.
|
|
51977
51987
|
* @beta
|
|
51978
51988
|
*/
|
|
51979
51989
|
class VolumeFade extends UICorePlugin {
|
|
@@ -52068,4 +52078,4 @@ class VolumeFade extends UICorePlugin {
|
|
|
52068
52078
|
}
|
|
52069
52079
|
}
|
|
52070
52080
|
|
|
52071
|
-
export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DvrControls, ErrorScreen, Favicon, GoogleAnalytics,
|
|
52081
|
+
export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DvrControls, ErrorScreen, Favicon, GoogleAnalytics, LevelSelector, LogTracer, Logger, Logo, MediaControl, MediaControlEvents, MultiCamera, PictureInPicture, PlaybackErrorCode, PlaybackRate, Player, PlayerEvent, Poster, SeekTime, SentryTracer, Share, SkipTime, SourceController, SpinnerEvents, SpinnerThreeBounce, Subtitles, Telemetry, TelemetryEvent, Thumbnails, VolumeFade, VolumeFadeEvents, reportError, setTracer, trace, version };
|