@gcorevideo/player 2.21.1 → 2.21.4
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 +1 -1
- package/assets/audio-selector/track-selector.ejs +3 -3
- package/assets/bottom-gear/bottomgear.ejs +2 -2
- package/assets/media-control/container.scss +1 -1
- package/assets/media-control/media-control.ejs +1 -11
- package/assets/media-control/media-control.scss +49 -57
- package/assets/media-control/width270.scss +1 -1
- package/assets/media-control/width370.scss +7 -9
- package/assets/playback-rate/button.ejs +2 -2
- package/assets/playback-rate/list.ejs +4 -4
- package/assets/subtitles/combobox.ejs +10 -12
- package/assets/subtitles/string.ejs +1 -1
- package/assets/subtitles/style.scss +9 -16
- package/dist/core.js +5 -1
- package/dist/index.css +782 -794
- package/dist/index.js +240 -244
- package/dist/player.d.ts +141 -119
- package/dist/plugins/index.css +862 -874
- package/dist/plugins/index.js +222 -238
- package/docs/api/player.bottomgear.getelement.md +2 -2
- package/docs/api/player.bottomgear.md +1 -1
- package/docs/api/{player.subtitles.hide.md → player.closedcaptions.hide.md} +2 -2
- package/docs/api/{player.subtitles.md → player.closedcaptions.md} +11 -11
- package/docs/api/{player.subtitles.show.md → player.closedcaptions.show.md} +2 -2
- package/docs/api/player.closedcaptionspluginsettings.md +13 -0
- package/docs/api/player.gearitemelement.md +6 -4
- package/docs/api/player.gearoptionsitem.md +16 -0
- package/docs/api/player.md +48 -12
- package/docs/api/player.mediacontrol.putelement.md +2 -2
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/player.playbackrate.md +1 -1
- package/docs/api/player.subtitlespluginsettings.md +18 -0
- package/docs/api/player.texttrackitem.id.md +11 -0
- package/docs/api/player.texttrackitem.md +87 -0
- package/docs/api/player.texttrackitem.name.md +11 -0
- package/docs/api/player.texttrackitem.track.md +11 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.plugins.d.ts +2 -1
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +2 -1
- package/lib/playback/BasePlayback.d.ts +1 -0
- package/lib/playback/BasePlayback.d.ts.map +1 -1
- package/lib/playback/BasePlayback.js +3 -0
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +1 -0
- package/lib/playback.types.d.ts +5 -0
- package/lib/playback.types.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts +2 -3
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +6 -7
- package/lib/plugins/bottom-gear/BottomGear.d.ts +7 -3
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +4 -2
- package/lib/plugins/media-control/MediaControl.d.ts +5 -6
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +48 -39
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +1 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +4 -4
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +24 -14
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +118 -0
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -0
- package/lib/plugins/subtitles/ClosedCaptions.js +348 -0
- package/lib/plugins/subtitles/Subtitles.d.ts +31 -26
- package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
- package/lib/plugins/subtitles/Subtitles.js +138 -169
- package/lib/testUtils.d.ts +22 -18
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +22 -36
- package/package.json +1 -1
- package/src/index.plugins.ts +2 -1
- package/src/index.ts +1 -1
- package/src/playback/BasePlayback.ts +4 -0
- package/src/playback/dash-playback/DashPlayback.ts +1 -0
- package/src/playback.types.ts +6 -0
- package/src/plugins/audio-selector/AudioSelector.ts +9 -8
- package/src/plugins/bottom-gear/BottomGear.ts +14 -5
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +1 -1
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +2 -2
- package/src/plugins/media-control/MediaControl.ts +84 -60
- package/src/plugins/media-control/__tests__/MediaControl.test.ts +43 -0
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +175 -0
- package/src/plugins/picture-in-picture/PictureInPicture.ts +5 -5
- package/src/plugins/playback-rate/PlaybackRate.ts +143 -100
- package/src/plugins/playback-rate/__tests__/PlaybackRate.test.ts +65 -0
- package/src/plugins/playback-rate/__tests__/__snapshots__/PlaybackRate.test.ts.snap +11 -0
- package/src/plugins/subtitles/ClosedCaptions.ts +469 -0
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +58 -0
- package/src/plugins/subtitles/__tests__/__snapshots__/ClosedCaptions.test.ts.snap +25 -0
- package/src/testUtils.ts +22 -36
- package/temp/player.api.json +269 -89
- package/tsconfig.tsbuildinfo +1 -1
- package/src/plugins/index.ts +0 -39
- package/src/plugins/subtitles/Subtitles.ts +0 -496
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
**Signature:**
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
getElement(name:
|
|
13
|
+
getElement(name: GearOptionsItem): ZeptoResult | null;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Parameters
|
|
@@ -38,7 +38,7 @@ name
|
|
|
38
38
|
|
|
39
39
|
</td><td>
|
|
40
40
|
|
|
41
|
-
[
|
|
41
|
+
[GearOptionsItem](./player.gearoptionsitem.md)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
</td><td>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@gcorevideo/player](./player.md) > [
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClosedCaptions](./player.closedcaptions.md) > [hide](./player.closedcaptions.hide.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ClosedCaptions.hide() method
|
|
6
6
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@gcorevideo/player](./player.md) > [
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClosedCaptions](./player.closedcaptions.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ClosedCaptions class
|
|
6
6
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
@@ -12,31 +12,31 @@
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export declare class
|
|
15
|
+
export declare class ClosedCaptions extends UICorePlugin
|
|
16
16
|
```
|
|
17
17
|
**Extends:** UICorePlugin
|
|
18
18
|
|
|
19
19
|
## Remarks
|
|
20
20
|
|
|
21
|
+
The plugin is activated when closed captions tracks are provided with the media source. It shows a familiar "CC" button with a dropdown menu to select the subtitles language.
|
|
22
|
+
|
|
21
23
|
Depends on:
|
|
22
24
|
|
|
23
25
|
- [MediaControl](./player.mediacontrol.md)
|
|
24
26
|
|
|
25
|
-
Configuration options
|
|
26
|
-
|
|
27
|
-
- subtitles.language - The language of the subtitles to select by default.
|
|
27
|
+
Configuration options - [ClosedCaptionsPluginSettings](./player.closedcaptionspluginsettings.md)
|
|
28
28
|
|
|
29
29
|
## Example
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
import {
|
|
33
|
+
import { ClosedCaptions } from '@gcorevideo/player'
|
|
34
34
|
|
|
35
|
-
Player.registerPlugin(
|
|
35
|
+
Player.registerPlugin(ClosedCaptions)
|
|
36
36
|
|
|
37
37
|
new Player({
|
|
38
38
|
...
|
|
39
|
-
|
|
39
|
+
cc: {
|
|
40
40
|
language: 'en',
|
|
41
41
|
},
|
|
42
42
|
})
|
|
@@ -62,7 +62,7 @@ Description
|
|
|
62
62
|
</th></tr></thead>
|
|
63
63
|
<tbody><tr><td>
|
|
64
64
|
|
|
65
|
-
[hide()](./player.
|
|
65
|
+
[hide()](./player.closedcaptions.hide.md)
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
</td><td>
|
|
@@ -76,7 +76,7 @@ Description
|
|
|
76
76
|
</td></tr>
|
|
77
77
|
<tr><td>
|
|
78
78
|
|
|
79
|
-
[show()](./player.
|
|
79
|
+
[show()](./player.closedcaptions.show.md)
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
</td><td>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@gcorevideo/player](./player.md) > [
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClosedCaptions](./player.closedcaptions.md) > [show](./player.closedcaptions.show.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ClosedCaptions.show() method
|
|
6
6
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClosedCaptionsPluginSettings](./player.closedcaptionspluginsettings.md)
|
|
4
|
+
|
|
5
|
+
## ClosedCaptionsPluginSettings type
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
export type ClosedCaptionsPluginSettings = {
|
|
11
|
+
language?: string;
|
|
12
|
+
};
|
|
13
|
+
```
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
## GearItemElement type
|
|
6
6
|
|
|
7
|
-
> This API is
|
|
7
|
+
> Warning: This API is now obsolete.
|
|
8
|
+
>
|
|
9
|
+
> Use [GearOptionsItem](./player.gearoptionsitem.md) instead
|
|
8
10
|
>
|
|
9
|
-
|
|
10
|
-
An element inside the gear menu
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export type GearItemElement =
|
|
15
|
+
export type GearItemElement = GearOptionsItem;
|
|
16
16
|
```
|
|
17
|
+
**References:** [GearOptionsItem](./player.gearoptionsitem.md)
|
|
18
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [GearOptionsItem](./player.gearoptionsitem.md)
|
|
4
|
+
|
|
5
|
+
## GearOptionsItem type
|
|
6
|
+
|
|
7
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
An element inside the gear menu
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export type GearOptionsItem = 'quality' | 'rate' | 'nerd';
|
|
16
|
+
```
|
package/docs/api/player.md
CHANGED
|
@@ -10,7 +10,7 @@ Video player for the Gcore streaming platform
|
|
|
10
10
|
|
|
11
11
|
This package provides a video player for the Gcore streaming platform. It is built on top of the [Clappr](https://github.com/clappr/clappr) library and provides a framework for building custom integrations. Start with [Player](./player.player.md) for more information.
|
|
12
12
|
|
|
13
|
-
Various plugins (marked with `PLUGIN` keyword) are available to extend the
|
|
13
|
+
Various plugins (marked with `PLUGIN` keyword) are available to extend the core functionality with additional features.
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -119,6 +119,17 @@ Description
|
|
|
119
119
|
**_(BETA)_** `PLUGIN` that shows text over the seekbar to indicate the current clip.
|
|
120
120
|
|
|
121
121
|
|
|
122
|
+
</td></tr>
|
|
123
|
+
<tr><td>
|
|
124
|
+
|
|
125
|
+
[ClosedCaptions](./player.closedcaptions.md)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
</td><td>
|
|
129
|
+
|
|
130
|
+
**_(BETA)_** `PLUGIN` that provides a UI to select the subtitles when available.
|
|
131
|
+
|
|
132
|
+
|
|
122
133
|
</td></tr>
|
|
123
134
|
<tr><td>
|
|
124
135
|
|
|
@@ -317,17 +328,6 @@ Description
|
|
|
317
328
|
**_(BETA)_** `PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state
|
|
318
329
|
|
|
319
330
|
|
|
320
|
-
</td></tr>
|
|
321
|
-
<tr><td>
|
|
322
|
-
|
|
323
|
-
[Subtitles](./player.subtitles.md)
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
</td><td>
|
|
327
|
-
|
|
328
|
-
**_(BETA)_** `PLUGIN` that provides a UI to select the subtitles when available.
|
|
329
|
-
|
|
330
|
-
|
|
331
331
|
</td></tr>
|
|
332
332
|
<tr><td>
|
|
333
333
|
|
|
@@ -615,6 +615,15 @@ A level of quality within a media source.
|
|
|
615
615
|
**_(BETA)_** Plugin settings
|
|
616
616
|
|
|
617
617
|
|
|
618
|
+
</td></tr>
|
|
619
|
+
<tr><td>
|
|
620
|
+
|
|
621
|
+
[TextTrackItem](./player.texttrackitem.md)
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
</td><td>
|
|
625
|
+
|
|
626
|
+
|
|
618
627
|
</td></tr>
|
|
619
628
|
<tr><td>
|
|
620
629
|
|
|
@@ -655,6 +664,15 @@ Description
|
|
|
655
664
|
</th></tr></thead>
|
|
656
665
|
<tbody><tr><td>
|
|
657
666
|
|
|
667
|
+
[ClosedCaptionsPluginSettings](./player.closedcaptionspluginsettings.md)
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
</td><td>
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
</td></tr>
|
|
674
|
+
<tr><td>
|
|
675
|
+
|
|
658
676
|
[ContainerPluginConstructor](./player.containerpluginconstructor.md)
|
|
659
677
|
|
|
660
678
|
|
|
@@ -724,6 +742,15 @@ Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
|
724
742
|
[GearItemElement](./player.gearitemelement.md)
|
|
725
743
|
|
|
726
744
|
|
|
745
|
+
</td><td>
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
</td></tr>
|
|
749
|
+
<tr><td>
|
|
750
|
+
|
|
751
|
+
[GearOptionsItem](./player.gearoptionsitem.md)
|
|
752
|
+
|
|
753
|
+
|
|
727
754
|
</td><td>
|
|
728
755
|
|
|
729
756
|
**_(BETA)_** An element inside the gear menu
|
|
@@ -855,6 +882,15 @@ A media source to fetch the media data from
|
|
|
855
882
|
|
|
856
883
|
|
|
857
884
|
|
|
885
|
+
</td></tr>
|
|
886
|
+
<tr><td>
|
|
887
|
+
|
|
888
|
+
[SubtitlesPluginSettings](./player.subtitlespluginsettings.md)
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
</td><td>
|
|
892
|
+
|
|
893
|
+
|
|
858
894
|
</td></tr>
|
|
859
895
|
<tr><td>
|
|
860
896
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
**Signature:**
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
putElement(name: MediaControlElement, element:
|
|
13
|
+
putElement(name: MediaControlElement, element: HTMLElement): void;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Parameters
|
|
@@ -52,7 +52,7 @@ element
|
|
|
52
52
|
|
|
53
53
|
</td><td>
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
HTMLElement
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
</td><td>
|
|
@@ -12,5 +12,5 @@ Media control elements, mount points for additional plugins
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export type MediaControlElement = '
|
|
15
|
+
export type MediaControlElement = 'audiotracks' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'cc';
|
|
16
16
|
```
|
|
@@ -24,7 +24,7 @@ Depends on:
|
|
|
24
24
|
|
|
25
25
|
- [bottom\_gear](./player.bottomgear.md)
|
|
26
26
|
|
|
27
|
-
It renders a button in the gear menu, which opens a dropdown with the options to change the playback rate.
|
|
27
|
+
It renders a button in the gear menu, which opens a dropdown with the options to change the playback rate. Note that the playback rate change is supported only for VOD or DVR enabled live streams.
|
|
28
28
|
|
|
29
29
|
## Constructors
|
|
30
30
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [SubtitlesPluginSettings](./player.subtitlespluginsettings.md)
|
|
4
|
+
|
|
5
|
+
## SubtitlesPluginSettings type
|
|
6
|
+
|
|
7
|
+
> Warning: This API is now obsolete.
|
|
8
|
+
>
|
|
9
|
+
> Use [ClosedCaptionsPluginSettings](./player.closedcaptionspluginsettings.md) instead.
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export type SubtitlesPluginSettings = ClosedCaptionsPluginSettings;
|
|
16
|
+
```
|
|
17
|
+
**References:** [ClosedCaptionsPluginSettings](./player.closedcaptionspluginsettings.md)
|
|
18
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [TextTrackItem](./player.texttrackitem.md) > [id](./player.texttrackitem.id.md)
|
|
4
|
+
|
|
5
|
+
## TextTrackItem.id property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
id: number;
|
|
11
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [TextTrackItem](./player.texttrackitem.md)
|
|
4
|
+
|
|
5
|
+
## TextTrackItem interface
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
export interface TextTrackItem
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
<table><thead><tr><th>
|
|
16
|
+
|
|
17
|
+
Property
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
</th><th>
|
|
21
|
+
|
|
22
|
+
Modifiers
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</th><th>
|
|
26
|
+
|
|
27
|
+
Type
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</th><th>
|
|
31
|
+
|
|
32
|
+
Description
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
</th></tr></thead>
|
|
36
|
+
<tbody><tr><td>
|
|
37
|
+
|
|
38
|
+
[id](./player.texttrackitem.id.md)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</td><td>
|
|
45
|
+
|
|
46
|
+
number
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</td><td>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</td></tr>
|
|
53
|
+
<tr><td>
|
|
54
|
+
|
|
55
|
+
[name](./player.texttrackitem.name.md)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
</td><td>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
</td><td>
|
|
62
|
+
|
|
63
|
+
string
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
</td></tr>
|
|
70
|
+
<tr><td>
|
|
71
|
+
|
|
72
|
+
[track](./player.texttrackitem.track.md)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td><td>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
</td><td>
|
|
79
|
+
|
|
80
|
+
TextTrack
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</td><td>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</td></tr>
|
|
87
|
+
</tbody></table>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [TextTrackItem](./player.texttrackitem.md) > [name](./player.texttrackitem.name.md)
|
|
4
|
+
|
|
5
|
+
## TextTrackItem.name property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
name: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [TextTrackItem](./player.texttrackitem.md) > [track](./player.texttrackitem.track.md)
|
|
4
|
+
|
|
5
|
+
## TextTrackItem.track property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
track: TextTrack;
|
|
11
|
+
```
|
package/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* It is built on top of the {@link https://github.com/clappr/clappr | Clappr} library and provides a framework for building custom integrations.
|
|
7
7
|
* Start with {@link Player} for more information.
|
|
8
8
|
*
|
|
9
|
-
* Various plugins (marked with `PLUGIN` keyword) are available to extend the
|
|
9
|
+
* Various plugins (marked with `PLUGIN` keyword) are available to extend the core functionality with additional features.
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
12
|
* import { Player, MediaControl, ErrorScreen } from '@gcorevideo/player'
|
package/lib/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* It is built on top of the {@link https://github.com/clappr/clappr | Clappr} library and provides a framework for building custom integrations.
|
|
7
7
|
* Start with {@link Player} for more information.
|
|
8
8
|
*
|
|
9
|
-
* Various plugins (marked with `PLUGIN` keyword) are available to extend the
|
|
9
|
+
* Various plugins (marked with `PLUGIN` keyword) are available to extend the core functionality with additional features.
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
12
|
* import { Player, MediaControl, ErrorScreen } from '@gcorevideo/player'
|
package/lib/index.plugins.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export * from "./plugins/share/Share.js";
|
|
|
23
23
|
export * from "./plugins/skip-time/SkipTime.js";
|
|
24
24
|
export * from "./plugins/spinner-three-bounce/SpinnerThreeBounce.js";
|
|
25
25
|
export * from "./plugins/source-controller/SourceController.js";
|
|
26
|
-
export * from "./plugins/subtitles/
|
|
26
|
+
export * from "./plugins/subtitles/ClosedCaptions.js";
|
|
27
|
+
export { ClosedCaptions as Subtitles } from "./plugins/subtitles/ClosedCaptions.js";
|
|
27
28
|
export * from "./plugins/telemetry/Telemetry.js";
|
|
28
29
|
export * from "./plugins/thumbnails/Thumbnails.js";
|
|
29
30
|
export * from "./plugins/volume-fade/VolumeFade.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.plugins.d.ts","sourceRoot":"","sources":["../src/index.plugins.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAEnC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAA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AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sDAAsD,CAAC;AACrE,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACpF,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAGnD,cAAc,qCAAqC,CAAC"}
|
package/lib/index.plugins.js
CHANGED
|
@@ -24,7 +24,8 @@ export * from "./plugins/share/Share.js";
|
|
|
24
24
|
export * from "./plugins/skip-time/SkipTime.js";
|
|
25
25
|
export * from "./plugins/spinner-three-bounce/SpinnerThreeBounce.js";
|
|
26
26
|
export * from "./plugins/source-controller/SourceController.js";
|
|
27
|
-
export * from "./plugins/subtitles/
|
|
27
|
+
export * from "./plugins/subtitles/ClosedCaptions.js";
|
|
28
|
+
export { ClosedCaptions as Subtitles } from "./plugins/subtitles/ClosedCaptions.js"; // TODO remove in future versions
|
|
28
29
|
export * from "./plugins/telemetry/Telemetry.js";
|
|
29
30
|
export * from "./plugins/thumbnails/Thumbnails.js";
|
|
30
31
|
// _ vast-ads
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlayback.d.ts","sourceRoot":"","sources":["../../src/playback/BasePlayback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,UAAU,EAAe,MAAM,cAAc,CAAA;AAI5E;;;GAGG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,WAAW,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY;IA0BlD;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM;IAInB,UAAU;CAIpB"}
|
|
1
|
+
{"version":3,"file":"BasePlayback.d.ts","sourceRoot":"","sources":["../../src/playback/BasePlayback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,UAAU,EAAe,MAAM,cAAc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AAC,QAAQ;IAMhB,eAAe,CAAC,IAAI,EAAE,MAAM;IAI5B,IAAI,WAAW,IAAI,UAAU,EAAE,CAK9B;IAGD,IAAI,iBAAiB,IAAI,UAAU,GAAG,IAAI,CAQzC;IAED,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAQlC,OAAO,CAAC,gBAAgB;CAOzB"}
|
|
@@ -268,6 +268,7 @@ export default class DashPlayback extends BasePlayback {
|
|
|
268
268
|
this.trigger(Events.PLAYBACK_DVR, status);
|
|
269
269
|
this.trigger(Events.PLAYBACK_STATS_ADD, { dvr: status });
|
|
270
270
|
}
|
|
271
|
+
// TODO move to the base class
|
|
271
272
|
_updateSettings() {
|
|
272
273
|
if (this._playbackType === Playback.VOD) {
|
|
273
274
|
// @ts-expect-error
|
package/lib/playback.types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playback.types.d.ts","sourceRoot":"","sources":["../src/playback.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,OAAO,kBAAkB;IACzB;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,+BAA+B;CACvD;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF"}
|
|
1
|
+
{"version":3,"file":"playback.types.d.ts","sourceRoot":"","sources":["../src/playback.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,OAAO,kBAAkB;IACzB;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,+BAA+B;CACvD;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;CACjB"}
|
|
@@ -33,14 +33,13 @@ export declare class AudioSelector extends UICorePlugin {
|
|
|
33
33
|
*/
|
|
34
34
|
get attributes(): {
|
|
35
35
|
class: string;
|
|
36
|
-
'data-track-selector': string;
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* @internal
|
|
40
39
|
*/
|
|
41
40
|
get events(): {
|
|
42
|
-
'click [data-
|
|
43
|
-
'click [data-
|
|
41
|
+
'click [data-audiotracks-select]': string;
|
|
42
|
+
'click [data-audiotracks-button]': string;
|
|
44
43
|
};
|
|
45
44
|
/**
|
|
46
45
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioSelector.d.ts","sourceRoot":"","sources":["../../../src/plugins/audio-selector/AudioSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAY,MAAM,cAAc,CAAA;AAQ7D,OAAO,2CAA2C,CAAA;
|
|
1
|
+
{"version":3,"file":"AudioSelector.d.ts","sourceRoot":"","sources":["../../../src/plugins/audio-selector/AudioSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAY,MAAM,cAAc,CAAA;AAQ7D,OAAO,2CAA2C,CAAA;AASlD;;;;;;;;;GASG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,YAAY,CAA0B;IAE9C,OAAO,CAAC,MAAM,CAAmB;IAEjC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,MAAM,KAAK,OAAO,WAEjB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,UAAU;;MAKtB;IAED;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACM,MAAM;IAkBf,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,qBAAqB;CAW9B"}
|
|
@@ -44,8 +44,7 @@ export class AudioSelector extends UICorePlugin {
|
|
|
44
44
|
*/
|
|
45
45
|
get attributes() {
|
|
46
46
|
return {
|
|
47
|
-
class: 'media-control-
|
|
48
|
-
'data-track-selector': '',
|
|
47
|
+
class: 'media-control-audiotracks',
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
/**
|
|
@@ -53,8 +52,8 @@ export class AudioSelector extends UICorePlugin {
|
|
|
53
52
|
*/
|
|
54
53
|
get events() {
|
|
55
54
|
return {
|
|
56
|
-
'click [data-
|
|
57
|
-
'click [data-
|
|
55
|
+
'click [data-audiotracks-select]': 'onTrackSelect',
|
|
56
|
+
'click [data-audiotracks-button]': 'onShowLevelSelectMenu',
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
59
|
/**
|
|
@@ -117,7 +116,7 @@ export class AudioSelector extends UICorePlugin {
|
|
|
117
116
|
const mediaControl = this.core.getPlugin('media_control');
|
|
118
117
|
this.$el.html(AudioSelector.template({ tracks: this.tracks, title: this.getTitle() }));
|
|
119
118
|
this.$('.audio-arrow').append(audioArrow);
|
|
120
|
-
mediaControl.putElement('
|
|
119
|
+
mediaControl.putElement('audiotracks', this.el);
|
|
121
120
|
this.updateText();
|
|
122
121
|
this.highlightCurrentTrack();
|
|
123
122
|
return this;
|
|
@@ -130,7 +129,7 @@ export class AudioSelector extends UICorePlugin {
|
|
|
130
129
|
return this.tracks.find((track) => track.id === id);
|
|
131
130
|
}
|
|
132
131
|
onTrackSelect(event) {
|
|
133
|
-
const id = event.target?.dataset?.
|
|
132
|
+
const id = event.target?.dataset?.audiotracksSelect;
|
|
134
133
|
if (id) {
|
|
135
134
|
this.selectAudioTrack(id);
|
|
136
135
|
}
|
|
@@ -162,7 +161,7 @@ export class AudioSelector extends UICorePlugin {
|
|
|
162
161
|
}
|
|
163
162
|
trackElement(id) {
|
|
164
163
|
return this.$('ul a' +
|
|
165
|
-
(id !== undefined ? '[data-
|
|
164
|
+
(id !== undefined ? '[data-audiotracks-select="' + id + '"]' : '')).parent();
|
|
166
165
|
}
|
|
167
166
|
getTitle() {
|
|
168
167
|
return this.currentTrack?.label || '';
|