@gcorevideo/player 2.19.11 → 2.19.13
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 +16 -11
- package/dist/index.css +684 -684
- package/dist/index.js +301 -151
- package/dist/player.d.ts +208 -45
- package/dist/plugins/index.css +941 -941
- package/dist/plugins/index.js +3227 -3080
- package/docs/api/player.bottomgear.md +3 -289
- package/docs/api/player.dvrcontrols._constructor_.md +3 -0
- package/docs/api/player.dvrcontrols.md +10 -201
- package/docs/api/player.levelselector.md +8 -140
- package/docs/api/player.md +8 -4
- package/docs/api/player.mediacontrol.disable.md +2 -0
- package/docs/api/player.mediacontrol.disabledcontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.enable.md +2 -0
- package/docs/api/player.mediacontrol.enablecontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.getelement.md +19 -1
- package/docs/api/player.mediacontrol.md +17 -281
- package/docs/api/player.mediacontrol.volume.md +2 -2
- package/docs/api/player.mediacontrolelement.md +2 -1
- package/docs/api/player.poster.disable.md +5 -0
- package/docs/api/player.poster.enable.md +5 -0
- package/docs/api/player.poster.md +25 -183
- package/lib/Player.d.ts +1 -0
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +15 -10
- package/lib/plugins/audio-selector/AudioSelector.js +2 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +2 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts +28 -7
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +44 -31
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +3 -2
- package/lib/plugins/clappr-stats/ClapprStats.js +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.js +2 -2
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/disable-controls/DisableControls.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +30 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +39 -11
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +2 -1
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +1 -1
- package/lib/plugins/level-selector/LevelSelector.d.ts +25 -6
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +33 -12
- package/lib/plugins/logo/Logo.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +66 -22
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +71 -34
- package/lib/plugins/multi-camera/MultiCamera.js +3 -3
- package/lib/plugins/picture-in-picture/PictureInPicture.js +3 -3
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +3 -3
- package/lib/plugins/poster/Poster.d.ts +57 -3
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +57 -9
- package/lib/plugins/seek-time/SeekTime.js +2 -2
- package/lib/plugins/share/Share.js +2 -2
- package/lib/plugins/skip-time/SkipTime.js +1 -1
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -2
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
- package/lib/plugins/statistics/Statistics.js +1 -1
- package/lib/plugins/subtitles/Subtitles.js +3 -3
- package/lib/plugins/thumbnails/Thumbnails.js +3 -3
- package/lib/plugins/types.d.ts +1 -7
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.d.ts +1 -0
- package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.js +6 -3
- package/package.json +2 -1
- package/src/Player.ts +15 -9
- package/src/__tests__/Player.test.ts +15 -76
- package/src/plugins/audio-selector/AudioSelector.ts +2 -2
- package/src/plugins/big-mute-button/BigMuteButton.ts +2 -1
- package/src/plugins/bottom-gear/BottomGear.ts +50 -39
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +3 -2
- 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 +2 -2
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/disable-controls/DisableControls.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +42 -14
- package/src/plugins/error-screen/ErrorScreen.ts +2 -1
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/level-selector/LevelSelector.ts +34 -14
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +22 -2
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +82 -44
- package/src/plugins/multi-camera/MultiCamera.ts +3 -3
- package/src/plugins/picture-in-picture/PictureInPicture.ts +3 -3
- package/src/plugins/playback-rate/PlaybackRate.ts +3 -4
- package/src/plugins/poster/Poster.ts +59 -12
- package/src/plugins/seek-time/SeekTime.ts +2 -2
- package/src/plugins/share/Share.ts +2 -2
- package/src/plugins/skip-time/SkipTime.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +1 -2
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +5 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/statistics/Statistics.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +3 -3
- package/src/plugins/thumbnails/Thumbnails.ts +3 -3
- package/src/plugins/types.ts +1 -0
- package/src/plugins/vast-ads/VastAds.ts +6 -6
- package/temp/player.api.json +3300 -5029
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.bottomgear.attributes.md +0 -17
- package/docs/api/player.bottomgear.bindevents.md +0 -18
- package/docs/api/player.bottomgear.container.md +0 -14
- package/docs/api/player.bottomgear.events.md +0 -16
- package/docs/api/player.bottomgear.hide.md +0 -18
- package/docs/api/player.bottomgear.name.md +0 -14
- package/docs/api/player.bottomgear.refresh.md +0 -18
- package/docs/api/player.bottomgear.reload.md +0 -18
- package/docs/api/player.bottomgear.render.md +0 -18
- package/docs/api/player.bottomgear.supportedversion.md +0 -16
- package/docs/api/player.bottomgear.template.md +0 -14
- package/docs/api/player.bottomgear.togglegearmenu.md +0 -18
- package/docs/api/player.bottomgear.unbindevents.md +0 -18
- package/docs/api/player.bottomgear.version.md +0 -14
- package/docs/api/player.dvrcontrols.attributes.md +0 -14
- package/docs/api/player.dvrcontrols.bindevents.md +0 -15
- package/docs/api/player.dvrcontrols.click.md +0 -15
- package/docs/api/player.dvrcontrols.events.md +0 -13
- package/docs/api/player.dvrcontrols.name.md +0 -11
- package/docs/api/player.dvrcontrols.render.md +0 -15
- package/docs/api/player.dvrcontrols.settingsupdate.md +0 -15
- package/docs/api/player.dvrcontrols.shouldrender.md +0 -15
- package/docs/api/player.dvrcontrols.supportedversion.md +0 -13
- package/docs/api/player.dvrcontrols.template.md +0 -11
- package/docs/api/player.levelselector.attributes.md +0 -17
- package/docs/api/player.levelselector.bindevents.md +0 -18
- package/docs/api/player.levelselector.name.md +0 -14
- package/docs/api/player.levelselector.render.md +0 -18
- package/docs/api/player.levelselector.supportedversion.md +0 -16
- package/docs/api/player.levelselector.version.md +0 -14
- package/docs/api/player.mediacontrol.attributes.md +0 -17
- package/docs/api/player.mediacontrol.bindcontainerevents.md +0 -18
- package/docs/api/player.mediacontrol.bindevents.md +0 -18
- package/docs/api/player.mediacontrol.container.md +0 -14
- package/docs/api/player.mediacontrol.destroy.md +0 -18
- package/docs/api/player.mediacontrol.disabled.md +0 -14
- package/docs/api/player.mediacontrol.events.md +0 -40
- package/docs/api/player.mediacontrol.getexternalinterface.md +0 -21
- package/docs/api/player.mediacontrol.name.md +0 -14
- package/docs/api/player.mediacontrol.pause.md +0 -20
- package/docs/api/player.mediacontrol.play.md +0 -20
- package/docs/api/player.mediacontrol.playback.md +0 -14
- package/docs/api/player.mediacontrol.render.md +0 -18
- package/docs/api/player.mediacontrol.setmuted.md +0 -52
- package/docs/api/player.mediacontrol.stop.md +0 -20
- package/docs/api/player.mediacontrol.supportedversion.md +0 -16
- package/docs/api/player.poster.attributes.md +0 -14
- package/docs/api/player.poster.bindevents.md +0 -15
- package/docs/api/player.poster.destroy.md +0 -15
- package/docs/api/player.poster.events.md +0 -13
- package/docs/api/player.poster.name.md +0 -11
- package/docs/api/player.poster.render.md +0 -15
- package/docs/api/player.poster.shouldrender.md +0 -11
- package/docs/api/player.poster.showonvideoend.md +0 -11
- package/docs/api/player.poster.supportedversion.md +0 -13
- package/docs/api/player.poster.template.md +0 -11
- package/src/plugins/build.ts +0 -1
package/dist/player.d.ts
CHANGED
|
@@ -116,34 +116,55 @@ declare type BitrateTrackRecord = {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
+
* Adds the gear button that triggers extra options menu on the right side of the {@link MediaControl | media control} UI
|
|
119
120
|
* @beta
|
|
121
|
+
* @remarks
|
|
122
|
+
* The plugins provides a base for attaching custom settings UI in the gear menu
|
|
120
123
|
*/
|
|
121
124
|
export declare class BottomGear extends UICorePlugin {
|
|
122
125
|
private isHd;
|
|
126
|
+
/**
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
123
129
|
get name(): string;
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
124
133
|
get supportedVersion(): {
|
|
125
134
|
min: string;
|
|
126
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
127
139
|
static get version(): string;
|
|
128
|
-
|
|
140
|
+
private static readonly template;
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
129
144
|
get attributes(): {
|
|
130
145
|
class: string;
|
|
131
146
|
'data-track-selector': string;
|
|
132
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
133
151
|
get events(): {
|
|
134
152
|
'click .button-gear': string;
|
|
135
153
|
};
|
|
136
|
-
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
137
157
|
bindEvents(): void;
|
|
138
|
-
unBindEvents(): void;
|
|
139
158
|
private onActiveContainerChanged;
|
|
140
159
|
private bindContainerEvents;
|
|
141
|
-
reload(): void;
|
|
142
160
|
private highDefinitionUpdate;
|
|
161
|
+
/**
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
143
164
|
render(): this;
|
|
144
|
-
refresh
|
|
145
|
-
toggleGearMenu
|
|
146
|
-
hide
|
|
165
|
+
private refresh;
|
|
166
|
+
private toggleGearMenu;
|
|
167
|
+
private hide;
|
|
147
168
|
}
|
|
148
169
|
|
|
149
170
|
/**
|
|
@@ -350,28 +371,54 @@ export declare class DisableControls extends UICorePlugin {
|
|
|
350
371
|
private disableAllControls;
|
|
351
372
|
}
|
|
352
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Adds the DVR controls to the media control UI
|
|
376
|
+
* @beta
|
|
377
|
+
*
|
|
378
|
+
* @remarks
|
|
379
|
+
* The plugin is rendered in the {@link MediaControl | media control} UI.
|
|
380
|
+
* It renders the live stream indicator and the DVR seek bar if DVR is enabled.
|
|
381
|
+
*/
|
|
353
382
|
export declare class DvrControls extends UICorePlugin {
|
|
354
|
-
|
|
383
|
+
private static readonly template;
|
|
384
|
+
/**
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
355
387
|
get name(): string;
|
|
388
|
+
/**
|
|
389
|
+
* @internal
|
|
390
|
+
*/
|
|
356
391
|
get supportedVersion(): {
|
|
357
392
|
min: string;
|
|
358
393
|
};
|
|
394
|
+
/**
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
359
397
|
get events(): {
|
|
360
398
|
'click .live-button': string;
|
|
361
399
|
};
|
|
400
|
+
/**
|
|
401
|
+
* @internal
|
|
402
|
+
*/
|
|
362
403
|
get attributes(): {
|
|
363
404
|
class: string;
|
|
364
405
|
'data-dvr-controls': string;
|
|
365
406
|
};
|
|
366
407
|
constructor(core: Core);
|
|
408
|
+
/**
|
|
409
|
+
* @internal
|
|
410
|
+
*/
|
|
367
411
|
bindEvents(): void;
|
|
368
412
|
private bindCoreEvents;
|
|
369
413
|
private bindContainerEvents;
|
|
370
414
|
private containerChanged;
|
|
371
415
|
private dvrChanged;
|
|
372
|
-
click
|
|
373
|
-
settingsUpdate
|
|
374
|
-
shouldRender
|
|
416
|
+
private click;
|
|
417
|
+
private settingsUpdate;
|
|
418
|
+
private shouldRender;
|
|
419
|
+
/**
|
|
420
|
+
* @internal
|
|
421
|
+
*/
|
|
375
422
|
render(): this;
|
|
376
423
|
}
|
|
377
424
|
|
|
@@ -500,26 +547,27 @@ export declare class Kibo {
|
|
|
500
547
|
export declare type LangTag = string;
|
|
501
548
|
|
|
502
549
|
/**
|
|
503
|
-
*
|
|
550
|
+
* A {@link MediaControl | media control} plugin that provides a UI to control the quality level of the playback.
|
|
504
551
|
* @beta
|
|
505
552
|
*
|
|
506
553
|
* @remarks
|
|
507
|
-
* The plugin is rendered as a button in the gear menu.
|
|
554
|
+
* The plugin is rendered as a button in the {@link BottomGear | gear menu}.
|
|
508
555
|
* When clicked, it shows a list of quality levels to choose from.
|
|
509
556
|
*
|
|
510
557
|
* Configuration options:
|
|
511
558
|
*
|
|
512
|
-
* - `labels`: The labels to show in the level selector. [
|
|
559
|
+
* - `labels`: The labels to show in the level selector. [video resolution]: string
|
|
560
|
+
*
|
|
513
561
|
* - `restrictResolution`: The maximum resolution to allow in the level selector.
|
|
514
562
|
*
|
|
515
563
|
* @example
|
|
516
564
|
* ```ts
|
|
517
|
-
* {
|
|
565
|
+
* new Player({
|
|
518
566
|
* levelSelector: {
|
|
519
567
|
* restrictResolution: 360,
|
|
520
|
-
* labels: { 360: '
|
|
568
|
+
* labels: { 360: 'SD', 720: 'HD' },
|
|
521
569
|
* },
|
|
522
|
-
* }
|
|
570
|
+
* })
|
|
523
571
|
* ```
|
|
524
572
|
*/
|
|
525
573
|
export declare class LevelSelector extends UICorePlugin {
|
|
@@ -530,11 +578,23 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
530
578
|
private isOpen;
|
|
531
579
|
private buttonTemplate;
|
|
532
580
|
private listTemplate;
|
|
581
|
+
/**
|
|
582
|
+
* @internal
|
|
583
|
+
*/
|
|
533
584
|
get name(): string;
|
|
585
|
+
/**
|
|
586
|
+
* @internal
|
|
587
|
+
*/
|
|
534
588
|
get supportedVersion(): {
|
|
535
589
|
min: string;
|
|
536
590
|
};
|
|
591
|
+
/**
|
|
592
|
+
* @internal
|
|
593
|
+
*/
|
|
537
594
|
static get version(): string;
|
|
595
|
+
/**
|
|
596
|
+
* @internal
|
|
597
|
+
*/
|
|
538
598
|
get attributes(): {
|
|
539
599
|
class: string;
|
|
540
600
|
'data-level-selector': string;
|
|
@@ -546,10 +606,16 @@ export declare class LevelSelector extends UICorePlugin {
|
|
|
546
606
|
'click .gear-option': string;
|
|
547
607
|
'click .go-back': string;
|
|
548
608
|
};
|
|
609
|
+
/**
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
549
612
|
bindEvents(): void;
|
|
550
613
|
private bindPlaybackEvents;
|
|
551
614
|
private onStop;
|
|
552
615
|
private shouldRender;
|
|
616
|
+
/**
|
|
617
|
+
* @internal
|
|
618
|
+
*/
|
|
553
619
|
render(): this;
|
|
554
620
|
private renderButton;
|
|
555
621
|
private renderDropdown;
|
|
@@ -603,11 +669,17 @@ export declare class Logo extends UIContainerPlugin {
|
|
|
603
669
|
export { LogTracer }
|
|
604
670
|
|
|
605
671
|
/**
|
|
606
|
-
* The MediaControl
|
|
672
|
+
* The MediaControl provides a foundation for developing custom media controls UI.
|
|
607
673
|
* @beta
|
|
608
674
|
* @remarks
|
|
609
|
-
* This plugin provides a foundation for developing a media controls UI via additional plugins.
|
|
610
675
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
676
|
+
* The plugin registration should be arranged so that MediaControl is initialized before every other plugin that depends on it.
|
|
677
|
+
* @example
|
|
678
|
+
* ```ts
|
|
679
|
+
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
680
|
+
* Player.registerPlugin(LevelSelector) // a media control plugin
|
|
681
|
+
* Player.registerPlugin(NerdStats) // another media control plugin
|
|
682
|
+
* ```
|
|
611
683
|
*/
|
|
612
684
|
export declare class MediaControl extends UICorePlugin {
|
|
613
685
|
private advertisementPlaying;
|
|
@@ -633,7 +705,6 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
633
705
|
private persistConfig;
|
|
634
706
|
private rendered;
|
|
635
707
|
private settings;
|
|
636
|
-
private svgMask;
|
|
637
708
|
private userDisabled;
|
|
638
709
|
private userKeepVisible;
|
|
639
710
|
private verticalVolume;
|
|
@@ -662,17 +733,37 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
662
733
|
private $volumeContainer;
|
|
663
734
|
private $volumeIcon;
|
|
664
735
|
private static readonly template;
|
|
736
|
+
/**
|
|
737
|
+
* @internal
|
|
738
|
+
*/
|
|
665
739
|
get name(): string;
|
|
740
|
+
/**
|
|
741
|
+
* @internal
|
|
742
|
+
*/
|
|
666
743
|
get supportedVersion(): {
|
|
667
744
|
min: string;
|
|
668
745
|
};
|
|
669
|
-
get disabled()
|
|
746
|
+
private get disabled();
|
|
747
|
+
/**
|
|
748
|
+
* @internal
|
|
749
|
+
* @deprecated
|
|
750
|
+
*/
|
|
670
751
|
get container(): any;
|
|
752
|
+
/**
|
|
753
|
+
* @internal
|
|
754
|
+
* @deprecated
|
|
755
|
+
*/
|
|
671
756
|
get playback(): any;
|
|
757
|
+
/**
|
|
758
|
+
* @internal
|
|
759
|
+
*/
|
|
672
760
|
get attributes(): {
|
|
673
761
|
class: string;
|
|
674
762
|
'data-media-control-skin-1': string;
|
|
675
763
|
};
|
|
764
|
+
/**
|
|
765
|
+
* @internal
|
|
766
|
+
*/
|
|
676
767
|
get events(): {
|
|
677
768
|
'click [data-play]': string;
|
|
678
769
|
'click [data-pause]': string;
|
|
@@ -701,34 +792,34 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
701
792
|
'mouseleave .media-control-layer[data-controls]': string;
|
|
702
793
|
};
|
|
703
794
|
/**
|
|
704
|
-
* Current volume
|
|
795
|
+
* Current volume [0..100]
|
|
705
796
|
*/
|
|
706
|
-
get volume():
|
|
797
|
+
get volume(): number;
|
|
707
798
|
/**
|
|
708
799
|
* Muted state
|
|
709
800
|
*/
|
|
710
801
|
get muted(): boolean;
|
|
711
802
|
constructor(core: Core);
|
|
803
|
+
/**
|
|
804
|
+
* @internal
|
|
805
|
+
*/
|
|
712
806
|
getExternalInterface(): {
|
|
713
807
|
setVolume: (value: number, isInitialVolume?: boolean) => void;
|
|
714
|
-
getVolume: () =>
|
|
808
|
+
getVolume: () => number;
|
|
715
809
|
};
|
|
716
|
-
bindEvents(): void;
|
|
717
|
-
bindContainerEvents(): void;
|
|
718
|
-
disable(): void;
|
|
719
|
-
enable(): void;
|
|
720
810
|
/**
|
|
721
|
-
*
|
|
811
|
+
* @internal
|
|
722
812
|
*/
|
|
723
|
-
|
|
813
|
+
bindEvents(): void;
|
|
814
|
+
private bindContainerEvents;
|
|
724
815
|
/**
|
|
725
|
-
*
|
|
816
|
+
* Disables the plugin and unmounts its UI
|
|
726
817
|
*/
|
|
727
|
-
|
|
818
|
+
disable(): void;
|
|
728
819
|
/**
|
|
729
|
-
*
|
|
820
|
+
* Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
|
|
730
821
|
*/
|
|
731
|
-
|
|
822
|
+
enable(): void;
|
|
732
823
|
/**
|
|
733
824
|
* Set the initial volume, which is preserved when playback is interrupted by an advertisement
|
|
734
825
|
*/
|
|
@@ -783,7 +874,20 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
783
874
|
/**
|
|
784
875
|
* Get a media control element DOM node
|
|
785
876
|
* @param name - The name of the media control element
|
|
786
|
-
* @returns The DOM node to render
|
|
877
|
+
* @returns The DOM node to render to or extend
|
|
878
|
+
* @remarks
|
|
879
|
+
* Use this method to render custom media control UI in a plugin
|
|
880
|
+
* @example
|
|
881
|
+
* ```ts
|
|
882
|
+
* class MyPlugin extends UICorePlugin {
|
|
883
|
+
* override render() {
|
|
884
|
+
* const mediaControl = this.core.getPlugin('media_control')
|
|
885
|
+
* const clipText = mediaControl.getElement('clipText')
|
|
886
|
+
* clipText?.el.text('Here we go')
|
|
887
|
+
* return this
|
|
888
|
+
* }
|
|
889
|
+
* }
|
|
890
|
+
* ```
|
|
787
891
|
*/
|
|
788
892
|
getElement(name: MediaControlElement): ZeptoResult | null;
|
|
789
893
|
private resetIndicators;
|
|
@@ -795,31 +899,37 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
795
899
|
private unbindKeyEvents;
|
|
796
900
|
private parseColors;
|
|
797
901
|
private applyButtonStyle;
|
|
902
|
+
/**
|
|
903
|
+
* @internal
|
|
904
|
+
*/
|
|
798
905
|
destroy(): UIObject;
|
|
799
906
|
private configure;
|
|
907
|
+
/**
|
|
908
|
+
* @internal
|
|
909
|
+
*/
|
|
800
910
|
render(): this;
|
|
801
911
|
private handleFullScreenOnBtn;
|
|
802
912
|
private onStartAd;
|
|
803
913
|
private onFinishAd;
|
|
804
914
|
private hideControllAds;
|
|
805
|
-
setMuted(value: boolean): void;
|
|
806
915
|
private static getPageX;
|
|
807
916
|
private static getPageY;
|
|
808
917
|
/**
|
|
809
|
-
* Enable the
|
|
918
|
+
* Enable the user interaction disabled earlier
|
|
810
919
|
*/
|
|
811
920
|
enableControlButton(): void;
|
|
812
921
|
/**
|
|
813
|
-
* Disable the control
|
|
922
|
+
* Disable the user interaction for the control buttons
|
|
814
923
|
*/
|
|
815
924
|
disabledControlButton(): void;
|
|
816
925
|
private isSeekEnabledForHtml5Playback;
|
|
817
926
|
}
|
|
818
927
|
|
|
819
928
|
/**
|
|
929
|
+
* Media control elements, mount points for additional plugins
|
|
820
930
|
* @beta
|
|
821
931
|
*/
|
|
822
|
-
export declare type MediaControlElement = 'clipText' | 'pip' | 'seekBarContainer';
|
|
932
|
+
export declare type MediaControlElement = 'bottomGear' | 'clipText' | 'pip' | 'playbackRate' | 'seekBarContainer';
|
|
823
933
|
|
|
824
934
|
declare type MediaSourceInfo = {
|
|
825
935
|
live: boolean;
|
|
@@ -1064,8 +1174,6 @@ export declare class Player {
|
|
|
1064
1174
|
private player;
|
|
1065
1175
|
private ready;
|
|
1066
1176
|
private rootNode;
|
|
1067
|
-
private tuneInTimerId;
|
|
1068
|
-
private tunedIn;
|
|
1069
1177
|
constructor(config: PlayerConfig);
|
|
1070
1178
|
/**
|
|
1071
1179
|
* Adds a listener to a player event
|
|
@@ -1228,13 +1336,14 @@ export declare class Player {
|
|
|
1228
1336
|
private setConfig;
|
|
1229
1337
|
private initPlayer;
|
|
1230
1338
|
private tuneIn;
|
|
1339
|
+
private triggerAutoPlay;
|
|
1231
1340
|
private safeTriggerEvent;
|
|
1232
1341
|
private events;
|
|
1233
1342
|
private buildCoreOptions;
|
|
1234
1343
|
private configurePlaybacks;
|
|
1235
1344
|
private buildMediaSourcesList;
|
|
1236
1345
|
private bindContainerEventListeners;
|
|
1237
|
-
private
|
|
1346
|
+
private bindCoreListeners;
|
|
1238
1347
|
}
|
|
1239
1348
|
|
|
1240
1349
|
/**
|
|
@@ -1465,28 +1574,76 @@ export declare type PluginSettings = {
|
|
|
1465
1574
|
send: (data: StatisticsRecord) => void;
|
|
1466
1575
|
};
|
|
1467
1576
|
|
|
1577
|
+
/**
|
|
1578
|
+
* Displays a poster image in the background and a big play button on top when playback is stopped
|
|
1579
|
+
* @beta
|
|
1580
|
+
* @remarks
|
|
1581
|
+
* When the playback is stopped, media control UI is disabled.
|
|
1582
|
+
*
|
|
1583
|
+
* Configuration options:
|
|
1584
|
+
*
|
|
1585
|
+
* - `poster.custom` - custom CSS background
|
|
1586
|
+
*
|
|
1587
|
+
* - `poster.showForNoOp` - whether to show the poster when the playback is not started
|
|
1588
|
+
*
|
|
1589
|
+
* - `poster.url` - the URL of the poster image
|
|
1590
|
+
*
|
|
1591
|
+
* - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
|
|
1592
|
+
*
|
|
1593
|
+
* @example
|
|
1594
|
+
* ```ts
|
|
1595
|
+
* new Player({
|
|
1596
|
+
* ...
|
|
1597
|
+
* poster: {
|
|
1598
|
+
* showForNoOp: true,
|
|
1599
|
+
* url: 'https://via.placeholder.com/150.png',
|
|
1600
|
+
* }
|
|
1601
|
+
* })
|
|
1602
|
+
* ```
|
|
1603
|
+
*/
|
|
1468
1604
|
export declare class Poster extends UIContainerPlugin {
|
|
1469
1605
|
private hasFatalError;
|
|
1470
1606
|
private hasStartedPlaying;
|
|
1471
1607
|
private playRequested;
|
|
1472
1608
|
private $playButton;
|
|
1473
1609
|
private $playWrapper;
|
|
1610
|
+
/**
|
|
1611
|
+
* @internal
|
|
1612
|
+
*/
|
|
1474
1613
|
get name(): string;
|
|
1614
|
+
/**
|
|
1615
|
+
* @internal
|
|
1616
|
+
*/
|
|
1475
1617
|
get supportedVersion(): {
|
|
1476
1618
|
min: string;
|
|
1477
1619
|
};
|
|
1478
|
-
|
|
1479
|
-
get shouldRender()
|
|
1620
|
+
private static readonly template;
|
|
1621
|
+
private get shouldRender();
|
|
1622
|
+
/**
|
|
1623
|
+
* @internal
|
|
1624
|
+
*/
|
|
1480
1625
|
get attributes(): {
|
|
1481
1626
|
class: string;
|
|
1482
1627
|
'data-poster': string;
|
|
1483
1628
|
};
|
|
1629
|
+
/**
|
|
1630
|
+
* @internal
|
|
1631
|
+
*/
|
|
1484
1632
|
get events(): {
|
|
1485
1633
|
click: string;
|
|
1486
1634
|
};
|
|
1487
|
-
get showOnVideoEnd()
|
|
1635
|
+
private get showOnVideoEnd();
|
|
1636
|
+
/**
|
|
1637
|
+
* @internal
|
|
1638
|
+
*/
|
|
1488
1639
|
bindEvents(): void;
|
|
1640
|
+
/**
|
|
1641
|
+
* Reenables earlier disabled plugin
|
|
1642
|
+
*/
|
|
1489
1643
|
enable(): void;
|
|
1644
|
+
/**
|
|
1645
|
+
* Disables the plugin, unmounting it from the DOM
|
|
1646
|
+
*/
|
|
1490
1647
|
disable(): void;
|
|
1491
1648
|
private onError;
|
|
1492
1649
|
private onPlay;
|
|
@@ -1501,7 +1658,13 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
1501
1658
|
private updatePoster;
|
|
1502
1659
|
private showPoster;
|
|
1503
1660
|
private hidePoster;
|
|
1661
|
+
/**
|
|
1662
|
+
* @internal
|
|
1663
|
+
*/
|
|
1504
1664
|
render(): this;
|
|
1665
|
+
/**
|
|
1666
|
+
* @internal
|
|
1667
|
+
*/
|
|
1505
1668
|
destroy(): this;
|
|
1506
1669
|
}
|
|
1507
1670
|
|