@gcorevideo/player 2.16.17 → 2.18.0
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/README.md +68 -19
- package/dist/index.js +272 -125
- package/dist/player.d.ts +230 -73
- package/docs/api/index.md +1 -1
- package/docs/api/player.containersize.md +19 -0
- package/docs/api/player.dashsettings.md +2 -0
- package/docs/api/player.errorlevel.md +1 -0
- package/docs/api/player.langtag.md +6 -0
- package/docs/api/player.md +59 -24
- package/docs/api/player.mediatransport.md +1 -0
- package/docs/api/player.playbackerror.code.md +2 -0
- package/docs/api/player.playbackerror.description.md +2 -0
- package/docs/api/player.playbackerror.level.md +2 -0
- package/docs/api/player.playbackerror.md +43 -4
- package/docs/api/player.playbackerror.message.md +2 -0
- package/docs/api/player.playbackerror.origin.md +21 -0
- package/docs/api/player.playbackerror.scope.md +16 -0
- package/docs/api/player.playbackerrorcode.md +8 -7
- package/docs/api/player.playbackmodule.md +1 -0
- package/docs/api/player.player.attachto.md +26 -0
- package/docs/api/player.player.configure.md +6 -2
- package/docs/api/player.player.destroy.md +1 -1
- package/docs/api/player.player.getcurrenttime.md +6 -2
- package/docs/api/player.player.getduration.md +4 -0
- package/docs/api/player.player.getvolume.md +22 -0
- package/docs/api/player.player.isdvrenabled.md +20 -0
- package/docs/api/player.player.isdvrinuse.md +24 -0
- package/docs/api/player.player.isplaying.md +20 -0
- package/docs/api/player.player.md +76 -8
- package/docs/api/player.player.mute.md +1 -1
- package/docs/api/player.player.off.md +5 -5
- package/docs/api/player.player.on.md +5 -5
- package/docs/api/player.player.registerplugin.md +14 -1
- package/docs/api/player.player.resize.md +6 -5
- package/docs/api/player.player.seek.md +1 -1
- package/docs/api/player.player.setvolume.md +56 -0
- package/docs/api/player.player.unmute.md +1 -1
- package/docs/api/player.player.unregisterplugin.md +2 -2
- package/docs/api/player.playercomponenttype.md +16 -0
- package/docs/api/player.playerdebugsettings.md +1 -1
- package/docs/api/player.playerdebugtag.md +1 -0
- package/docs/api/player.playerevent.md +96 -0
- package/docs/api/player.playereventhandler.md +3 -2
- package/docs/api/player.playereventparams.md +20 -0
- package/docs/api/player.playermediasourcedesc.md +1 -1
- package/docs/api/player.playermediasourcedesc.mimetype.md +1 -1
- package/docs/api/player.qualitylevel.bitrate.md +16 -0
- package/docs/api/player.qualitylevel.height.md +16 -0
- package/docs/api/player.qualitylevel.level.md +16 -0
- package/docs/api/player.qualitylevel.md +104 -7
- package/docs/api/player.qualitylevel.width.md +16 -0
- package/docs/api/player.timeposition.current.md +16 -0
- package/docs/api/player.timeposition.md +65 -7
- package/docs/api/player.timeposition.total.md +16 -0
- package/docs/api/player.timevalue.md +1 -1
- package/docs/api/player.translationsettings.md +7 -1
- package/docs/api/player.transportpreference.md +1 -0
- package/lib/Player.d.ts +107 -26
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +161 -77
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -3
- package/lib/internal.types.d.ts +3 -5
- package/lib/internal.types.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.d.ts +2 -0
- package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
- package/lib/playback/dash-playback/DashPlayback.js +37 -25
- package/lib/playback/hls-playback/HlsPlayback.d.ts +3 -0
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +33 -18
- package/lib/playback.types.d.ts +65 -6
- package/lib/playback.types.d.ts.map +1 -1
- package/lib/playback.types.js +10 -0
- package/lib/types.d.ts +54 -5
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +31 -2
- package/package.json +1 -1
- package/rollup.config.js +1 -1
- package/src/Player.ts +202 -91
- package/src/__tests__/Player.test.ts +9 -3
- package/src/index.ts +2 -3
- package/src/internal.types.ts +3 -2
- package/src/playback/dash-playback/DashPlayback.ts +64 -35
- package/src/playback/hls-playback/HlsPlayback.ts +46 -22
- package/src/playback.types.ts +65 -5
- package/src/types.ts +56 -6
- package/src/utils/__tests__/mediaSources.test.ts +8 -2
- package/temp/player.api.json +771 -106
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/DashPlayback-BRJzl8D8.js +0 -901
|
@@ -97,8 +97,6 @@ Description
|
|
|
97
97
|
|
|
98
98
|
**_(BETA)_** Configures the player.
|
|
99
99
|
|
|
100
|
-
Can be called multiple times. Each consequent call extends the previous configuration. After a reconfiguration, if something significant has changed, the must be reinitialized (i.e, a `.destroy()` followed by an `.init()` call).
|
|
101
|
-
|
|
102
100
|
|
|
103
101
|
</td></tr>
|
|
104
102
|
<tr><td>
|
|
@@ -111,7 +109,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
111
109
|
|
|
112
110
|
</td><td>
|
|
113
111
|
|
|
114
|
-
**_(BETA)_** Destroys the player, releasing all resources and
|
|
112
|
+
**_(BETA)_** Destroys the player, releasing all resources and unmounting its UI from the DOM.
|
|
115
113
|
|
|
116
114
|
|
|
117
115
|
</td></tr>
|
|
@@ -125,7 +123,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
125
123
|
|
|
126
124
|
</td><td>
|
|
127
125
|
|
|
128
|
-
**_(BETA)_** Current playback time
|
|
126
|
+
**_(BETA)_** Current playback (time since the beginning of the stream), if appropriate.
|
|
129
127
|
|
|
130
128
|
|
|
131
129
|
</td></tr>
|
|
@@ -142,6 +140,62 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
142
140
|
**_(BETA)_** Duration of the current media in seconds, if appropriate.
|
|
143
141
|
|
|
144
142
|
|
|
143
|
+
</td></tr>
|
|
144
|
+
<tr><td>
|
|
145
|
+
|
|
146
|
+
[getVolume()](./player.player.getvolume.md)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
</td><td>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</td><td>
|
|
153
|
+
|
|
154
|
+
**_(BETA)_** Gets the current volume of the media content being played.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
</td></tr>
|
|
158
|
+
<tr><td>
|
|
159
|
+
|
|
160
|
+
[isDvrEnabled()](./player.player.isdvrenabled.md)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</td><td>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</td><td>
|
|
167
|
+
|
|
168
|
+
**_(BETA)_** Indicates whether DVR is enabled.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
</td></tr>
|
|
172
|
+
<tr><td>
|
|
173
|
+
|
|
174
|
+
[isDvrInUse()](./player.player.isdvrinuse.md)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
</td><td>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</td><td>
|
|
181
|
+
|
|
182
|
+
**_(BETA)_** Indicates whether DVR is in use.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
</td></tr>
|
|
186
|
+
<tr><td>
|
|
187
|
+
|
|
188
|
+
[isPlaying()](./player.player.isplaying.md)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</td><td>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
</td><td>
|
|
195
|
+
|
|
196
|
+
**_(BETA)_** Indicates the playing state.
|
|
197
|
+
|
|
198
|
+
|
|
145
199
|
</td></tr>
|
|
146
200
|
<tr><td>
|
|
147
201
|
|
|
@@ -153,7 +207,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
153
207
|
|
|
154
208
|
</td><td>
|
|
155
209
|
|
|
156
|
-
**_(BETA)_** Mutes the
|
|
210
|
+
**_(BETA)_** Mutes the sound of the video.
|
|
157
211
|
|
|
158
212
|
|
|
159
213
|
</td></tr>
|
|
@@ -167,7 +221,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
167
221
|
|
|
168
222
|
</td><td>
|
|
169
223
|
|
|
170
|
-
**_(BETA)_** Removes a
|
|
224
|
+
**_(BETA)_** Removes a previously added event listener
|
|
171
225
|
|
|
172
226
|
|
|
173
227
|
</td></tr>
|
|
@@ -256,6 +310,20 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
256
310
|
**_(BETA)_** Seeks to the given time.
|
|
257
311
|
|
|
258
312
|
|
|
313
|
+
</td></tr>
|
|
314
|
+
<tr><td>
|
|
315
|
+
|
|
316
|
+
[setVolume(volume)](./player.player.setvolume.md)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
</td><td>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
</td><td>
|
|
323
|
+
|
|
324
|
+
**_(BETA)_** Sets the current volume of the media content being played.
|
|
325
|
+
|
|
326
|
+
|
|
259
327
|
</td></tr>
|
|
260
328
|
<tr><td>
|
|
261
329
|
|
|
@@ -281,7 +349,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
281
349
|
|
|
282
350
|
</td><td>
|
|
283
351
|
|
|
284
|
-
**_(BETA)_** Unmutes the
|
|
352
|
+
**_(BETA)_** Unmutes the video sound.
|
|
285
353
|
|
|
286
354
|
|
|
287
355
|
</td></tr>
|
|
@@ -297,7 +365,7 @@ Can be called multiple times. Each consequent call extends the previous configur
|
|
|
297
365
|
|
|
298
366
|
</td><td>
|
|
299
367
|
|
|
300
|
-
**_(BETA)_** Unregisters a plugin.
|
|
368
|
+
**_(BETA)_** Unregisters a plugin registered earlier with [Player.registerPlugin()](./player.player.registerplugin.md)<!-- -->.
|
|
301
369
|
|
|
302
370
|
|
|
303
371
|
</td></tr>
|
|
@@ -7,12 +7,12 @@
|
|
|
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
|
-
Removes a
|
|
10
|
+
Removes a previously added event listener
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
off<
|
|
15
|
+
off<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
@@ -40,7 +40,7 @@ event
|
|
|
40
40
|
|
|
41
41
|
</td><td>
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
E
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
</td><td>
|
|
@@ -56,12 +56,12 @@ handler
|
|
|
56
56
|
|
|
57
57
|
</td><td>
|
|
58
58
|
|
|
59
|
-
[PlayerEventHandler](./player.playereventhandler.md)<!-- --><
|
|
59
|
+
[PlayerEventHandler](./player.playereventhandler.md)<!-- --><E>
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
</td><td>
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
a callback attached earlier to that event type
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
</td></tr>
|
|
@@ -12,7 +12,7 @@ Adds a listener to a player event
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
on<
|
|
15
|
+
on<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
@@ -40,12 +40,12 @@ event
|
|
|
40
40
|
|
|
41
41
|
</td><td>
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
E
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
</td><td>
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
event type, see [PlayerEvent](./player.playerevent.md)
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
</td></tr>
|
|
@@ -56,12 +56,12 @@ handler
|
|
|
56
56
|
|
|
57
57
|
</td><td>
|
|
58
58
|
|
|
59
|
-
[PlayerEventHandler](./player.playereventhandler.md)<!-- --><
|
|
59
|
+
[PlayerEventHandler](./player.playereventhandler.md)<!-- --><E>
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
</td><td>
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
a callback function to handle the event
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
</td></tr>
|
|
@@ -45,7 +45,7 @@ plugin
|
|
|
45
45
|
|
|
46
46
|
</td><td>
|
|
47
47
|
|
|
48
|
-
plugin
|
|
48
|
+
a plugin class
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
</td></tr>
|
|
@@ -54,3 +54,16 @@ plugin to register
|
|
|
54
54
|
|
|
55
55
|
void
|
|
56
56
|
|
|
57
|
+
## Remarks
|
|
58
|
+
|
|
59
|
+
Use this method to extend the player with custom behavior. The plugin class must inherit from one of the Clappr UIPlugin, UIContainerPlugin or CorePlugin classes. A core plugin will be initialized and attached to the player when the player is initialized. A UI plugin will be initialized and attached to the player container is initialized.
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import MyPlugin from './MyPlugin.js'
|
|
66
|
+
|
|
67
|
+
Player.registerPlugin(MyPlugin)
|
|
68
|
+
```
|
|
69
|
+
|
|
@@ -12,10 +12,7 @@ Resizes the player container element and everything within it.
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
resize(newSize:
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
}): void;
|
|
15
|
+
resize(newSize: ContainerSize): void;
|
|
19
16
|
```
|
|
20
17
|
|
|
21
18
|
## Parameters
|
|
@@ -43,7 +40,7 @@ newSize
|
|
|
43
40
|
|
|
44
41
|
</td><td>
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
[ContainerSize](./player.containersize.md)
|
|
47
44
|
|
|
48
45
|
|
|
49
46
|
</td><td>
|
|
@@ -57,3 +54,7 @@ new size of the player
|
|
|
57
54
|
|
|
58
55
|
void
|
|
59
56
|
|
|
57
|
+
## Remarks
|
|
58
|
+
|
|
59
|
+
Use this method when the player itself does not detect properly the change in size of its container element. It can be a case for orientation change on some mobile devices.
|
|
60
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [Player](./player.player.md) > [setVolume](./player.player.setvolume.md)
|
|
4
|
+
|
|
5
|
+
## Player.setVolume() 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
|
+
Sets the current volume of the media content being played.
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
setVolume(volume: number): void;
|
|
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
|
+
volume
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
number
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
a number between 0 and 1
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td></tr>
|
|
52
|
+
</tbody></table>
|
|
53
|
+
**Returns:**
|
|
54
|
+
|
|
55
|
+
void
|
|
56
|
+
|
|
@@ -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
|
-
Unregisters a plugin.
|
|
10
|
+
Unregisters a plugin registered earlier with [Player.registerPlugin()](./player.player.registerplugin.md)<!-- -->.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -45,7 +45,7 @@ plugin
|
|
|
45
45
|
|
|
46
46
|
</td><td>
|
|
47
47
|
|
|
48
|
-
plugin
|
|
48
|
+
a plugin class
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
</td></tr>
|
|
@@ -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) > [PlayerComponentType](./player.playercomponenttype.md)
|
|
4
|
+
|
|
5
|
+
## PlayerComponentType 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
|
+
Subsystems of a player component.
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
16
|
+
```
|
|
@@ -48,6 +48,38 @@ Ended
|
|
|
48
48
|
**_(BETA)_** Playback has reached the end of the media.
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
</td></tr>
|
|
52
|
+
<tr><td>
|
|
53
|
+
|
|
54
|
+
Error
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</td><td>
|
|
58
|
+
|
|
59
|
+
`"error"`
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
**_(BETA)_** An error occurred. Parameters: [PlaybackError](./player.playbackerror.md)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
</td></tr>
|
|
68
|
+
<tr><td>
|
|
69
|
+
|
|
70
|
+
Fullscreen
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
</td><td>
|
|
74
|
+
|
|
75
|
+
`"fullscreen"`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
</td><td>
|
|
79
|
+
|
|
80
|
+
**_(BETA)_** The player has switched to or from the fullscreen mode. Parameters:`boolean` isFullscreen
|
|
81
|
+
|
|
82
|
+
|
|
51
83
|
</td></tr>
|
|
52
84
|
<tr><td>
|
|
53
85
|
|
|
@@ -96,6 +128,38 @@ Ready
|
|
|
96
128
|
**_(BETA)_** The player is ready to use.
|
|
97
129
|
|
|
98
130
|
|
|
131
|
+
</td></tr>
|
|
132
|
+
<tr><td>
|
|
133
|
+
|
|
134
|
+
Resize
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
</td><td>
|
|
138
|
+
|
|
139
|
+
`"resize"`
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</td><td>
|
|
143
|
+
|
|
144
|
+
**_(BETA)_** The player's container has been resized. Parameters: [ContainerSize](./player.containersize.md)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</td></tr>
|
|
148
|
+
<tr><td>
|
|
149
|
+
|
|
150
|
+
Seek
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
</td><td>
|
|
154
|
+
|
|
155
|
+
`"seek"`
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</td><td>
|
|
159
|
+
|
|
160
|
+
**_(BETA)_** The player is seeking to a new position.
|
|
161
|
+
|
|
162
|
+
|
|
99
163
|
</td></tr>
|
|
100
164
|
<tr><td>
|
|
101
165
|
|
|
@@ -112,5 +176,37 @@ Stop
|
|
|
112
176
|
**_(BETA)_** Playback has been stopped.
|
|
113
177
|
|
|
114
178
|
|
|
179
|
+
</td></tr>
|
|
180
|
+
<tr><td>
|
|
181
|
+
|
|
182
|
+
TimeUpdate
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
</td><td>
|
|
186
|
+
|
|
187
|
+
`"timeupdate"`
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
</td><td>
|
|
191
|
+
|
|
192
|
+
**_(BETA)_** The current playback time has changed. Parameters: [TimePosition](./player.timeposition.md)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
</td></tr>
|
|
196
|
+
<tr><td>
|
|
197
|
+
|
|
198
|
+
VolumeUpdate
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
</td><td>
|
|
202
|
+
|
|
203
|
+
`"volumeupdate"`
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
</td><td>
|
|
207
|
+
|
|
208
|
+
**_(BETA)_** The volume has changed. Parameters: `number` volume in the range 0..1
|
|
209
|
+
|
|
210
|
+
|
|
115
211
|
</td></tr>
|
|
116
212
|
</tbody></table>
|
|
@@ -7,11 +7,12 @@
|
|
|
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
|
+
Type of a listener callback function for a player event. See the description of the event parameters in [PlayerEvent](./player.playerevent.md)<!-- -->.
|
|
10
11
|
|
|
11
12
|
**Signature:**
|
|
12
13
|
|
|
13
14
|
```typescript
|
|
14
|
-
export type PlayerEventHandler<
|
|
15
|
+
export type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
|
|
15
16
|
```
|
|
16
|
-
**References:** [PlayerEvent](./player.playerevent.md)
|
|
17
|
+
**References:** [PlayerEvent](./player.playerevent.md)<!-- -->, [PlayerEventParams](./player.playereventparams.md)
|
|
17
18
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [PlayerEventParams](./player.playereventparams.md)
|
|
4
|
+
|
|
5
|
+
## PlayerEventParams 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
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
export type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.Seek ? [number] : E extends PlayerEvent.VolumeUpdate ? [number] : E extends PlayerEvent.TimeUpdate ? [TimePosition] : E extends PlayerEvent.Resize ? [{
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}] : E extends PlayerEvent.Fullscreen ? [boolean] : E extends PlayerEvent.Error ? [PlaybackError] : [];
|
|
18
|
+
```
|
|
19
|
+
**References:** [PlayerEvent](./player.playerevent.md)<!-- -->, [PlayerEvent.Seek](./player.playerevent.md)<!-- -->, [PlayerEvent.VolumeUpdate](./player.playerevent.md)<!-- -->, [PlayerEvent.TimeUpdate](./player.playerevent.md)<!-- -->, [TimePosition](./player.timeposition.md)<!-- -->, [PlayerEvent.Resize](./player.playerevent.md)<!-- -->, [PlayerEvent.Fullscreen](./player.playerevent.md)<!-- -->, [PlayerEvent.Error](./player.playerevent.md)<!-- -->, [PlaybackError](./player.playbackerror.md)
|
|
20
|
+
|
|
@@ -57,7 +57,7 @@ string
|
|
|
57
57
|
|
|
58
58
|
</td><td>
|
|
59
59
|
|
|
60
|
-
**_(BETA)_** _(Optional)_ The MIME type of the media source (e.g. "video/mp4"
|
|
60
|
+
**_(BETA)_** _(Optional)_ The MIME type of the media source (e.g. `"video/mp4"`<!-- -->, `"application/x-mpegURL"`<!-- -->). Necessary if the type cannot be detected from file extension of the source URL.
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
</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
|
-
The MIME type of the media source (e.g. "video/mp4"
|
|
10
|
+
The MIME type of the media source (e.g. `"video/mp4"`<!-- -->, `"application/x-mpegURL"`<!-- -->). Necessary if the type cannot be detected from file extension of the source URL.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -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) > [QualityLevel](./player.qualitylevel.md) > [bitrate](./player.qualitylevel.bitrate.md)
|
|
4
|
+
|
|
5
|
+
## QualityLevel.bitrate property
|
|
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
|
+
Bitrate of the video, bps.
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
bitrate: number;
|
|
16
|
+
```
|
|
@@ -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) > [QualityLevel](./player.qualitylevel.md) > [height](./player.qualitylevel.height.md)
|
|
4
|
+
|
|
5
|
+
## QualityLevel.height property
|
|
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
|
+
Height of the video, pixels.
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
height: number;
|
|
16
|
+
```
|
|
@@ -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) > [QualityLevel](./player.qualitylevel.md) > [level](./player.qualitylevel.level.md)
|
|
4
|
+
|
|
5
|
+
## QualityLevel.level property
|
|
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
|
+
Zero-based index of the quality level.
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
level: number;
|
|
16
|
+
```
|