@gcorevideo/player 2.20.21 → 2.21.1
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/audio-selector/style.scss +48 -82
- package/assets/audio-selector/track-selector.ejs +3 -3
- package/assets/bottom-gear/bottomgear.ejs +10 -12
- package/assets/bottom-gear/gear-sub-menu.scss +0 -15
- package/assets/bottom-gear/gear.scss +3 -32
- package/assets/media-control/media-control.ejs +5 -20
- package/assets/media-control/media-control.scss +124 -34
- package/assets/media-control/width370.scss +32 -104
- package/assets/picture-in-picture/button.ejs +1 -1
- package/assets/picture-in-picture/button.scss +5 -4
- package/dist/core.js +151 -24
- package/dist/index.css +1063 -1149
- package/dist/index.js +287 -283
- package/dist/player.d.ts +19 -16
- package/dist/plugins/index.css +953 -1039
- package/dist/plugins/index.js +709 -23402
- package/docs/api/player.audioselector.md +4 -59
- package/docs/api/player.md +1 -1
- package/docs/api/player.mediacontrol.getelement.md +5 -0
- package/docs/api/player.mediacontrol.md +14 -0
- package/docs/api/{player.audioselector.updatecurrenttrack.md → player.mediacontrol.putelement.md} +7 -7
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/{player.audioselector.starttrackswitch.md → player.pictureinpicture.attributes.md} +5 -7
- package/docs/api/player.pictureinpicture.md +45 -0
- package/lib/playback/BasePlayback.d.ts +0 -1
- package/lib/playback/BasePlayback.d.ts.map +1 -1
- package/lib/playback/BasePlayback.js +0 -1
- package/lib/playback/HTML5Video.d.ts +4 -0
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +57 -6
- package/lib/playback/dash-playback/DashPlayback.d.ts +5 -0
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +48 -4
- package/lib/playback/hls-playback/HlsPlayback.d.ts +31 -25
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +47 -14
- package/lib/plugins/audio-selector/AudioSelector.d.ts +12 -11
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +65 -185
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +10 -9
- package/lib/plugins/level-selector/LevelSelector.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +3 -3
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +17 -9
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +3 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +6 -1
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +0 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +0 -2
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -18
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +2 -0
- package/package.json +1 -1
- package/src/playback/BasePlayback.ts +0 -1
- package/src/playback/HTML5Video.ts +61 -6
- package/src/playback/dash-playback/DashPlayback.ts +64 -6
- package/src/playback/hls-playback/HlsPlayback.ts +82 -40
- package/src/plugins/audio-selector/AudioSelector.ts +84 -278
- package/src/plugins/bottom-gear/BottomGear.ts +11 -10
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +1 -3
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +14 -37
- package/src/plugins/level-selector/LevelSelector.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +18 -13
- package/src/plugins/picture-in-picture/PictureInPicture.ts +7 -1
- package/src/plugins/source-controller/SourceController.ts +0 -1
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -20
- package/src/testUtils.ts +2 -0
- package/src/typings/globals.d.ts +19 -0
- package/temp/player.api.json +102 -143
- package/tsconfig.tsbuildinfo +1 -1
- package/assets/media-control/plugins.scss +0 -94
- package/docs/api/player.audioselector.highlightcurrenttrack.md +0 -18
package/dist/player.d.ts
CHANGED
|
@@ -27,13 +27,10 @@
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
import { $ } from '@clappr/core';
|
|
30
|
-
import { AudioTrackLoadedData } from 'hls.js';
|
|
31
|
-
import { AudioTrackSwitchedData } from 'hls.js';
|
|
32
30
|
import { Container } from '@clappr/core';
|
|
33
31
|
import { ContainerPlugin } from '@clappr/core';
|
|
34
32
|
import { Core } from '@clappr/core';
|
|
35
33
|
import { CorePlugin } from '@clappr/core';
|
|
36
|
-
import { Events } from 'hls.js';
|
|
37
34
|
import { Logger } from '@gcorevideo/utils';
|
|
38
35
|
import { LogTracer } from '@gcorevideo/utils';
|
|
39
36
|
import { reportError as reportError_2 } from '@gcorevideo/utils';
|
|
@@ -45,11 +42,16 @@ import { UICorePlugin } from '@clappr/core';
|
|
|
45
42
|
import { UIObject } from '@clappr/core';
|
|
46
43
|
|
|
47
44
|
/**
|
|
48
|
-
* `PLUGIN` that
|
|
45
|
+
* `PLUGIN` that makes possible to switch audio tracks via the media control UI.
|
|
49
46
|
* @beta
|
|
47
|
+
* @remarks
|
|
48
|
+
* The plugin is activated when there are multiple audio tracks available.
|
|
49
|
+
* The plugin adds a button showing the current audio track and a dropdown to switch to another audio track.
|
|
50
|
+
* Depends on:
|
|
51
|
+
*
|
|
52
|
+
* - {@link MediaControl}
|
|
50
53
|
*/
|
|
51
54
|
export declare class AudioSelector extends UICorePlugin {
|
|
52
|
-
private selectedTrackId;
|
|
53
55
|
private currentTrack;
|
|
54
56
|
private tracks;
|
|
55
57
|
/**
|
|
@@ -85,11 +87,11 @@ export declare class AudioSelector extends UICorePlugin {
|
|
|
85
87
|
* @internal
|
|
86
88
|
*/
|
|
87
89
|
bindEvents(): void;
|
|
88
|
-
private
|
|
90
|
+
private onCoreReady;
|
|
89
91
|
private bindPlaybackEvents;
|
|
90
92
|
private setupAudioTrackListeners;
|
|
91
93
|
private onStop;
|
|
92
|
-
private
|
|
94
|
+
private onActiveContainerChanged;
|
|
93
95
|
private shouldRender;
|
|
94
96
|
/**
|
|
95
97
|
* @internal
|
|
@@ -98,7 +100,7 @@ export declare class AudioSelector extends UICorePlugin {
|
|
|
98
100
|
private fillTracks;
|
|
99
101
|
private findTrackBy;
|
|
100
102
|
private onTrackSelect;
|
|
101
|
-
private
|
|
103
|
+
private selectAudioTrack;
|
|
102
104
|
private onShowLevelSelectMenu;
|
|
103
105
|
private hideSelectTrackMenu;
|
|
104
106
|
private toggleContextMenu;
|
|
@@ -106,12 +108,9 @@ export declare class AudioSelector extends UICorePlugin {
|
|
|
106
108
|
private buttonElementText;
|
|
107
109
|
private trackElement;
|
|
108
110
|
private getTitle;
|
|
109
|
-
startTrackSwitch
|
|
111
|
+
private startTrackSwitch;
|
|
110
112
|
private updateText;
|
|
111
|
-
|
|
112
|
-
private updateCurrentTrackW3C;
|
|
113
|
-
private setCurrentTrack;
|
|
114
|
-
highlightCurrentTrack(): void;
|
|
113
|
+
private highlightCurrentTrack;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
/**
|
|
@@ -206,7 +205,6 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
206
205
|
*/
|
|
207
206
|
get attributes(): {
|
|
208
207
|
class: string;
|
|
209
|
-
'data-track-selector': string;
|
|
210
208
|
};
|
|
211
209
|
/**
|
|
212
210
|
* @internal
|
|
@@ -243,6 +241,7 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
243
241
|
refresh(): void;
|
|
244
242
|
private toggleGearMenu;
|
|
245
243
|
private hide;
|
|
244
|
+
private onCoreReady;
|
|
246
245
|
}
|
|
247
246
|
|
|
248
247
|
/**
|
|
@@ -993,7 +992,6 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
993
992
|
private userKeepVisible;
|
|
994
993
|
private verticalVolume;
|
|
995
994
|
private $audioTracksSelector;
|
|
996
|
-
private $bottomGear;
|
|
997
995
|
private $clipText;
|
|
998
996
|
private $clipTextContainer;
|
|
999
997
|
private $duration;
|
|
@@ -1159,6 +1157,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1159
1157
|
* Get a media control element DOM node
|
|
1160
1158
|
* @param name - The name of the media control element
|
|
1161
1159
|
* @returns The DOM node to render to or extend
|
|
1160
|
+
* @deprecated Use {@link MediaControl.putElement} instead
|
|
1162
1161
|
* @remarks
|
|
1163
1162
|
* Use this method to render custom media control UI in a plugin
|
|
1164
1163
|
* @example
|
|
@@ -1174,6 +1173,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1174
1173
|
* ```
|
|
1175
1174
|
*/
|
|
1176
1175
|
getElement(name: MediaControlElement): ZeptoResult | null;
|
|
1176
|
+
putElement(name: MediaControlElement, element: ZeptoResult): void;
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Get the right panel area to append custom elements to
|
|
1179
1179
|
* @returns ZeptoSelector of the right panel element
|
|
@@ -1224,7 +1224,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1224
1224
|
* Media control elements, mount points for additional plugins
|
|
1225
1225
|
* @beta
|
|
1226
1226
|
*/
|
|
1227
|
-
export declare type MediaControlElement = 'audioTracksSelector' | '
|
|
1227
|
+
export declare type MediaControlElement = 'audioTracksSelector' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'subtitlesSelector';
|
|
1228
1228
|
|
|
1229
1229
|
/**
|
|
1230
1230
|
* Custom events emitted by the plugins to communicate with one another
|
|
@@ -1368,6 +1368,9 @@ export declare class PictureInPicture extends UICorePlugin {
|
|
|
1368
1368
|
get events(): {
|
|
1369
1369
|
'click button': string;
|
|
1370
1370
|
};
|
|
1371
|
+
get attributes(): {
|
|
1372
|
+
class: string;
|
|
1373
|
+
};
|
|
1371
1374
|
private get videoElement();
|
|
1372
1375
|
/**
|
|
1373
1376
|
* @internal
|