@gcorevideo/player 2.20.9 → 2.20.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/dvr-controls/dvr_controls.scss +0 -2
- package/dist/core.js +5 -5
- package/dist/index.css +1212 -1215
- package/dist/index.js +74 -71
- package/dist/player.d.ts +103 -96
- package/dist/plugins/index.css +668 -671
- package/dist/plugins/index.js +69 -67
- package/docs/api/player.audioselector.md +1 -1
- package/docs/api/player.bigmutebutton.md +1 -1
- package/docs/api/player.bottomgear.md +1 -1
- package/docs/api/player.clapprnerdstats.md +1 -1
- package/docs/api/player.clapprstats.md +1 -1
- package/docs/api/player.clicktopause.md +1 -1
- package/docs/api/player.clipsplugin.md +1 -1
- package/docs/api/player.containerpluginconstructor.md +3 -5
- package/docs/api/player.containersize.md +0 -3
- package/docs/api/player.contextmenu.md +1 -1
- package/docs/api/player.corepluginconstructor.md +3 -5
- package/docs/api/player.dashsettings.md +0 -3
- package/docs/api/player.dvrcontrols.md +2 -35
- package/docs/api/player.errorlevel.md +0 -3
- package/docs/api/player.errorscreen.md +1 -1
- package/docs/api/player.favicon.md +1 -1
- package/docs/api/player.googleanalytics.md +1 -1
- package/docs/api/player.langtag.md +0 -3
- package/docs/api/player.levelselector.md +1 -1
- package/docs/api/player.logo.md +1 -1
- package/docs/api/player.md +69 -80
- package/docs/api/player.mediacontrol.md +2 -2
- package/docs/api/player.multicamera.md +1 -1
- package/docs/api/player.pictureinpicture.md +1 -1
- package/docs/api/player.playbackerror.code.md +0 -3
- package/docs/api/player.playbackerror.description.md +0 -3
- package/docs/api/player.playbackerror.level.md +0 -3
- package/docs/api/player.playbackerror.md +8 -11
- package/docs/api/player.playbackerror.message.md +0 -3
- package/docs/api/player.playbackerror.origin.md +0 -3
- package/docs/api/player.playbackerror.scope.md +0 -3
- package/docs/api/player.playbackerror.ui.md +1 -3
- package/docs/api/player.playbackerrorcode.md +3 -6
- package/docs/api/player.playbackmodule.md +0 -3
- package/docs/api/player.playbackrate.md +1 -1
- package/docs/api/player.playbacktype.md +1 -4
- package/docs/api/player.player._constructor_.md +0 -3
- package/docs/api/player.player.attachto.md +0 -3
- package/docs/api/player.player.configure.md +0 -3
- package/docs/api/player.player.destroy.md +0 -3
- package/docs/api/player.player.getcurrenttime.md +0 -3
- package/docs/api/player.player.getduration.md +0 -3
- package/docs/api/player.player.getvolume.md +0 -3
- package/docs/api/player.player.isdvrenabled.md +0 -3
- package/docs/api/player.player.isdvrinuse.md +0 -3
- package/docs/api/player.player.ismuted.md +0 -3
- package/docs/api/player.player.isplaying.md +0 -3
- package/docs/api/player.player.md +25 -28
- package/docs/api/player.player.mute.md +0 -3
- package/docs/api/player.player.off.md +0 -3
- package/docs/api/player.player.on.md +0 -3
- package/docs/api/player.player.pause.md +0 -3
- package/docs/api/player.player.play.md +0 -3
- package/docs/api/player.player.registerplugin.md +0 -3
- package/docs/api/player.player.resize.md +0 -3
- package/docs/api/player.player.seek.md +0 -3
- package/docs/api/player.player.setvolume.md +0 -3
- package/docs/api/player.player.stop.md +0 -3
- package/docs/api/player.player.unmute.md +0 -3
- package/docs/api/player.player.unregisterplugin.md +14 -7
- package/docs/api/player.playercomponenttype.md +0 -3
- package/docs/api/player.playerconfig.autoplay.md +0 -3
- package/docs/api/player.playerconfig.dash.md +0 -3
- package/docs/api/player.playerconfig.debug.md +0 -3
- package/docs/api/player.playerconfig.language.md +0 -3
- package/docs/api/player.playerconfig.loop.md +0 -3
- package/docs/api/player.playerconfig.md +10 -13
- package/docs/api/player.playerconfig.mute.md +0 -3
- package/docs/api/player.playerconfig.playbacktype.md +0 -3
- package/docs/api/player.playerconfig.prioritytransport.md +0 -3
- package/docs/api/player.playerconfig.sources.md +0 -3
- package/docs/api/player.playerconfig.strings.md +0 -3
- package/docs/api/player.playerdebugsettings.md +0 -3
- package/docs/api/player.playerdebugtag.md +0 -3
- package/docs/api/player.playerevent.md +11 -14
- package/docs/api/player.playereventhandler.md +0 -3
- package/docs/api/player.playereventparams.md +0 -3
- package/docs/api/player.playermediasource.md +0 -3
- package/docs/api/player.playermediasourcedesc.md +2 -5
- package/docs/api/player.playermediasourcedesc.mimetype.md +0 -3
- package/docs/api/player.playermediasourcedesc.source.md +0 -3
- package/docs/api/player.playerplugin.md +0 -4
- package/docs/api/player.playerpluginconstructor.md +0 -3
- package/docs/api/player.poster.md +1 -1
- package/docs/api/player.qualitylevel.bitrate.md +0 -3
- package/docs/api/player.qualitylevel.height.md +0 -3
- package/docs/api/player.qualitylevel.level.md +0 -3
- package/docs/api/player.qualitylevel.md +4 -7
- package/docs/api/player.qualitylevel.width.md +0 -3
- package/docs/api/player.seektime.md +1 -1
- package/docs/api/player.share.md +1 -1
- package/docs/api/player.skiptime.md +1 -1
- package/docs/api/player.sourcecontroller.md +1 -1
- package/docs/api/player.spinnerthreebounce.md +1 -1
- package/docs/api/player.subtitles.md +1 -1
- package/docs/api/player.telemetry.md +1 -1
- package/docs/api/player.thumbnails.md +1 -1
- package/docs/api/player.timeposition.current.md +0 -3
- package/docs/api/player.timeposition.md +2 -5
- package/docs/api/player.timeposition.total.md +0 -3
- package/docs/api/player.timevalue.md +0 -3
- package/docs/api/player.translationkey.md +0 -3
- package/docs/api/player.translationsettings.md +0 -3
- package/docs/api/player.transportpreference.md +2 -7
- package/docs/api/player.volumefade.md +1 -1
- package/lib/Player.d.ts +5 -5
- package/lib/Player.js +2 -2
- package/lib/index.d.ts +18 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -1
- package/lib/playback.types.d.ts +8 -7
- package/lib/playback.types.d.ts.map +1 -1
- package/lib/playback.types.js +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +1 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.d.ts +1 -1
- package/lib/plugins/clips/Clips.js +1 -1
- package/lib/plugins/context-menu/ContextMenu.d.ts +1 -1
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +6 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +28 -36
- package/lib/plugins/error-screen/ErrorScreen.d.ts +1 -18
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +1 -1
- package/lib/plugins/favicon/Favicon.d.ts +1 -1
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +1 -1
- package/lib/plugins/level-selector/LevelSelector.d.ts +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +1 -1
- package/lib/plugins/logo/Logo.d.ts +1 -1
- package/lib/plugins/logo/Logo.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +8 -2
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +15 -3
- package/lib/plugins/multi-camera/MultiCamera.d.ts +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +1 -1
- package/lib/plugins/poster/Poster.d.ts +1 -1
- package/lib/plugins/poster/Poster.js +1 -1
- package/lib/plugins/seek-time/SeekTime.d.ts +1 -1
- package/lib/plugins/seek-time/SeekTime.js +1 -1
- package/lib/plugins/share/Share.d.ts +1 -1
- package/lib/plugins/share/Share.js +1 -1
- package/lib/plugins/skip-time/SkipTime.d.ts +1 -1
- package/lib/plugins/skip-time/SkipTime.js +1 -1
- package/lib/plugins/source-controller/SourceController.d.ts +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
- package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
- package/lib/plugins/subtitles/Subtitles.js +1 -1
- package/lib/plugins/telemetry/Telemetry.d.ts +1 -1
- package/lib/plugins/telemetry/Telemetry.js +1 -1
- package/lib/plugins/thumbnails/Thumbnails.d.ts +1 -1
- package/lib/plugins/thumbnails/Thumbnails.js +1 -1
- package/lib/plugins/volume-fade/VolumeFade.d.ts +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +1 -1
- package/lib/testUtils.d.ts +11 -2
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +22 -3
- package/lib/types.d.ts +20 -25
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -1
- package/package.json +1 -1
- package/src/Player.ts +5 -5
- package/src/index.ts +18 -1
- package/src/playback.types.ts +8 -7
- package/src/plugins/audio-selector/AudioSelector.ts +1 -1
- package/src/plugins/big-mute-button/BigMuteButton.ts +1 -2
- package/src/plugins/bottom-gear/BottomGear.ts +1 -1
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +1 -1
- package/src/plugins/clappr-stats/ClapprStats.ts +1 -1
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/clips/Clips.ts +1 -1
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +33 -45
- package/src/plugins/dvr-controls/__tests__/DvrControls.test.ts +91 -0
- package/src/plugins/dvr-controls/__tests__/__snapshots__/DvrControls.test.ts.snap +43 -0
- package/src/plugins/error-screen/ErrorScreen.ts +3 -21
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/level-selector/LevelSelector.ts +1 -1
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +17 -3
- package/src/plugins/multi-camera/MultiCamera.ts +1 -1
- package/src/plugins/picture-in-picture/PictureInPicture.ts +1 -1
- package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
- package/src/plugins/poster/Poster.ts +1 -1
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/share/Share.ts +1 -1
- package/src/plugins/skip-time/SkipTime.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +1 -1
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +1 -1
- package/src/plugins/telemetry/Telemetry.ts +1 -1
- package/src/plugins/thumbnails/Thumbnails.ts +1 -1
- package/src/plugins/volume-fade/VolumeFade.ts +1 -1
- package/src/testUtils.ts +28 -4
- package/src/types.ts +20 -26
- package/temp/player.api.json +181 -251
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.dvrcontrols._constructor_.md +0 -50
- package/docs/api/player.errordesc.md +0 -28
- package/docs/api/player.mediatransport.md +0 -16
package/dist/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.
|
|
@@ -43090,7 +43090,7 @@ class Player {
|
|
|
43090
43090
|
}
|
|
43091
43091
|
}
|
|
43092
43092
|
|
|
43093
|
-
var version$1 = "2.20.
|
|
43093
|
+
var version$1 = "2.20.11";
|
|
43094
43094
|
|
|
43095
43095
|
var packages = {
|
|
43096
43096
|
"node_modules/@clappr/core": {
|
|
@@ -43122,7 +43122,7 @@ const VERSION$6 = '0.0.1';
|
|
|
43122
43122
|
// const T = 'plugins.audio_selector';
|
|
43123
43123
|
const AUTO = 0;
|
|
43124
43124
|
/**
|
|
43125
|
-
*
|
|
43125
|
+
* `PLUGIN` that adds an audio track selector to the media control UI.
|
|
43126
43126
|
* @beta
|
|
43127
43127
|
*/
|
|
43128
43128
|
class AudioSelector extends UICorePlugin {
|
|
@@ -43426,7 +43426,7 @@ const pluginHtml$6 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <
|
|
|
43426
43426
|
const T$f = 'plugins.big_mute_button';
|
|
43427
43427
|
// TODO rewrite as a container plugin
|
|
43428
43428
|
/**
|
|
43429
|
-
*
|
|
43429
|
+
* `PLUGIN` that displays a big mute button over the video when it's muted.
|
|
43430
43430
|
* Once pressed, it unmutes the video.
|
|
43431
43431
|
* @beta
|
|
43432
43432
|
*/
|
|
@@ -43461,7 +43461,6 @@ class BigMuteButton extends UICorePlugin {
|
|
|
43461
43461
|
* @internal
|
|
43462
43462
|
*/
|
|
43463
43463
|
bindEvents() {
|
|
43464
|
-
super.bindEvents();
|
|
43465
43464
|
this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
|
|
43466
43465
|
this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
|
|
43467
43466
|
this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
|
|
@@ -43847,9 +43846,11 @@ const fullscreenOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
|
|
|
43847
43846
|
|
|
43848
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";
|
|
43849
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.
|
|
43850
43851
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
43851
43852
|
// Use of this source code is governed by a BSD-style
|
|
43852
|
-
// 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}.
|
|
43853
43854
|
/**
|
|
43854
43855
|
* Custom events emitted by the plugins to communicate with one another
|
|
43855
43856
|
* @beta
|
|
@@ -43878,11 +43879,11 @@ function orderByOrderPattern(arr, order) {
|
|
|
43878
43879
|
return [...ordered, ...rest];
|
|
43879
43880
|
}
|
|
43880
43881
|
/**
|
|
43881
|
-
* PLUGIN that provides a foundation for developing custom media controls UI.
|
|
43882
|
+
* `PLUGIN` that provides a foundation for developing custom media controls UI.
|
|
43882
43883
|
* @beta
|
|
43883
43884
|
* @remarks
|
|
43884
43885
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
43885
|
-
* 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.
|
|
43886
43887
|
* @example
|
|
43887
43888
|
* ```ts
|
|
43888
43889
|
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
@@ -44670,6 +44671,16 @@ class MediaControl extends UICorePlugin {
|
|
|
44670
44671
|
getRightPanel() {
|
|
44671
44672
|
return this.$el.find('.media-control-right-panel');
|
|
44672
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
|
+
}
|
|
44673
44684
|
resetIndicators() {
|
|
44674
44685
|
assert.ok(this.$duration && this.$position, 'duration and position elements must be present');
|
|
44675
44686
|
this.displayedPosition = this.$position.text();
|
|
@@ -44946,7 +44957,7 @@ MediaControl.extend = function (properties) {
|
|
|
44946
44957
|
const VERSION$5 = '2.19.12';
|
|
44947
44958
|
const T$d = 'plugins.bottom_gear';
|
|
44948
44959
|
/**
|
|
44949
|
-
*
|
|
44960
|
+
* `PLUGIN` that adds the gear button with an extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
44950
44961
|
* @beta
|
|
44951
44962
|
* @remarks
|
|
44952
44963
|
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
@@ -47208,7 +47219,7 @@ const drawSummary = (customMetrics, vodContainer, liveContainer) => {
|
|
|
47208
47219
|
};
|
|
47209
47220
|
// const T = 'plugins.clappr_nerd_stats';
|
|
47210
47221
|
/**
|
|
47211
|
-
* PLUGIN that displays useful network-related statistics.
|
|
47222
|
+
* `PLUGIN` that displays useful network-related statistics.
|
|
47212
47223
|
* @beta
|
|
47213
47224
|
*
|
|
47214
47225
|
* @remarks
|
|
@@ -47468,7 +47479,7 @@ function newMetrics() {
|
|
|
47468
47479
|
// TODO: fix
|
|
47469
47480
|
const updateMetrics = () => { };
|
|
47470
47481
|
/**
|
|
47471
|
-
*
|
|
47482
|
+
* `PLUGIN` that collects useful statistics about playback performance.
|
|
47472
47483
|
* @beta
|
|
47473
47484
|
* @remarks
|
|
47474
47485
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -47826,7 +47837,7 @@ class ClapprStats extends ContainerPlugin {
|
|
|
47826
47837
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE.
|
|
47827
47838
|
const T$c = 'plugins.click_to_pause_custom';
|
|
47828
47839
|
/**
|
|
47829
|
-
*
|
|
47840
|
+
* `PLUGIN` that adds a behavior of toggling the playback state on click over the container
|
|
47830
47841
|
* @beta
|
|
47831
47842
|
*/
|
|
47832
47843
|
class ClickToPause extends ContainerPlugin {
|
|
@@ -47901,7 +47912,7 @@ class ClickToPause extends ContainerPlugin {
|
|
|
47901
47912
|
}
|
|
47902
47913
|
|
|
47903
47914
|
/**
|
|
47904
|
-
* PLUGIN that shows text over the seekbar to indicate the current clip.
|
|
47915
|
+
* `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
47905
47916
|
* @beta
|
|
47906
47917
|
* @remarks
|
|
47907
47918
|
* Depends on:
|
|
@@ -48058,7 +48069,7 @@ class ClipsPlugin extends UICorePlugin {
|
|
|
48058
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";
|
|
48059
48070
|
|
|
48060
48071
|
/**
|
|
48061
|
-
*
|
|
48072
|
+
* `PLUGIN` that displays a small context menu when clicked on the player container.
|
|
48062
48073
|
* @beta
|
|
48063
48074
|
* @remarks
|
|
48064
48075
|
* Configuration options - {@link ContextMenuPluginSettings}
|
|
@@ -48170,7 +48181,7 @@ const dvrHTML = "<div class=\"live-info\"><%= live %></div>\n<button type=\"butt
|
|
|
48170
48181
|
|
|
48171
48182
|
const T$b = 'plugins.dvr_controls';
|
|
48172
48183
|
/**
|
|
48173
|
-
* PLUGIN that adds the DVR controls to the media control UI
|
|
48184
|
+
* `PLUGIN` that adds the DVR controls to the media control UI
|
|
48174
48185
|
*
|
|
48175
48186
|
* @beta
|
|
48176
48187
|
*
|
|
@@ -48179,7 +48190,9 @@ const T$b = 'plugins.dvr_controls';
|
|
|
48179
48190
|
*
|
|
48180
48191
|
* - {@link MediaControl}
|
|
48181
48192
|
*
|
|
48182
|
-
* The plugin renders live stream indicator
|
|
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.
|
|
48183
48196
|
*/
|
|
48184
48197
|
class DvrControls extends UICorePlugin {
|
|
48185
48198
|
static template = tmpl(dvrHTML);
|
|
@@ -48212,67 +48225,60 @@ class DvrControls extends UICorePlugin {
|
|
|
48212
48225
|
'data-dvr-controls': '',
|
|
48213
48226
|
};
|
|
48214
48227
|
}
|
|
48215
|
-
constructor(core) {
|
|
48216
|
-
super(core);
|
|
48217
|
-
this.settingsUpdate();
|
|
48218
|
-
}
|
|
48219
48228
|
/**
|
|
48220
48229
|
* @internal
|
|
48221
48230
|
*/
|
|
48222
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() {
|
|
48223
48237
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48224
48238
|
assert(mediaControl, 'media_control plugin is required');
|
|
48225
48239
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.settingsUpdate);
|
|
48226
|
-
this.
|
|
48227
|
-
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.bindContainerEvents);
|
|
48240
|
+
this.settingsUpdate();
|
|
48228
48241
|
}
|
|
48229
48242
|
bindContainerEvents() {
|
|
48230
48243
|
this.listenToOnce(this.core.activeContainer, Events$1.CONTAINER_TIMEUPDATE, this.render);
|
|
48231
48244
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDvrChanged);
|
|
48232
48245
|
}
|
|
48233
|
-
onDvrChanged(
|
|
48246
|
+
onDvrChanged(dvrInUse) {
|
|
48234
48247
|
trace(`${T$b} onDvrChanged`, {
|
|
48235
|
-
|
|
48248
|
+
dvrInUse,
|
|
48236
48249
|
});
|
|
48237
48250
|
if (this.core.getPlaybackType() !== Playback.LIVE) {
|
|
48238
48251
|
return;
|
|
48239
48252
|
}
|
|
48240
|
-
this.
|
|
48241
|
-
this.core.
|
|
48242
|
-
|
|
48243
|
-
|
|
48244
|
-
|
|
48253
|
+
this.render();
|
|
48254
|
+
const mediaControl = this.core.getPlugin('media_control');
|
|
48255
|
+
mediaControl.$el.addClass('live');
|
|
48256
|
+
if (dvrInUse) {
|
|
48257
|
+
mediaControl.$el
|
|
48245
48258
|
.addClass('dvr')
|
|
48246
|
-
.find(
|
|
48259
|
+
.find(
|
|
48260
|
+
// TODO add API, test
|
|
48261
|
+
'.media-control-indicator[data-position], .media-control-indicator[data-duration]')
|
|
48247
48262
|
.hide();
|
|
48248
48263
|
}
|
|
48249
48264
|
else {
|
|
48250
|
-
|
|
48265
|
+
mediaControl.$el.removeClass('dvr');
|
|
48251
48266
|
}
|
|
48252
48267
|
}
|
|
48253
48268
|
click() {
|
|
48254
|
-
const mediaControl = this.core.getPlugin('media_control');
|
|
48255
48269
|
const container = this.core.activeContainer;
|
|
48256
48270
|
if (!container.isPlaying()) {
|
|
48257
48271
|
container.play();
|
|
48258
48272
|
}
|
|
48259
|
-
|
|
48260
|
-
container.seek(container.getDuration());
|
|
48261
|
-
}
|
|
48273
|
+
container.seek(container.getDuration());
|
|
48262
48274
|
}
|
|
48263
48275
|
settingsUpdate() {
|
|
48264
|
-
|
|
48265
|
-
this.
|
|
48266
|
-
this.
|
|
48267
|
-
if (this.shouldRender()) {
|
|
48268
|
-
this.render();
|
|
48269
|
-
this.$el.click(() => this.click());
|
|
48270
|
-
}
|
|
48271
|
-
this.bindEvents();
|
|
48276
|
+
trace(`${T$b} settingsUpdate`);
|
|
48277
|
+
this.core.getPlugin('media_control').$el.removeClass('live');
|
|
48278
|
+
this.render();
|
|
48272
48279
|
}
|
|
48273
48280
|
shouldRender() {
|
|
48274
|
-
const useDvrControls = this.core.options.useDvrControls
|
|
48275
|
-
!!this.core.options.useDvrControls;
|
|
48281
|
+
const useDvrControls = this.core.options.useDvrControls !== false;
|
|
48276
48282
|
return useDvrControls && this.core.getPlaybackType() === Playback.LIVE;
|
|
48277
48283
|
}
|
|
48278
48284
|
/**
|
|
@@ -48281,6 +48287,7 @@ class DvrControls extends UICorePlugin {
|
|
|
48281
48287
|
render() {
|
|
48282
48288
|
trace(`${T$b} render`, {
|
|
48283
48289
|
dvrEnabled: this.core.activePlayback?.dvrEnabled,
|
|
48290
|
+
playbackType: this.core.getPlaybackType(),
|
|
48284
48291
|
});
|
|
48285
48292
|
if (!this.shouldRender()) {
|
|
48286
48293
|
return this;
|
|
@@ -48290,12 +48297,8 @@ class DvrControls extends UICorePlugin {
|
|
|
48290
48297
|
backToLive: this.core.i18n.t('back_to_live'),
|
|
48291
48298
|
}));
|
|
48292
48299
|
const mediaControl = this.core.getPlugin('media_control');
|
|
48293
|
-
assert(mediaControl, 'media_control plugin is required');
|
|
48294
|
-
// TODO don't tap into the $el directly
|
|
48295
48300
|
mediaControl.$el.addClass('live');
|
|
48296
|
-
mediaControl
|
|
48297
|
-
.$('.media-control-left-panel[data-media-control]')
|
|
48298
|
-
.append(this.$el);
|
|
48301
|
+
mediaControl.getLeftPanel().append(this.$el);
|
|
48299
48302
|
return this;
|
|
48300
48303
|
}
|
|
48301
48304
|
}
|
|
@@ -48306,7 +48309,7 @@ const templateHtml = "<div class=\"player-error-screen__content\" data-error-scr
|
|
|
48306
48309
|
|
|
48307
48310
|
const T$a = 'plugins.error_screen';
|
|
48308
48311
|
/**
|
|
48309
|
-
* PLUGIN that displays errors nicely in the overlay on top of the player.
|
|
48312
|
+
* `PLUGIN` that displays errors nicely in the overlay on top of the player.
|
|
48310
48313
|
* @beta
|
|
48311
48314
|
*/
|
|
48312
48315
|
class ErrorScreen extends UICorePlugin {
|
|
@@ -48420,7 +48423,7 @@ const FAVICON_COLOR = '#567';
|
|
|
48420
48423
|
const FAVICON_SELECTOR = 'link[rel="shortcut icon"]';
|
|
48421
48424
|
// const oldIcon = $(FAVICON_SELECTOR);
|
|
48422
48425
|
/**
|
|
48423
|
-
*
|
|
48426
|
+
* `PLUGIN` that adds custom favicon to the player's tab.
|
|
48424
48427
|
* @beta
|
|
48425
48428
|
*/
|
|
48426
48429
|
class Favicon extends CorePlugin {
|
|
@@ -48526,7 +48529,7 @@ class Favicon extends CorePlugin {
|
|
|
48526
48529
|
// Use of this source code is governed by a BSD-style
|
|
48527
48530
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
48528
48531
|
/**
|
|
48529
|
-
*
|
|
48532
|
+
* `PLUGIN` that integrates with Google Analytics
|
|
48530
48533
|
* @beta
|
|
48531
48534
|
*/
|
|
48532
48535
|
class GoogleAnalytics extends ContainerPlugin {
|
|
@@ -48654,7 +48657,7 @@ const checkIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"
|
|
|
48654
48657
|
const T$9 = 'plugins.level_selector';
|
|
48655
48658
|
const VERSION$4 = '2.19.4';
|
|
48656
48659
|
/**
|
|
48657
|
-
* PLUGIN that provides a UI to select the desired quality level of the playback.
|
|
48660
|
+
* `PLUGIN` that provides a UI to select the desired quality level of the playback.
|
|
48658
48661
|
* @beta
|
|
48659
48662
|
*
|
|
48660
48663
|
* @remarks
|
|
@@ -48989,7 +48992,7 @@ function calculateSize(original) {
|
|
|
48989
48992
|
const logoHTML = "<div class=\"clappr-logo control-need-disable\">\n <img class=\"clappr-logo-img\"/>\n</div>\n";
|
|
48990
48993
|
|
|
48991
48994
|
/**
|
|
48992
|
-
*
|
|
48995
|
+
* `PLUGIN` that adds custom logo to the player.
|
|
48993
48996
|
* @beta
|
|
48994
48997
|
*/
|
|
48995
48998
|
class Logo extends UIContainerPlugin {
|
|
@@ -49176,7 +49179,7 @@ const streamsWhiteNightsIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:
|
|
|
49176
49179
|
const VERSION$3 = '0.0.1';
|
|
49177
49180
|
const T$8 = 'plugins.multicamera';
|
|
49178
49181
|
/**
|
|
49179
|
-
* PLUGIN that adds support for loading multiple streams and switching between them using the media control UI.
|
|
49182
|
+
* `PLUGIN` that adds support for loading multiple streams and switching between them using the media control UI.
|
|
49180
49183
|
* @beta
|
|
49181
49184
|
*/
|
|
49182
49185
|
class MultiCamera extends UICorePlugin {
|
|
@@ -49529,7 +49532,7 @@ const buttonHtml$1 = "<button class=\"gplayer-lite-btn gcore-skin-button-color\"
|
|
|
49529
49532
|
const VERSION$2 = '0.0.1';
|
|
49530
49533
|
const T$7 = `plugins.pip`;
|
|
49531
49534
|
/**
|
|
49532
|
-
*
|
|
49535
|
+
* `PLUGIN` that enables picture in picture mode.
|
|
49533
49536
|
* @beta
|
|
49534
49537
|
* @remarks
|
|
49535
49538
|
* Depends on:
|
|
@@ -49635,7 +49638,7 @@ const DEFAULT_PLAYBACK_RATES = [
|
|
|
49635
49638
|
const DEFAULT_PLAYBACK_RATE = '1.0';
|
|
49636
49639
|
const T$6 = 'plugins.playback_rate';
|
|
49637
49640
|
/**
|
|
49638
|
-
* PLUGIN that allows changing the playback speed of the video.
|
|
49641
|
+
* `PLUGIN` that allows changing the playback speed of the video.
|
|
49639
49642
|
* @beta
|
|
49640
49643
|
*
|
|
49641
49644
|
* @remarks
|
|
@@ -49845,7 +49848,7 @@ const posterHTML = "<div class=\"play-wrapper\" data-poster></div>\n";
|
|
|
49845
49848
|
// license that can be found in the LICENSE file.
|
|
49846
49849
|
const T$5 = 'plugins.poster';
|
|
49847
49850
|
/**
|
|
49848
|
-
*
|
|
49851
|
+
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
49849
49852
|
* @beta
|
|
49850
49853
|
* @remarks
|
|
49851
49854
|
* When the playback is stopped, media control UI is disabled.
|
|
@@ -50122,7 +50125,7 @@ const seekTimeHTML = "<span data-seek-time></span>\n<span data-duration></span>\
|
|
|
50122
50125
|
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
50123
50126
|
const { formatTime } = Utils;
|
|
50124
50127
|
/**
|
|
50125
|
-
*
|
|
50128
|
+
* `PLUGIN` that adds a seek time indicator to the media control UI.
|
|
50126
50129
|
* @beta
|
|
50127
50130
|
*/
|
|
50128
50131
|
class SeekTime extends UICorePlugin {
|
|
@@ -50282,7 +50285,7 @@ const fbIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"32px\"
|
|
|
50282
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>";
|
|
50283
50286
|
|
|
50284
50287
|
/**
|
|
50285
|
-
* PLUGIN that adds a share button to the media control UI.
|
|
50288
|
+
* `PLUGIN` that adds a share button to the media control UI.
|
|
50286
50289
|
* @beta
|
|
50287
50290
|
*/
|
|
50288
50291
|
class Share extends UICorePlugin {
|
|
@@ -50403,7 +50406,7 @@ class Share extends UICorePlugin {
|
|
|
50403
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";
|
|
50404
50407
|
|
|
50405
50408
|
/**
|
|
50406
|
-
* PLUGIN that adds skip controls to the media control UI.
|
|
50409
|
+
* `PLUGIN` that adds skip controls to the media control UI.
|
|
50407
50410
|
* @beta
|
|
50408
50411
|
*/
|
|
50409
50412
|
class SkipTime extends UICorePlugin {
|
|
@@ -50508,7 +50511,7 @@ var SpinnerEvents;
|
|
|
50508
50511
|
SpinnerEvents["SYNC"] = "plugins:spinner:sync";
|
|
50509
50512
|
})(SpinnerEvents || (SpinnerEvents = {}));
|
|
50510
50513
|
/**
|
|
50511
|
-
* PLUGIN that shows a pending operation indicator when playback is buffering or in a similar state
|
|
50514
|
+
* `PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state
|
|
50512
50515
|
* @beta
|
|
50513
50516
|
* @remarks
|
|
50514
50517
|
* Events emitted- {@link SpinnerEvents}
|
|
@@ -50662,7 +50665,7 @@ function noSync(cb) {
|
|
|
50662
50665
|
queueMicrotask(cb);
|
|
50663
50666
|
}
|
|
50664
50667
|
/**
|
|
50665
|
-
*
|
|
50668
|
+
* `PLUGIN` that is responsible for managing the automatic failover between sources.
|
|
50666
50669
|
* @beta
|
|
50667
50670
|
* @remarks
|
|
50668
50671
|
* Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details
|
|
@@ -50874,7 +50877,7 @@ const LOCAL_STORAGE_SUBTITLES_ID = 'gplayer.plugins.subtitles.selected';
|
|
|
50874
50877
|
const T$2 = 'plugins.subtitles';
|
|
50875
50878
|
const NO_TRACK = { language: 'off' };
|
|
50876
50879
|
/**
|
|
50877
|
-
*
|
|
50880
|
+
* `PLUGIN` that provides a UI to select the subtitles when available.
|
|
50878
50881
|
* @beta
|
|
50879
50882
|
*
|
|
50880
50883
|
* @remarks
|
|
@@ -51251,7 +51254,7 @@ var TelemetryEvent;
|
|
|
51251
51254
|
TelemetryEvent[TelemetryEvent["Stall"] = 4] = "Stall";
|
|
51252
51255
|
})(TelemetryEvent || (TelemetryEvent = {}));
|
|
51253
51256
|
/**
|
|
51254
|
-
* PLUGIN that collects and reports the performance statistics.
|
|
51257
|
+
* `PLUGIN` that collects and reports the performance statistics.
|
|
51255
51258
|
* @beta
|
|
51256
51259
|
* @remarks
|
|
51257
51260
|
* This plugin is experimental and its API is likely to change.
|
|
@@ -51531,7 +51534,7 @@ const pluginHtml = "<div class=\"thumbnails-text\"></div>\n<% if (backdropHeight
|
|
|
51531
51534
|
|
|
51532
51535
|
const T = 'plugins.thumbnails';
|
|
51533
51536
|
/**
|
|
51534
|
-
*
|
|
51537
|
+
* `PLUGIN` that displays the thumbnails of the video when available.
|
|
51535
51538
|
* @beta
|
|
51536
51539
|
* @example
|
|
51537
51540
|
* ```ts
|
|
@@ -51980,7 +51983,7 @@ var VolumeFadeEvents;
|
|
|
51980
51983
|
VolumeFadeEvents["FADE"] = "core:volume:fade";
|
|
51981
51984
|
})(VolumeFadeEvents || (VolumeFadeEvents = {}));
|
|
51982
51985
|
/**
|
|
51983
|
-
*
|
|
51986
|
+
* `PLUGIN` that applies fade effect to the player's volume change.
|
|
51984
51987
|
* @beta
|
|
51985
51988
|
*/
|
|
51986
51989
|
class VolumeFade extends UICorePlugin {
|