@gcorevideo/player 2.22.0 → 2.22.2
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/bottom-gear/bottomgear copy.ejs +10 -0
- package/assets/bottom-gear/bottomgear.ejs +4 -8
- package/assets/bottom-gear/gear-sub-menu.scss +0 -1
- package/assets/bottom-gear/gear.scss +0 -1
- package/assets/clappr-nerd-stats/button.ejs +3 -3
- package/assets/level-selector/button.ejs +2 -4
- package/assets/level-selector/list.ejs +14 -10
- package/assets/level-selector/style.scss +9 -4
- package/assets/media-control/container.scss +1 -1
- package/assets/playback-rate/list.ejs +5 -5
- package/assets/spinner-three-bounce/spinner.scss +1 -1
- package/dist/core.js +1 -2
- package/dist/index.css +885 -884
- package/dist/index.js +3938 -3779
- package/dist/player.d.ts +246 -108
- package/dist/plugins/index.css +1230 -1229
- package/dist/plugins/index.js +4036 -3878
- package/docs/api/player.bottomgear.additem.md +95 -0
- package/docs/api/player.bottomgear.md +63 -19
- package/docs/api/player.bottomgear.refresh.md +5 -1
- package/docs/api/player.clapprnerdstats.md +0 -2
- package/docs/api/player.clicktopause.md +1 -1
- package/docs/api/player.closedcaptions.md +2 -2
- package/docs/api/player.closedcaptionspluginsettings.md +5 -0
- package/docs/api/player.errorscreen.md +18 -4
- package/docs/api/player.errorscreenpluginsettings.md +1 -4
- package/docs/api/player.errorscreensettings.md +15 -0
- package/docs/api/{player.mediacontrolevents.md → player.gearevents.md} +7 -7
- package/docs/api/player.levelselector.events.md +0 -1
- package/docs/api/player.levelselector.md +1 -1
- package/docs/api/player.md +33 -36
- package/docs/api/{player.bottomgear.setcontent.md → player.mediacontrol.handlecustomarea.md} +5 -9
- package/docs/api/player.mediacontrol.md +10 -24
- package/docs/api/player.mediacontrol.putelement.md +2 -2
- package/docs/api/{player.bottomgear.getelement.md → player.mediacontrol.toggleelement.md} +23 -9
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/player.playbackrate.md +22 -3
- package/docs/api/{player.gearoptionsitem.md → player.playbackrateoption.md} +6 -4
- package/docs/api/{player.mediacontrol.getcenterpanel.md → player.playbackratesettings.md} +8 -6
- package/docs/api/player.sourcecontroller._constructor_.md +49 -0
- package/docs/api/player.sourcecontroller.md +70 -7
- package/docs/api/player.spinnerevents.md +1 -4
- package/docs/api/player.spinnerthreebounce._constructor_.md +0 -3
- package/docs/api/player.spinnerthreebounce.hide.md +0 -3
- package/docs/api/player.spinnerthreebounce.md +5 -8
- package/docs/api/player.spinnerthreebounce.show.md +2 -5
- package/lib/internal.types.d.ts +5 -0
- package/lib/internal.types.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +0 -1
- package/lib/playback.types.d.ts +0 -5
- package/lib/playback.types.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts +93 -20
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +145 -37
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +2 -3
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +18 -15
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +3 -2
- package/lib/plugins/dvr-controls/DvrControls.js +1 -1
- package/lib/plugins/error-screen/ErrorScreen.d.ts +29 -4
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +17 -2
- package/lib/plugins/level-selector/LevelSelector.d.ts +8 -11
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +66 -102
- package/lib/plugins/media-control/MediaControl.d.ts +6 -15
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +36 -30
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +7 -2
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +42 -14
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +101 -83
- package/lib/plugins/source-controller/SourceController.d.ts +40 -4
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +41 -4
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +8 -6
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +10 -6
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +7 -7
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +3 -3
- package/lib/testUtils.d.ts +1 -0
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +13 -0
- package/package.json +1 -1
- package/src/internal.types.ts +6 -0
- package/src/playback/dash-playback/DashPlayback.ts +0 -1
- package/src/playback.types.ts +0 -5
- package/src/plugins/bottom-gear/BottomGear.ts +186 -77
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +21 -5
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +5 -12
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +27 -25
- package/src/plugins/click-to-pause/ClickToPause.ts +3 -2
- package/src/plugins/dvr-controls/DvrControls.ts +1 -1
- package/src/plugins/dvr-controls/__tests__/DvrControls.test.ts +1 -1
- package/src/plugins/error-screen/ErrorScreen.ts +30 -4
- package/src/plugins/level-selector/LevelSelector.ts +80 -120
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +69 -79
- package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +38 -71
- package/src/plugins/media-control/MediaControl.ts +50 -36
- package/src/plugins/media-control/__tests__/MediaControl.test.ts +4 -4
- package/src/plugins/picture-in-picture/PictureInPicture.ts +7 -2
- package/src/plugins/playback-rate/PlaybackRate.ts +136 -108
- package/src/plugins/playback-rate/__tests__/PlaybackRate.test.ts +84 -37
- package/src/plugins/playback-rate/__tests__/__snapshots__/PlaybackRate.test.ts.snap +55 -6
- package/src/plugins/source-controller/SourceController.ts +41 -4
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +10 -6
- package/src/plugins/subtitles/ClosedCaptions.ts +9 -10
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +1 -1
- package/src/testUtils.ts +14 -0
- package/src/typings/vitest.d.ts +1 -0
- package/temp/player.api.json +303 -370
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.gearitemelement.md +0 -18
- package/docs/api/player.mediacontrol.getleftpanel.md +0 -22
- package/docs/api/player.mediacontrol.getrightpanel.md +0 -22
- package/docs/api/player.subtitlespluginsettings.md +0 -18
- package/docs/api/player.texttrackitem.id.md +0 -11
- package/docs/api/player.texttrackitem.md +0 -87
- package/docs/api/player.texttrackitem.name.md +0 -11
- package/docs/api/player.texttrackitem.track.md +0 -11
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [BottomGear](./player.bottomgear.md) > [addItem](./player.bottomgear.additem.md)
|
|
4
|
+
|
|
5
|
+
## BottomGear.addItem() method
|
|
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
|
+
Adds a custom option to the gear menu
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
addItem(name: string, $subMenu?: ZeptoResult): ZeptoResult;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
<table><thead><tr><th>
|
|
21
|
+
|
|
22
|
+
Parameter
|
|
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
|
+
name
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
string
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
A unique name of the option
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td></tr>
|
|
52
|
+
<tr><td>
|
|
53
|
+
|
|
54
|
+
$subMenu
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</td><td>
|
|
58
|
+
|
|
59
|
+
[ZeptoResult](./player.zeptoresult.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
_(Optional)_ The submenu to attach to the option
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
</td></tr>
|
|
68
|
+
</tbody></table>
|
|
69
|
+
**Returns:**
|
|
70
|
+
|
|
71
|
+
[ZeptoResult](./player.zeptoresult.md)
|
|
72
|
+
|
|
73
|
+
The added item placeholder to attach custom markup
|
|
74
|
+
|
|
75
|
+
## Remarks
|
|
76
|
+
|
|
77
|
+
When called with $submenu param, a click on the added item will toggle the submenu visibility.
|
|
78
|
+
|
|
79
|
+
When added without submenu, it's responsibility of the caller to handle the click event however needed.
|
|
80
|
+
|
|
81
|
+
## Example
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
class MyPlugin extends UICorePlugin {
|
|
86
|
+
override render() {
|
|
87
|
+
this.$el.html('<div class="my-awesome-settings">...</div>')
|
|
88
|
+
this.core.getPlugin('bottom_gear')
|
|
89
|
+
?.addItem('custom', this.$el)
|
|
90
|
+
.html($('<button>Custom settings</button>'))
|
|
91
|
+
return this
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
@@ -7,7 +7,7 @@
|
|
|
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
|
>
|
|
9
9
|
|
|
10
|
-
`PLUGIN` that adds
|
|
10
|
+
`PLUGIN` that adds a button to extend the media controls UI with extra options.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -18,12 +18,70 @@ export declare class BottomGear extends UICorePlugin
|
|
|
18
18
|
|
|
19
19
|
## Remarks
|
|
20
20
|
|
|
21
|
-
The
|
|
21
|
+
The plugin renders small gear icon to the right of the media controls. It provides a base for attaching custom settings UI in the gear menu
|
|
22
22
|
|
|
23
23
|
Depends on:
|
|
24
24
|
|
|
25
25
|
- [MediaControl](./player.mediacontrol.md)
|
|
26
26
|
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
You can use bottom gear to add custom settings UI to the gear menu.
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { BottomGear } from '@gcorevideo/player/plugins/bottom-gear';
|
|
33
|
+
|
|
34
|
+
class CustomOptionsPlugin extends UICorePlugin {
|
|
35
|
+
// ...
|
|
36
|
+
|
|
37
|
+
override get events() {
|
|
38
|
+
return {
|
|
39
|
+
'click #my-button': 'doMyAction',
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private doMyAction() {
|
|
44
|
+
// ...
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
override render() {
|
|
48
|
+
const bottomGear = this.core.getPlugin('bottom_gear');
|
|
49
|
+
if (!bottomGear) {
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
this.$el.html('<button class="custom-option">Custom option</button>');
|
|
53
|
+
// Put rendered element into the gear menu
|
|
54
|
+
bottomGear.addItem('custom').html(this.$el)
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// alternatively, add an option with a submenu
|
|
59
|
+
override render() {
|
|
60
|
+
this.$el.html(template(templateHtml)({
|
|
61
|
+
// ...
|
|
62
|
+
})));
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private addGearOption() {
|
|
67
|
+
this.core.getPlugin('bottom_gear')
|
|
68
|
+
.addItem('custom', this.$el)
|
|
69
|
+
.html($('<button class="custom-option">Custom option</button>'))
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
override bindEvents() {
|
|
73
|
+
this.listenToOnce(this.core, ClapprEvents.CORE_READY, () => {
|
|
74
|
+
const bottomGear = this.core.getPlugin('bottom_gear');
|
|
75
|
+
assert(bottomGear, 'bottom_gear plugin is required');
|
|
76
|
+
// simple case
|
|
77
|
+
this.listenTo(bottomGear, GearEvents.RENDERED, this.render);
|
|
78
|
+
// or with a submenu
|
|
79
|
+
this.listenTo(bottomGear, GearEvents.RENDERED, this.addGearOption);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
27
85
|
## Methods
|
|
28
86
|
|
|
29
87
|
<table><thead><tr><th>
|
|
@@ -44,7 +102,7 @@ Description
|
|
|
44
102
|
</th></tr></thead>
|
|
45
103
|
<tbody><tr><td>
|
|
46
104
|
|
|
47
|
-
[
|
|
105
|
+
[addItem(name, $subMenu)](./player.bottomgear.additem.md)
|
|
48
106
|
|
|
49
107
|
|
|
50
108
|
</td><td>
|
|
@@ -52,7 +110,7 @@ Description
|
|
|
52
110
|
|
|
53
111
|
</td><td>
|
|
54
112
|
|
|
55
|
-
**_(BETA)_**
|
|
113
|
+
**_(BETA)_** Adds a custom option to the gear menu
|
|
56
114
|
|
|
57
115
|
|
|
58
116
|
</td></tr>
|
|
@@ -66,21 +124,7 @@ Description
|
|
|
66
124
|
|
|
67
125
|
</td><td>
|
|
68
126
|
|
|
69
|
-
**_(BETA)_**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</td></tr>
|
|
73
|
-
<tr><td>
|
|
74
|
-
|
|
75
|
-
[setContent(content)](./player.bottomgear.setcontent.md)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</td><td>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</td><td>
|
|
82
|
-
|
|
83
|
-
**_(BETA)_** Replaces the content of the gear menu
|
|
127
|
+
**_(BETA)_** Collapses any submenu open back to the gear menu.
|
|
84
128
|
|
|
85
129
|
|
|
86
130
|
</td></tr>
|
|
@@ -7,7 +7,7 @@
|
|
|
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
|
>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Collapses any submenu open back to the gear menu.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -18,3 +18,7 @@ refresh(): void;
|
|
|
18
18
|
|
|
19
19
|
void
|
|
20
20
|
|
|
21
|
+
## Remarks
|
|
22
|
+
|
|
23
|
+
Should be called by the UI plugin that added a gear item with a submenu when the latter is closed (e.g., when a "back" button is clicked).
|
|
24
|
+
|
|
@@ -7,7 +7,7 @@
|
|
|
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
|
>
|
|
9
9
|
|
|
10
|
-
`PLUGIN` that
|
|
10
|
+
A small `PLUGIN` that toggles the playback state on click over the video container
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ export declare class ClosedCaptions extends UICorePlugin
|
|
|
18
18
|
|
|
19
19
|
## Remarks
|
|
20
20
|
|
|
21
|
-
The plugin is activated when closed captions tracks are
|
|
21
|
+
The plugin is activated when closed captions tracks are detected in the media source. It shows a familiar "CC" button with a dropdown menu to select the subtitles language.
|
|
22
22
|
|
|
23
23
|
Depends on:
|
|
24
24
|
|
|
@@ -37,7 +37,7 @@ Player.registerPlugin(ClosedCaptions)
|
|
|
37
37
|
new Player({
|
|
38
38
|
...
|
|
39
39
|
cc: {
|
|
40
|
-
language: '
|
|
40
|
+
language: 'pt-BR',
|
|
41
41
|
},
|
|
42
42
|
})
|
|
43
43
|
```
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## ClosedCaptionsPluginSettings type
|
|
6
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
|
+
Configuration options for the [ClosedCaptions](./player.closedcaptions.md) plugin.
|
|
11
|
+
|
|
7
12
|
**Signature:**
|
|
8
13
|
|
|
9
14
|
```typescript
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorScreen class
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
`PLUGIN` that displays errors nicely in the overlay on top of the player.
|
|
7
|
+
`PLUGIN` that displays fatal errors nicely in the overlay on top of the player.
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
13
10
|
|
|
@@ -16,3 +13,20 @@ export declare class ErrorScreen extends UICorePlugin
|
|
|
16
13
|
```
|
|
17
14
|
**Extends:** UICorePlugin
|
|
18
15
|
|
|
16
|
+
## Remarks
|
|
17
|
+
|
|
18
|
+
A fatal error is an error that prevents the player from playing the content. It's usually a network error that persists after multiple retries.
|
|
19
|
+
|
|
20
|
+
The error screen should not be confused with the content stub that is shown when no media sources are available. This can happen due to the lack of the support of the given sources type or because the sources are misconfigured (e.g., omitted).
|
|
21
|
+
|
|
22
|
+
Configuration options - [ErrorScreenPluginSettings](./player.errorscreenpluginsettings.md)
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { ErrorScreen, Player } from '@gcorevideo/player'
|
|
29
|
+
|
|
30
|
+
Player.registerPlugin(ErrorScreen)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorScreenPluginSettings type
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
Configuration options for the [error screen](./player.errorscreen.md) plugin.
|
|
7
|
+
Configuration options for the [ErrorScreen](./player.errorscreen.md) plugin.
|
|
11
8
|
|
|
12
9
|
**Signature:**
|
|
13
10
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ErrorScreenSettings](./player.errorscreensettings.md)
|
|
4
|
+
|
|
5
|
+
## ErrorScreenSettings type
|
|
6
|
+
|
|
7
|
+
Settings for the [ErrorScreen](./player.errorscreen.md) plugin.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type ErrorScreenSettings = {
|
|
13
|
+
noReload?: boolean;
|
|
14
|
+
};
|
|
15
|
+
```
|
|
@@ -1,18 +1,18 @@
|
|
|
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) > [GearEvents](./player.gearevents.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## GearEvents enum
|
|
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
|
>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Events triggered by the plugin
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export declare enum
|
|
15
|
+
export declare enum GearEvents
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Enumeration Members
|
|
@@ -35,17 +35,17 @@ Description
|
|
|
35
35
|
</th></tr></thead>
|
|
36
36
|
<tbody><tr><td>
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
RENDERED
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
</td><td>
|
|
42
42
|
|
|
43
|
-
`"
|
|
43
|
+
`"rendered"`
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
</td><td>
|
|
47
47
|
|
|
48
|
-
**_(BETA)_**
|
|
48
|
+
**_(BETA)_** Use this event to accurately attach an item to the gear menu
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
</td></tr>
|
package/docs/api/player.md
CHANGED
|
@@ -72,7 +72,7 @@ Description
|
|
|
72
72
|
|
|
73
73
|
</td><td>
|
|
74
74
|
|
|
75
|
-
**_(BETA)_** `PLUGIN` that adds
|
|
75
|
+
**_(BETA)_** `PLUGIN` that adds a button to extend the media controls UI with extra options.
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
</td></tr>
|
|
@@ -105,7 +105,7 @@ Description
|
|
|
105
105
|
|
|
106
106
|
</td><td>
|
|
107
107
|
|
|
108
|
-
**_(BETA)_** `PLUGIN` that
|
|
108
|
+
**_(BETA)_** A small `PLUGIN` that toggles the playback state on click over the video container
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
</td></tr>
|
|
@@ -160,7 +160,7 @@ Description
|
|
|
160
160
|
|
|
161
161
|
</td><td>
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
`PLUGIN` that displays fatal errors nicely in the overlay on top of the player.
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
</td></tr>
|
|
@@ -314,7 +314,7 @@ Description
|
|
|
314
314
|
|
|
315
315
|
</td><td>
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
`PLUGIN` that is responsible for managing the automatic failover between media sources.
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
</td></tr>
|
|
@@ -325,7 +325,7 @@ Description
|
|
|
325
325
|
|
|
326
326
|
</td><td>
|
|
327
327
|
|
|
328
|
-
|
|
328
|
+
`PLUGIN` that shows a pending operation indicator when playback is buffering or in a similar state.
|
|
329
329
|
|
|
330
330
|
|
|
331
331
|
</td></tr>
|
|
@@ -379,12 +379,12 @@ Description
|
|
|
379
379
|
</th></tr></thead>
|
|
380
380
|
<tbody><tr><td>
|
|
381
381
|
|
|
382
|
-
[
|
|
382
|
+
[GearEvents](./player.gearevents.md)
|
|
383
383
|
|
|
384
384
|
|
|
385
385
|
</td><td>
|
|
386
386
|
|
|
387
|
-
**_(BETA)_**
|
|
387
|
+
**_(BETA)_** Events triggered by the plugin
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
</td></tr>
|
|
@@ -417,7 +417,7 @@ A top-level event on the player object
|
|
|
417
417
|
|
|
418
418
|
</td><td>
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
Custom events emitted by the plugin
|
|
421
421
|
|
|
422
422
|
|
|
423
423
|
</td></tr>
|
|
@@ -615,15 +615,6 @@ 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
|
-
|
|
627
618
|
</td></tr>
|
|
628
619
|
<tr><td>
|
|
629
620
|
|
|
@@ -669,6 +660,8 @@ Description
|
|
|
669
660
|
|
|
670
661
|
</td><td>
|
|
671
662
|
|
|
663
|
+
**_(BETA)_** Configuration options for the [ClosedCaptions](./player.closedcaptions.md) plugin.
|
|
664
|
+
|
|
672
665
|
|
|
673
666
|
</td></tr>
|
|
674
667
|
<tr><td>
|
|
@@ -733,60 +726,73 @@ Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
|
733
726
|
|
|
734
727
|
</td><td>
|
|
735
728
|
|
|
736
|
-
|
|
729
|
+
Configuration options for the [ErrorScreen](./player.errorscreen.md) plugin.
|
|
737
730
|
|
|
738
731
|
|
|
739
732
|
</td></tr>
|
|
740
733
|
<tr><td>
|
|
741
734
|
|
|
742
|
-
[
|
|
735
|
+
[ErrorScreenSettings](./player.errorscreensettings.md)
|
|
743
736
|
|
|
744
737
|
|
|
745
738
|
</td><td>
|
|
746
739
|
|
|
740
|
+
Settings for the [ErrorScreen](./player.errorscreen.md) plugin.
|
|
741
|
+
|
|
747
742
|
|
|
748
743
|
</td></tr>
|
|
749
744
|
<tr><td>
|
|
750
745
|
|
|
751
|
-
[
|
|
746
|
+
[LangTag](./player.langtag.md)
|
|
752
747
|
|
|
753
748
|
|
|
754
749
|
</td><td>
|
|
755
750
|
|
|
756
|
-
|
|
751
|
+
An ISO 639-1 language code.
|
|
757
752
|
|
|
758
753
|
|
|
759
754
|
</td></tr>
|
|
760
755
|
<tr><td>
|
|
761
756
|
|
|
762
|
-
[
|
|
757
|
+
[MediaControlElement](./player.mediacontrolelement.md)
|
|
763
758
|
|
|
764
759
|
|
|
765
760
|
</td><td>
|
|
766
761
|
|
|
767
|
-
|
|
762
|
+
**_(BETA)_** Media control elements, mount points for additional plugins
|
|
768
763
|
|
|
769
764
|
|
|
770
765
|
</td></tr>
|
|
771
766
|
<tr><td>
|
|
772
767
|
|
|
773
|
-
[
|
|
768
|
+
[PlaybackModule](./player.playbackmodule.md)
|
|
774
769
|
|
|
775
770
|
|
|
776
771
|
</td><td>
|
|
777
772
|
|
|
778
|
-
|
|
773
|
+
Module to perform the playback.
|
|
779
774
|
|
|
780
775
|
|
|
781
776
|
</td></tr>
|
|
782
777
|
<tr><td>
|
|
783
778
|
|
|
784
|
-
[
|
|
779
|
+
[PlaybackRateOption](./player.playbackrateoption.md)
|
|
785
780
|
|
|
786
781
|
|
|
787
782
|
</td><td>
|
|
788
783
|
|
|
789
|
-
|
|
784
|
+
**_(BETA)_**
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
</td></tr>
|
|
788
|
+
<tr><td>
|
|
789
|
+
|
|
790
|
+
[PlaybackRateSettings](./player.playbackratesettings.md)
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
</td><td>
|
|
794
|
+
|
|
795
|
+
**_(BETA)_**
|
|
790
796
|
|
|
791
797
|
|
|
792
798
|
</td></tr>
|
|
@@ -882,15 +888,6 @@ A media source to fetch the media data from
|
|
|
882
888
|
|
|
883
889
|
|
|
884
890
|
|
|
885
|
-
</td></tr>
|
|
886
|
-
<tr><td>
|
|
887
|
-
|
|
888
|
-
[SubtitlesPluginSettings](./player.subtitlespluginsettings.md)
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
</td><td>
|
|
892
|
-
|
|
893
|
-
|
|
894
891
|
</td></tr>
|
|
895
892
|
<tr><td>
|
|
896
893
|
|
package/docs/api/{player.bottomgear.setcontent.md → player.mediacontrol.handlecustomarea.md}
RENAMED
|
@@ -1,18 +1,16 @@
|
|
|
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) > [MediaControl](./player.mediacontrol.md) > [handleCustomArea](./player.mediacontrol.handlecustomarea.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## MediaControl.handleCustomArea() 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
|
>
|
|
9
9
|
|
|
10
|
-
Replaces the content of the gear menu
|
|
11
|
-
|
|
12
10
|
**Signature:**
|
|
13
11
|
|
|
14
12
|
```typescript
|
|
15
|
-
|
|
13
|
+
handleCustomArea(handler: (name: string, content: HTMLElement) => void): void;
|
|
16
14
|
```
|
|
17
15
|
|
|
18
16
|
## Parameters
|
|
@@ -35,18 +33,16 @@ Description
|
|
|
35
33
|
</th></tr></thead>
|
|
36
34
|
<tbody><tr><td>
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
handler
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
</td><td>
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
(name: string, content: HTMLElement) => void
|
|
44
42
|
|
|
45
43
|
|
|
46
44
|
</td><td>
|
|
47
45
|
|
|
48
|
-
Zepto result of the element
|
|
49
|
-
|
|
50
46
|
|
|
51
47
|
</td></tr>
|
|
52
48
|
</tbody></table>
|