@gcorevideo/player 2.20.8 → 2.20.9
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/dist/core.js +18 -13
- package/dist/index.css +1541 -1541
- package/dist/index.js +59 -52
- package/dist/player.d.ts +178 -126
- package/dist/plugins/index.css +665 -665
- package/dist/plugins/index.js +42 -40
- package/docs/api/player.bottomgear.md +14 -0
- 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.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 +19 -0
- package/docs/api/{player.errorscreen.render.md → player.corepluginconstructor.md} +7 -6
- package/docs/api/player.errordesc.md +28 -0
- package/docs/api/player.errorscreen.md +1 -220
- package/docs/api/{player.errorscreen.bindevents.md → player.errorscreenpluginsettings.md} +7 -7
- package/docs/api/player.levelselector.md +3 -9
- package/docs/api/player.levelselectorpluginsettings.labels.md +24 -0
- package/docs/api/player.levelselectorpluginsettings.md +79 -0
- package/docs/api/player.levelselectorpluginsettings.restrictresolution.md +16 -0
- package/docs/api/player.md +93 -16
- package/docs/api/{player.errorscreen.hide.md → player.mediacontrol.currentseekpos.md} +3 -7
- package/docs/api/player.mediacontrol.disable.md +1 -1
- package/docs/api/player.mediacontrol.md +23 -2
- package/docs/api/{player.gearevents.md → player.mediacontrolevents.md} +4 -4
- package/docs/api/player.multicamera.md +1 -29
- package/docs/api/player.playbackerror.md +19 -0
- package/docs/api/{player.errorscreen.supportedversion.md → player.playbackerror.ui.md} +7 -4
- package/docs/api/player.playbackerrorcode.md +3 -3
- package/docs/api/{player.errorscreen.show.md → player.playbackrate._constructor_.md} +7 -11
- package/docs/api/player.playbackrate.md +35 -2
- package/docs/api/player.player.registerplugin.md +2 -2
- package/docs/api/player.player.unregisterplugin.md +2 -2
- package/docs/api/player.playerpluginconstructor.md +17 -0
- 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.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.telemetry.md +1 -1
- package/docs/api/player.telemetrypluginsettings.md +1 -1
- package/docs/api/{player.errorscreen.unbindevents.md → player.telemetrysendfn.md} +6 -6
- package/lib/Player.d.ts +13 -4
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +17 -12
- 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.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/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +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/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.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +3 -2
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +3 -2
- package/lib/plugins/error-screen/ErrorScreen.d.ts +12 -1
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.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/media-control/MediaControl.d.ts +4 -4
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +3 -3
- 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/poster/Poster.js +2 -2
- 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.js +3 -3
- 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/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/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/types.d.ts +21 -5
- package/lib/types.d.ts.map +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 +18 -16
- package/src/index.core.ts +0 -1
- package/src/index.plugins.ts +0 -1
- package/src/playback/hls-playback/HlsPlayback.ts +7 -11
- package/src/plugins/audio-selector/AudioSelector.ts +1 -1
- package/src/plugins/big-mute-button/BigMuteButton.ts +1 -1
- package/src/plugins/bottom-gear/BottomGear.ts +1 -1
- 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/clips/Clips.ts +4 -3
- package/src/plugins/context-menu/ContextMenu.ts +0 -2
- package/src/plugins/dvr-controls/DvrControls.ts +3 -2
- package/src/plugins/error-screen/ErrorScreen.ts +12 -1
- package/src/plugins/favicon/Favicon.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 +1 -1
- package/src/plugins/media-control/MediaControl.ts +4 -4
- package/src/plugins/multi-camera/MultiCamera.ts +4 -4
- package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
- package/src/plugins/poster/Poster.ts +3 -3
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/share/Share.ts +2 -1
- package/src/plugins/skip-time/SkipTime.ts +2 -1
- package/src/plugins/source-controller/SourceController.ts +3 -3
- 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 +1 -1
- package/src/plugins/telemetry/Telemetry.ts +2 -2
- package/src/plugins/thumbnails/Thumbnails.ts +1 -1
- 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/types.ts +24 -5
- package/src/utils/types.ts +0 -8
- package/temp/player.api.json +540 -576
- 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.container.md +0 -14
- package/docs/api/player.errorscreen.name.md +0 -14
- package/docs/api/player.errorscreen.template.md +0 -14
- package/docs/api/player.multicamera.getcameraslist.md +0 -18
- package/docs/api/player.multicamera.getcurrentcamera.md +0 -18
package/dist/player.d.ts
CHANGED
|
@@ -218,13 +218,18 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
218
218
|
* @internal
|
|
219
219
|
*/
|
|
220
220
|
render(): this;
|
|
221
|
-
|
|
221
|
+
/**
|
|
222
|
+
* Re-renders the gear menu.
|
|
223
|
+
* It fires the {@link MediaControlEvents.MEDIACONTROL_GEAR_RENDERED | MEDIACONTROL_GEAR_RENDERED} event,
|
|
224
|
+
* which the plugins that attach to the gear menu can listen to to re-render themselves.
|
|
225
|
+
*/
|
|
226
|
+
refresh(): void;
|
|
222
227
|
private toggleGearMenu;
|
|
223
228
|
private hide;
|
|
224
229
|
}
|
|
225
230
|
|
|
226
231
|
/**
|
|
227
|
-
*
|
|
232
|
+
* PLUGIN that displays useful network-related statistics.
|
|
228
233
|
* @beta
|
|
229
234
|
*
|
|
230
235
|
* @remarks
|
|
@@ -302,7 +307,7 @@ export declare class ClapprNerdStats extends UICorePlugin {
|
|
|
302
307
|
}
|
|
303
308
|
|
|
304
309
|
/**
|
|
305
|
-
*
|
|
310
|
+
* PLIGIN that collects useful statistics about playback performance.
|
|
306
311
|
* @beta
|
|
307
312
|
* @remarks
|
|
308
313
|
* This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
|
|
@@ -338,7 +343,7 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
338
343
|
private _stop;
|
|
339
344
|
/**
|
|
340
345
|
* Registers a callback to receive the metrics.
|
|
341
|
-
* @param updateMetricsFn
|
|
346
|
+
* @param updateMetricsFn - The callback to receive the metrics
|
|
342
347
|
*/
|
|
343
348
|
setUpdateMetrics(updateMetricsFn: MetricsUpdateFn): void;
|
|
344
349
|
private _defaultReport;
|
|
@@ -353,10 +358,10 @@ export declare class ClapprStats extends ContainerPlugin {
|
|
|
353
358
|
destroy(): void;
|
|
354
359
|
/**
|
|
355
360
|
* Returns the collected metrics.
|
|
356
|
-
* @returns
|
|
361
|
+
* @returns Currently collected metrics
|
|
357
362
|
*/
|
|
358
363
|
exportMetrics(): Metrics;
|
|
359
|
-
onBitrate
|
|
364
|
+
private onBitrate;
|
|
360
365
|
private stopReporting;
|
|
361
366
|
private startTimers;
|
|
362
367
|
private onFirstPlaying;
|
|
@@ -408,7 +413,7 @@ export declare class ClickToPause extends ContainerPlugin {
|
|
|
408
413
|
}
|
|
409
414
|
|
|
410
415
|
/**
|
|
411
|
-
*
|
|
416
|
+
* PLUGIN that shows text over the seekbar to indicate the current clip.
|
|
412
417
|
* @beta
|
|
413
418
|
* @remarks
|
|
414
419
|
* Depends on:
|
|
@@ -455,7 +460,8 @@ export declare class ClipsPlugin extends UICorePlugin {
|
|
|
455
460
|
}
|
|
456
461
|
|
|
457
462
|
/**
|
|
458
|
-
* Configuration options
|
|
463
|
+
* Configuration options for the {@link ClipsPlugin | clips} plugin.
|
|
464
|
+
* @beta
|
|
459
465
|
*/
|
|
460
466
|
export declare interface ClipsPluginSettings {
|
|
461
467
|
/**
|
|
@@ -464,6 +470,13 @@ export declare interface ClipsPluginSettings {
|
|
|
464
470
|
text: string;
|
|
465
471
|
}
|
|
466
472
|
|
|
473
|
+
/**
|
|
474
|
+
* @beta
|
|
475
|
+
*/
|
|
476
|
+
export declare type ContainerPluginConstructor = ((container: unknown) => PlayerPlugin) & {
|
|
477
|
+
type: 'container';
|
|
478
|
+
};
|
|
479
|
+
|
|
467
480
|
/**
|
|
468
481
|
* Dimensions of the player container DOM element.
|
|
469
482
|
* @beta
|
|
@@ -539,6 +552,13 @@ export declare interface ContextMenuPluginSettings {
|
|
|
539
552
|
preventShowContextMenu?: boolean;
|
|
540
553
|
}
|
|
541
554
|
|
|
555
|
+
/**
|
|
556
|
+
* @beta
|
|
557
|
+
*/
|
|
558
|
+
export declare type CorePluginConstructor = ((core: unknown) => PlayerPlugin) & {
|
|
559
|
+
type: 'core';
|
|
560
|
+
};
|
|
561
|
+
|
|
542
562
|
/**
|
|
543
563
|
* A plain JS object that must conform to the DASH.js settings schema.
|
|
544
564
|
* @beta
|
|
@@ -588,7 +608,7 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
588
608
|
*/
|
|
589
609
|
bindEvents(): void;
|
|
590
610
|
private bindContainerEvents;
|
|
591
|
-
private
|
|
611
|
+
private onDvrChanged;
|
|
592
612
|
private click;
|
|
593
613
|
private settingsUpdate;
|
|
594
614
|
private shouldRender;
|
|
@@ -598,6 +618,24 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
598
618
|
render(): this;
|
|
599
619
|
}
|
|
600
620
|
|
|
621
|
+
/**
|
|
622
|
+
* An error fired in the player and plugins code to be handled in the UI
|
|
623
|
+
* @beta
|
|
624
|
+
*/
|
|
625
|
+
export declare type ErrorDesc = {
|
|
626
|
+
description: string;
|
|
627
|
+
level: string;
|
|
628
|
+
code: string;
|
|
629
|
+
origin: string;
|
|
630
|
+
scope: string;
|
|
631
|
+
raw?: string;
|
|
632
|
+
UI?: {
|
|
633
|
+
icon?: string;
|
|
634
|
+
title: string;
|
|
635
|
+
message: string;
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
|
|
601
639
|
/**
|
|
602
640
|
* Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
603
641
|
* @beta
|
|
@@ -605,43 +643,61 @@ export declare class DvrControls extends UICorePlugin {
|
|
|
605
643
|
export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
|
|
606
644
|
|
|
607
645
|
/**
|
|
608
|
-
*
|
|
646
|
+
* PLUGIN that displays errors nicely in the overlay on top of the player.
|
|
609
647
|
* @beta
|
|
610
648
|
*/
|
|
611
649
|
export declare class ErrorScreen extends UICorePlugin {
|
|
612
|
-
private _retry;
|
|
613
650
|
private err;
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
651
|
+
/**
|
|
652
|
+
* @internal
|
|
653
|
+
*/
|
|
617
654
|
get name(): string;
|
|
655
|
+
/**
|
|
656
|
+
* @internal
|
|
657
|
+
*/
|
|
618
658
|
get supportedVersion(): {
|
|
619
659
|
min: string;
|
|
620
660
|
};
|
|
621
|
-
|
|
622
|
-
|
|
661
|
+
private static readonly template;
|
|
662
|
+
/**
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
623
665
|
get attributes(): {
|
|
624
666
|
class: string;
|
|
625
667
|
'data-error-screen': string;
|
|
626
668
|
};
|
|
669
|
+
/**
|
|
670
|
+
* @internal
|
|
671
|
+
*/
|
|
627
672
|
bindEvents(): void;
|
|
628
|
-
private onCoreReady;
|
|
629
673
|
private onPlay;
|
|
630
|
-
private
|
|
631
|
-
|
|
632
|
-
|
|
674
|
+
private unmount;
|
|
675
|
+
/**
|
|
676
|
+
* @internal
|
|
677
|
+
*/
|
|
678
|
+
get events(): {
|
|
679
|
+
'click .player-error-screen__reload': string;
|
|
680
|
+
};
|
|
633
681
|
private reload;
|
|
634
|
-
private
|
|
635
|
-
private onContainerChanged;
|
|
636
|
-
private onStartAd;
|
|
637
|
-
private onFinishAd;
|
|
682
|
+
private onActiveContainerChanged;
|
|
638
683
|
private onError;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
684
|
+
/**
|
|
685
|
+
* @internal
|
|
686
|
+
*/
|
|
642
687
|
render(): this;
|
|
643
688
|
}
|
|
644
689
|
|
|
690
|
+
/**
|
|
691
|
+
* Configuration options for the {@link ErrorScreen | error screen} plugin.
|
|
692
|
+
* @beta
|
|
693
|
+
*/
|
|
694
|
+
export declare type ErrorScreenPluginSettings = {
|
|
695
|
+
/**
|
|
696
|
+
* Whether to hide the reload button.
|
|
697
|
+
*/
|
|
698
|
+
noReload?: boolean;
|
|
699
|
+
};
|
|
700
|
+
|
|
645
701
|
/**
|
|
646
702
|
* The plugin adds custom favicon to the player's tab.
|
|
647
703
|
* @beta
|
|
@@ -669,17 +725,6 @@ export declare class Favicon extends CorePlugin {
|
|
|
669
725
|
private changeIcon;
|
|
670
726
|
}
|
|
671
727
|
|
|
672
|
-
/**
|
|
673
|
-
* Custom events emitted by the plugin
|
|
674
|
-
* @beta
|
|
675
|
-
*/
|
|
676
|
-
export declare enum GearEvents {
|
|
677
|
-
/**
|
|
678
|
-
* Emitted when the gear menu is rendered
|
|
679
|
-
*/
|
|
680
|
-
MEDIACONTROL_GEAR_RENDERED = "mediacontrol:gear:rendered"
|
|
681
|
-
}
|
|
682
|
-
|
|
683
728
|
/**
|
|
684
729
|
* An element inside the gear menu
|
|
685
730
|
* @beta
|
|
@@ -727,31 +772,6 @@ export declare interface InitEventData {
|
|
|
727
772
|
event: TelemetryEvent.Init;
|
|
728
773
|
}
|
|
729
774
|
|
|
730
|
-
declare type KeyboardEventHandler = (e: KeyboardEvent) => boolean | undefined;
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* @internal
|
|
734
|
-
*/
|
|
735
|
-
export declare class Kibo {
|
|
736
|
-
private element;
|
|
737
|
-
private lastKeyCode;
|
|
738
|
-
private lastModifiers;
|
|
739
|
-
private keysDown;
|
|
740
|
-
private keysUp;
|
|
741
|
-
private downHandler;
|
|
742
|
-
private upHandler;
|
|
743
|
-
constructor(element?: Document | Element);
|
|
744
|
-
private handler;
|
|
745
|
-
private registerKeys;
|
|
746
|
-
private unregisterKeys;
|
|
747
|
-
off(keys: string | string[]): Kibo;
|
|
748
|
-
delegate(upOrDown: UpDown, keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
749
|
-
down(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
750
|
-
up(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
|
|
751
|
-
lastKey(modifier?: string): string | boolean;
|
|
752
|
-
lastModifiersAndKey(): string;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
775
|
/**
|
|
756
776
|
* An ISO 639-1 language code.
|
|
757
777
|
* @example `pt`
|
|
@@ -760,7 +780,7 @@ export declare class Kibo {
|
|
|
760
780
|
export declare type LangTag = string;
|
|
761
781
|
|
|
762
782
|
/**
|
|
763
|
-
*
|
|
783
|
+
* PLUGIN that provides a UI to select the desired quality level of the playback.
|
|
764
784
|
* @beta
|
|
765
785
|
*
|
|
766
786
|
* @remarks
|
|
@@ -770,15 +790,9 @@ export declare type LangTag = string;
|
|
|
770
790
|
*
|
|
771
791
|
* - {@link BottomGear}
|
|
772
792
|
*
|
|
773
|
-
* The plugin is rendered as an item in the gear menu.
|
|
774
|
-
*
|
|
775
|
-
* When clicked, it shows a list of quality levels to choose from.
|
|
793
|
+
* The plugin is rendered as an item in the gear menu, which, when clicked, shows a list of quality levels to choose from.
|
|
776
794
|
*
|
|
777
|
-
* Configuration options
|
|
778
|
-
*
|
|
779
|
-
* - `labels`: The labels to show in the level selector. [video resolution]: string
|
|
780
|
-
*
|
|
781
|
-
* - `restrictResolution`: The maximum resolution to allow in the level selector.
|
|
795
|
+
* Configuration options - {@link LevelSelectorPluginSettings}
|
|
782
796
|
*
|
|
783
797
|
* @example
|
|
784
798
|
* ```ts
|
|
@@ -830,6 +844,8 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
830
844
|
* @internal
|
|
831
845
|
*/
|
|
832
846
|
bindEvents(): void;
|
|
847
|
+
private onCoreReady;
|
|
848
|
+
private onGearRendered;
|
|
833
849
|
private bindPlaybackEvents;
|
|
834
850
|
private onStop;
|
|
835
851
|
private shouldRender;
|
|
@@ -857,6 +873,25 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
857
873
|
private deferRender;
|
|
858
874
|
}
|
|
859
875
|
|
|
876
|
+
/**
|
|
877
|
+
* Configuration options for the {@link LevelSelector | level selector} plugin.
|
|
878
|
+
* @beta
|
|
879
|
+
*/
|
|
880
|
+
export declare interface LevelSelectorPluginSettings {
|
|
881
|
+
/**
|
|
882
|
+
* The maximum resolution to allow in the level selector.
|
|
883
|
+
*/
|
|
884
|
+
restrictResolution?: number;
|
|
885
|
+
/**
|
|
886
|
+
* The labels to show in the level selector.
|
|
887
|
+
* @example
|
|
888
|
+
* ```ts
|
|
889
|
+
* { 360: 'SD', 720: 'HD' }
|
|
890
|
+
* ```
|
|
891
|
+
*/
|
|
892
|
+
labels?: Record<number, string>;
|
|
893
|
+
}
|
|
894
|
+
|
|
860
895
|
export { Logger }
|
|
861
896
|
|
|
862
897
|
/**
|
|
@@ -893,7 +928,7 @@ export declare class Logo extends UIContainerPlugin {
|
|
|
893
928
|
export { LogTracer }
|
|
894
929
|
|
|
895
930
|
/**
|
|
896
|
-
*
|
|
931
|
+
* PLUGIN that provides a foundation for developing custom media controls UI.
|
|
897
932
|
* @beta
|
|
898
933
|
* @remarks
|
|
899
934
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
@@ -970,12 +1005,12 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
970
1005
|
private get disabled();
|
|
971
1006
|
/**
|
|
972
1007
|
* @internal
|
|
973
|
-
* @deprecated
|
|
1008
|
+
* @deprecated Use core.activeContainer directly
|
|
974
1009
|
*/
|
|
975
1010
|
get container(): any;
|
|
976
1011
|
/**
|
|
977
1012
|
* @internal
|
|
978
|
-
* @deprecated
|
|
1013
|
+
* @deprecated Use core.activePlayback directly
|
|
979
1014
|
*/
|
|
980
1015
|
get playback(): any;
|
|
981
1016
|
/**
|
|
@@ -1015,6 +1050,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1015
1050
|
'mouseenter .media-control-layer[data-controls]': string;
|
|
1016
1051
|
'mouseleave .media-control-layer[data-controls]': string;
|
|
1017
1052
|
};
|
|
1053
|
+
get currentSeekPos(): number;
|
|
1018
1054
|
/**
|
|
1019
1055
|
* Current volume [0..100]
|
|
1020
1056
|
*/
|
|
@@ -1037,7 +1073,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1037
1073
|
bindEvents(): void;
|
|
1038
1074
|
private bindContainerEvents;
|
|
1039
1075
|
/**
|
|
1040
|
-
*
|
|
1076
|
+
* Hides the media control UI
|
|
1041
1077
|
*/
|
|
1042
1078
|
disable(): void;
|
|
1043
1079
|
/**
|
|
@@ -1159,13 +1195,16 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1159
1195
|
*/
|
|
1160
1196
|
export declare type MediaControlElement = 'audioTracksSelector' | 'bottomGear' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'subtitlesSelector';
|
|
1161
1197
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1198
|
+
/**
|
|
1199
|
+
* Custom events emitted by the plugins to communicate with one another
|
|
1200
|
+
* @beta
|
|
1201
|
+
*/
|
|
1202
|
+
export declare enum MediaControlEvents {
|
|
1203
|
+
/**
|
|
1204
|
+
* Emitted when the gear menu is rendered
|
|
1205
|
+
*/
|
|
1206
|
+
MEDIACONTROL_GEAR_RENDERED = "mediacontrol:gear:rendered"
|
|
1207
|
+
}
|
|
1169
1208
|
|
|
1170
1209
|
/**
|
|
1171
1210
|
* Media delivery protocol
|
|
@@ -1221,7 +1260,7 @@ declare type Metrics = {
|
|
|
1221
1260
|
declare type MetricsUpdateFn = (metrics: Metrics) => void;
|
|
1222
1261
|
|
|
1223
1262
|
/**
|
|
1224
|
-
*
|
|
1263
|
+
* PLUGIN that adds support for loading multiple streams and switching between them using the media control UI.
|
|
1225
1264
|
* @beta
|
|
1226
1265
|
*/
|
|
1227
1266
|
export declare class MultiCamera extends UICorePlugin {
|
|
@@ -1262,8 +1301,8 @@ export declare class MultiCamera extends UICorePlugin {
|
|
|
1262
1301
|
private showError;
|
|
1263
1302
|
private hideError;
|
|
1264
1303
|
private changeById;
|
|
1265
|
-
getCamerasList
|
|
1266
|
-
getCurrentCamera
|
|
1304
|
+
private getCamerasList;
|
|
1305
|
+
private getCurrentCamera;
|
|
1267
1306
|
private findElementById;
|
|
1268
1307
|
private findIndexById;
|
|
1269
1308
|
private onShowLevelSelectMenu;
|
|
@@ -1352,6 +1391,13 @@ export declare interface PlaybackError {
|
|
|
1352
1391
|
* Component subsystem of the error origin
|
|
1353
1392
|
*/
|
|
1354
1393
|
scope: PlayerComponentType;
|
|
1394
|
+
/**
|
|
1395
|
+
* UI description of the error.
|
|
1396
|
+
*/
|
|
1397
|
+
UI?: {
|
|
1398
|
+
title: string;
|
|
1399
|
+
message: string;
|
|
1400
|
+
};
|
|
1355
1401
|
}
|
|
1356
1402
|
|
|
1357
1403
|
/**
|
|
@@ -1362,15 +1408,15 @@ export declare enum PlaybackErrorCode {
|
|
|
1362
1408
|
/**
|
|
1363
1409
|
* An unknown or uncategorised error.
|
|
1364
1410
|
*/
|
|
1365
|
-
Generic =
|
|
1411
|
+
Generic = "GENERIC_ERROR",
|
|
1366
1412
|
/**
|
|
1367
1413
|
* The media source is not available. Typically a network error.
|
|
1368
1414
|
*/
|
|
1369
|
-
MediaSourceUnavailable =
|
|
1415
|
+
MediaSourceUnavailable = "MEDIA_SOURCE_UNAVAILABLE",
|
|
1370
1416
|
/**
|
|
1371
1417
|
* The media source is not accessible due to some protection policy.
|
|
1372
1418
|
*/
|
|
1373
|
-
MediaSourceAccessDenied =
|
|
1419
|
+
MediaSourceAccessDenied = "MEDIA_SOURCE_ACCESS_DENIED"
|
|
1374
1420
|
}
|
|
1375
1421
|
|
|
1376
1422
|
/**
|
|
@@ -1380,7 +1426,7 @@ export declare enum PlaybackErrorCode {
|
|
|
1380
1426
|
export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
1381
1427
|
|
|
1382
1428
|
/**
|
|
1383
|
-
*
|
|
1429
|
+
* PLUGIN that allows changing the playback speed of the video.
|
|
1384
1430
|
* @beta
|
|
1385
1431
|
*
|
|
1386
1432
|
* @remarks
|
|
@@ -1390,12 +1436,12 @@ export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
|
1390
1436
|
*
|
|
1391
1437
|
* - {@link BottomGear | bottom_gear}
|
|
1392
1438
|
*
|
|
1393
|
-
* It renders a button in the gear menu, which opens a dropdown with the
|
|
1439
|
+
* It renders a button in the gear menu, which opens a dropdown with the options to change the playback rate.
|
|
1394
1440
|
*/
|
|
1395
1441
|
export declare class PlaybackRate extends UICorePlugin {
|
|
1396
|
-
private currentPlayback;
|
|
1397
1442
|
private playbackRates;
|
|
1398
1443
|
private prevSelectedRate;
|
|
1444
|
+
private rendered;
|
|
1399
1445
|
private selectedRate;
|
|
1400
1446
|
/**
|
|
1401
1447
|
* @internal
|
|
@@ -1407,9 +1453,9 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1407
1453
|
get supportedVersion(): {
|
|
1408
1454
|
min: string;
|
|
1409
1455
|
};
|
|
1410
|
-
private static readonly template;
|
|
1411
1456
|
private static readonly buttonTemplate;
|
|
1412
1457
|
private static readonly listTemplate;
|
|
1458
|
+
constructor(core: Core);
|
|
1413
1459
|
/**
|
|
1414
1460
|
* @internal
|
|
1415
1461
|
*/
|
|
@@ -1429,12 +1475,13 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1429
1475
|
* @internal
|
|
1430
1476
|
*/
|
|
1431
1477
|
bindEvents(): void;
|
|
1432
|
-
private
|
|
1478
|
+
private onCoreReady;
|
|
1479
|
+
private onActiveContainerChange;
|
|
1480
|
+
private onGearRendered;
|
|
1481
|
+
private onDvrStateChanged;
|
|
1433
1482
|
private allRateElements;
|
|
1434
1483
|
private rateElement;
|
|
1435
|
-
private
|
|
1436
|
-
private updateLiveStatus;
|
|
1437
|
-
private reload;
|
|
1484
|
+
private onPlaybackRateChange;
|
|
1438
1485
|
private shouldRender;
|
|
1439
1486
|
/**
|
|
1440
1487
|
* @internal
|
|
@@ -1443,11 +1490,11 @@ export declare class PlaybackRate extends UICorePlugin {
|
|
|
1443
1490
|
private onStartAd;
|
|
1444
1491
|
private onFinishAd;
|
|
1445
1492
|
private onPlay;
|
|
1493
|
+
private resetPlaybackRate;
|
|
1446
1494
|
private onStop;
|
|
1447
1495
|
private onRateSelect;
|
|
1448
1496
|
private onShowMenu;
|
|
1449
1497
|
private goBack;
|
|
1450
|
-
private updatePlaybackRate;
|
|
1451
1498
|
private setSelectedRate;
|
|
1452
1499
|
private getTitle;
|
|
1453
1500
|
private highlightCurrentRate;
|
|
@@ -1626,12 +1673,14 @@ export declare class Player {
|
|
|
1626
1673
|
* Player.registerPlugin(MyPlugin)
|
|
1627
1674
|
* ```
|
|
1628
1675
|
*/
|
|
1629
|
-
static registerPlugin(plugin:
|
|
1676
|
+
static registerPlugin(plugin: PlayerPluginConstructor): void;
|
|
1677
|
+
private static getRegisteredPlugins;
|
|
1678
|
+
private static corePlugins;
|
|
1630
1679
|
/**
|
|
1631
1680
|
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
1632
1681
|
* @param plugin - a plugin class
|
|
1633
1682
|
*/
|
|
1634
|
-
static unregisterPlugin(plugin:
|
|
1683
|
+
static unregisterPlugin(plugin: PlayerPluginConstructor): void;
|
|
1635
1684
|
private setConfig;
|
|
1636
1685
|
private initPlayer;
|
|
1637
1686
|
private tuneIn;
|
|
@@ -1857,13 +1906,19 @@ export declare interface PlayerMediaSourceDesc {
|
|
|
1857
1906
|
|
|
1858
1907
|
/**
|
|
1859
1908
|
* @beta
|
|
1860
|
-
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
1909
|
+
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
1910
|
+
* {@link https://clappr.github.io/classes/ContainerPlugin.html}
|
|
1861
1911
|
*/
|
|
1862
1912
|
export declare type PlayerPlugin = {
|
|
1863
1913
|
new (...args: any[]): unknown;
|
|
1864
1914
|
name: string;
|
|
1865
1915
|
};
|
|
1866
1916
|
|
|
1917
|
+
/**
|
|
1918
|
+
* @beta
|
|
1919
|
+
*/
|
|
1920
|
+
export declare type PlayerPluginConstructor = CorePluginConstructor | ContainerPluginConstructor;
|
|
1921
|
+
|
|
1867
1922
|
/**
|
|
1868
1923
|
* Displays a poster image in the background and a big play button on top when playback is stopped
|
|
1869
1924
|
* @beta
|
|
@@ -1958,14 +2013,6 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
1958
2013
|
destroy(): this;
|
|
1959
2014
|
}
|
|
1960
2015
|
|
|
1961
|
-
declare type PresentationalError = {
|
|
1962
|
-
title: string;
|
|
1963
|
-
message: string;
|
|
1964
|
-
code: string;
|
|
1965
|
-
icon: string;
|
|
1966
|
-
reloadIcon: string;
|
|
1967
|
-
};
|
|
1968
|
-
|
|
1969
2016
|
/**
|
|
1970
2017
|
* A level of quality within a media source.
|
|
1971
2018
|
* @beta
|
|
@@ -2036,7 +2083,8 @@ export { SentryTracer }
|
|
|
2036
2083
|
export { setTracer }
|
|
2037
2084
|
|
|
2038
2085
|
/**
|
|
2039
|
-
*
|
|
2086
|
+
* PLUGIN that adds a share button to the media control UI.
|
|
2087
|
+
* @beta
|
|
2040
2088
|
*/
|
|
2041
2089
|
export declare class Share extends UICorePlugin {
|
|
2042
2090
|
private hide;
|
|
@@ -2075,7 +2123,8 @@ export declare class Share extends UICorePlugin {
|
|
|
2075
2123
|
}
|
|
2076
2124
|
|
|
2077
2125
|
/**
|
|
2078
|
-
*
|
|
2126
|
+
* PLUGIN that adds skip controls to the media control UI.
|
|
2127
|
+
* @beta
|
|
2079
2128
|
*/
|
|
2080
2129
|
export declare class SkipTime extends UICorePlugin {
|
|
2081
2130
|
get name(): string;
|
|
@@ -2125,6 +2174,7 @@ export declare class SourceController extends CorePlugin {
|
|
|
2125
2174
|
private currentSourceIndex;
|
|
2126
2175
|
private sourcesDelay;
|
|
2127
2176
|
private active;
|
|
2177
|
+
private switching;
|
|
2128
2178
|
private sync;
|
|
2129
2179
|
/**
|
|
2130
2180
|
* @internal
|
|
@@ -2141,7 +2191,8 @@ export declare class SourceController extends CorePlugin {
|
|
|
2141
2191
|
* @internal
|
|
2142
2192
|
*/
|
|
2143
2193
|
bindEvents(): void;
|
|
2144
|
-
private
|
|
2194
|
+
private onCoreReady;
|
|
2195
|
+
private onActiveContainerChanged;
|
|
2145
2196
|
private bindContainerEventListeners;
|
|
2146
2197
|
private reset;
|
|
2147
2198
|
private retryPlayback;
|
|
@@ -2154,6 +2205,7 @@ export declare class SourceController extends CorePlugin {
|
|
|
2154
2205
|
|
|
2155
2206
|
/**
|
|
2156
2207
|
* Custom events emitted by the plugin
|
|
2208
|
+
* @beta
|
|
2157
2209
|
*/
|
|
2158
2210
|
export declare enum SpinnerEvents {
|
|
2159
2211
|
/**
|
|
@@ -2164,12 +2216,15 @@ export declare enum SpinnerEvents {
|
|
|
2164
2216
|
}
|
|
2165
2217
|
|
|
2166
2218
|
/**
|
|
2167
|
-
*
|
|
2219
|
+
* PLUGIN that shows a pending operation indicator when playback is buffering or in a similar state
|
|
2168
2220
|
* @beta
|
|
2169
2221
|
* @remarks
|
|
2170
|
-
*
|
|
2222
|
+
* Events emitted- {@link SpinnerEvents}
|
|
2223
|
+
* Other plugins can use {@link SpinnerThreeBounce.show | show} and {@link SpinnerThreeBounce.hide | hide} methods to
|
|
2224
|
+
* implement custom pending/progress indication scenarios.
|
|
2171
2225
|
*/
|
|
2172
2226
|
export declare class SpinnerThreeBounce extends UIContainerPlugin {
|
|
2227
|
+
private userShown;
|
|
2173
2228
|
/**
|
|
2174
2229
|
* @internal
|
|
2175
2230
|
*/
|
|
@@ -2198,13 +2253,17 @@ export declare class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
2198
2253
|
private onStop;
|
|
2199
2254
|
private onError;
|
|
2200
2255
|
/**
|
|
2201
|
-
* Shows the spinner
|
|
2256
|
+
* Shows the spinner.
|
|
2257
|
+
*
|
|
2258
|
+
* When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce.hide} is called
|
|
2202
2259
|
*/
|
|
2203
|
-
show(): void;
|
|
2260
|
+
show(delay?: number): void;
|
|
2204
2261
|
/**
|
|
2205
|
-
* Hides the spinner
|
|
2262
|
+
* Hides the spinner.
|
|
2206
2263
|
*/
|
|
2207
2264
|
hide(): void;
|
|
2265
|
+
private _show;
|
|
2266
|
+
private _hide;
|
|
2208
2267
|
/**
|
|
2209
2268
|
* @internal
|
|
2210
2269
|
*/
|
|
@@ -2348,7 +2407,7 @@ export declare class Subtitles extends UICorePlugin {
|
|
|
2348
2407
|
}
|
|
2349
2408
|
|
|
2350
2409
|
/**
|
|
2351
|
-
*
|
|
2410
|
+
* PLUGIN that collects and reports the performance statistics.
|
|
2352
2411
|
* @beta
|
|
2353
2412
|
* @remarks
|
|
2354
2413
|
* This plugin is experimental and its API is likely to change.
|
|
@@ -2460,7 +2519,7 @@ export declare type TelemetryRecord = {
|
|
|
2460
2519
|
* @param data - The telemetry record to send.
|
|
2461
2520
|
* @beta
|
|
2462
2521
|
*/
|
|
2463
|
-
declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
2522
|
+
export declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
2464
2523
|
|
|
2465
2524
|
/**
|
|
2466
2525
|
* Displays the thumbnails of the video when available.
|
|
@@ -2576,11 +2635,6 @@ export declare type TimeProgress = TimePosition & {
|
|
|
2576
2635
|
start: number;
|
|
2577
2636
|
};
|
|
2578
2637
|
|
|
2579
|
-
/**
|
|
2580
|
-
* @internal
|
|
2581
|
-
*/
|
|
2582
|
-
export declare type TimerId = ReturnType<typeof setTimeout>;
|
|
2583
|
-
|
|
2584
2638
|
/**
|
|
2585
2639
|
* For the plugin development
|
|
2586
2640
|
* @beta
|
|
@@ -2634,8 +2688,6 @@ export declare type TranslationSettings = Partial<Record<LangTag, Record<Transla
|
|
|
2634
2688
|
*/
|
|
2635
2689
|
export declare type TransportPreference = MediaTransport;
|
|
2636
2690
|
|
|
2637
|
-
declare type UpDown = 'up' | 'down';
|
|
2638
|
-
|
|
2639
2691
|
/**
|
|
2640
2692
|
* Version information about the gplayer and its main dependencies
|
|
2641
2693
|
* @returns Version information about the gplayer and its main dependencies
|