@gcorevideo/player 2.22.18 → 2.22.20
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/track-selector.ejs +3 -3
- package/assets/bottom-gear/bottomgear.ejs +3 -3
- package/assets/dvr-controls/dvr_controls.scss +0 -12
- package/dist/core.js +1 -1
- package/dist/index.css +803 -810
- package/dist/index.js +195 -176
- package/dist/player.d.ts +121 -108
- package/dist/plugins/index.css +904 -911
- package/dist/plugins/index.js +132 -112
- package/docs/api/player.bitratetrackrecord.md +20 -0
- package/docs/api/player.clapprstats.exportmetrics.md +2 -2
- package/docs/api/player.clapprstats.md +0 -4
- package/docs/api/player.clapprstatschronograph.md +115 -0
- package/docs/api/player.clapprstatscounter.md +211 -0
- package/docs/api/player.clapprstatsevents.md +51 -0
- package/docs/api/player.clapprstatsmetrics.md +52 -0
- package/docs/api/player.clipspluginsettings.md +1 -1
- package/docs/api/player.md +57 -2
- package/docs/api/player.nerdstats.md +3 -3
- package/docs/api/player.playerconfig.md +1 -1
- package/docs/api/player.playerconfig.playbacktype.md +6 -1
- package/docs/api/player.timeupdate.md +6 -3
- package/lib/plugins/audio-selector/AudioSelector.d.ts +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +15 -8
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +2 -2
- package/lib/plugins/clappr-nerd-stats/NerdStats.d.ts +4 -4
- package/lib/plugins/clappr-nerd-stats/NerdStats.js +4 -4
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +5 -2
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +31 -33
- package/lib/plugins/clappr-stats/types.d.ts +21 -21
- package/lib/plugins/clappr-stats/types.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/types.js +22 -22
- package/lib/plugins/clappr-stats/utils.d.ts +2 -2
- package/lib/plugins/clappr-stats/utils.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.d.ts +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +6 -2
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +39 -27
- package/lib/plugins/media-control/MediaControl.d.ts +6 -2
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +20 -9
- package/lib/plugins/picture-in-picture/PictureInPicture.js +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +1 -1
- package/lib/plugins/vast-ads/VastAds.js +1 -1
- package/lib/plugins/vast-ads/rollmanager.js +1 -1
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +7 -4
- package/lib/types.d.ts +1 -1
- package/package.json +3 -3
- package/src/playback/__tests__/HTML5Video.test.ts +2 -2
- package/src/plugins/audio-selector/AudioSelector.ts +14 -7
- package/src/plugins/audio-selector/__tests__/AudioSelector.test.ts +8 -8
- package/src/plugins/audio-selector/__tests__/__snapshots__/AudioSelector.test.ts.snap +15 -15
- package/src/plugins/bottom-gear/BottomGear.ts +2 -2
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +8 -5
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +3 -3
- package/src/plugins/clappr-nerd-stats/NerdStats.ts +5 -5
- package/src/plugins/clappr-stats/ClapprStats.ts +41 -40
- package/src/plugins/clappr-stats/__tests__/ClapprStats.test.ts +12 -12
- package/src/plugins/clappr-stats/types.ts +21 -21
- package/src/plugins/clappr-stats/utils.ts +2 -2
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/clips/Clips.ts +1 -1
- package/src/plugins/clips/__tests__/Clips.test.ts +1 -1
- package/src/plugins/clips/__tests__/__snapshots__/Clips.test.ts.snap +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +51 -37
- package/src/plugins/dvr-controls/__tests__/DvrControls.test.ts +84 -26
- package/src/plugins/dvr-controls/__tests__/__snapshots__/DvrControls.test.ts.snap +0 -12
- package/src/plugins/media-control/MediaControl.ts +21 -9
- package/src/plugins/media-control/__tests__/MediaControl.test.ts +8 -5
- package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +20 -20
- package/src/plugins/picture-in-picture/PictureInPicture.ts +1 -1
- package/src/plugins/subtitles/ClosedCaptions.ts +1 -1
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +1 -1
- package/src/plugins/vast-ads/VastAds.ts +1 -1
- package/src/plugins/vast-ads/rollmanager.ts +1 -1
- package/src/testUtils.ts +11 -5
- package/src/types.ts +1 -1
- package/temp/player.api.json +630 -12
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClapprStatsChronograph](./player.clapprstatschronograph.md)
|
|
4
|
+
|
|
5
|
+
## ClapprStatsChronograph enum
|
|
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 declare enum ClapprStatsChronograph
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Enumeration Members
|
|
18
|
+
|
|
19
|
+
<table><thead><tr><th>
|
|
20
|
+
|
|
21
|
+
Member
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Value
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</th><th>
|
|
30
|
+
|
|
31
|
+
Description
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</th></tr></thead>
|
|
35
|
+
<tbody><tr><td>
|
|
36
|
+
|
|
37
|
+
Buffering
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
</td><td>
|
|
41
|
+
|
|
42
|
+
`"buffering"`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
**_(BETA)_**
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
<tr><td>
|
|
52
|
+
|
|
53
|
+
Pause
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td><td>
|
|
57
|
+
|
|
58
|
+
`"pause"`
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
</td><td>
|
|
62
|
+
|
|
63
|
+
**_(BETA)_**
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td></tr>
|
|
67
|
+
<tr><td>
|
|
68
|
+
|
|
69
|
+
Session
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</td><td>
|
|
73
|
+
|
|
74
|
+
`"session"`
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</td><td>
|
|
78
|
+
|
|
79
|
+
**_(BETA)_**
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</td></tr>
|
|
83
|
+
<tr><td>
|
|
84
|
+
|
|
85
|
+
Startup
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</td><td>
|
|
89
|
+
|
|
90
|
+
`"startup"`
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
</td><td>
|
|
94
|
+
|
|
95
|
+
**_(BETA)_**
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
</td></tr>
|
|
99
|
+
<tr><td>
|
|
100
|
+
|
|
101
|
+
Watch
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</td><td>
|
|
105
|
+
|
|
106
|
+
`"watch"`
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</td><td>
|
|
110
|
+
|
|
111
|
+
**_(BETA)_**
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</td></tr>
|
|
115
|
+
</tbody></table>
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClapprStatsCounter](./player.clapprstatscounter.md)
|
|
4
|
+
|
|
5
|
+
## ClapprStatsCounter enum
|
|
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 declare enum ClapprStatsCounter
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Enumeration Members
|
|
18
|
+
|
|
19
|
+
<table><thead><tr><th>
|
|
20
|
+
|
|
21
|
+
Member
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Value
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</th><th>
|
|
30
|
+
|
|
31
|
+
Description
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</th></tr></thead>
|
|
35
|
+
<tbody><tr><td>
|
|
36
|
+
|
|
37
|
+
Buffering
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
</td><td>
|
|
41
|
+
|
|
42
|
+
`"buffering"`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
**_(BETA)_**
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
<tr><td>
|
|
52
|
+
|
|
53
|
+
ChangeLevel
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td><td>
|
|
57
|
+
|
|
58
|
+
`"changeLevel"`
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
</td><td>
|
|
62
|
+
|
|
63
|
+
**_(BETA)_**
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td></tr>
|
|
67
|
+
<tr><td>
|
|
68
|
+
|
|
69
|
+
DecodedFrames
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</td><td>
|
|
73
|
+
|
|
74
|
+
`"decodedFrames"`
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</td><td>
|
|
78
|
+
|
|
79
|
+
**_(BETA)_**
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</td></tr>
|
|
83
|
+
<tr><td>
|
|
84
|
+
|
|
85
|
+
DroppedFrames
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</td><td>
|
|
89
|
+
|
|
90
|
+
`"droppedFrames"`
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
</td><td>
|
|
94
|
+
|
|
95
|
+
**_(BETA)_**
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
</td></tr>
|
|
99
|
+
<tr><td>
|
|
100
|
+
|
|
101
|
+
DvrUsage
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</td><td>
|
|
105
|
+
|
|
106
|
+
`"dvrUsage"`
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</td><td>
|
|
110
|
+
|
|
111
|
+
**_(BETA)_**
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</td></tr>
|
|
115
|
+
<tr><td>
|
|
116
|
+
|
|
117
|
+
Error
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</td><td>
|
|
121
|
+
|
|
122
|
+
`"error"`
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</td><td>
|
|
126
|
+
|
|
127
|
+
**_(BETA)_**
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</td></tr>
|
|
131
|
+
<tr><td>
|
|
132
|
+
|
|
133
|
+
Fps
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</td><td>
|
|
137
|
+
|
|
138
|
+
`"fps"`
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</td><td>
|
|
142
|
+
|
|
143
|
+
**_(BETA)_**
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
</td></tr>
|
|
147
|
+
<tr><td>
|
|
148
|
+
|
|
149
|
+
Fullscreen
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</td><td>
|
|
153
|
+
|
|
154
|
+
`"fullscreen"`
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
</td><td>
|
|
158
|
+
|
|
159
|
+
**_(BETA)_**
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
</td></tr>
|
|
163
|
+
<tr><td>
|
|
164
|
+
|
|
165
|
+
Pause
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
</td><td>
|
|
169
|
+
|
|
170
|
+
`"pause"`
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
</td><td>
|
|
174
|
+
|
|
175
|
+
**_(BETA)_**
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
</td></tr>
|
|
179
|
+
<tr><td>
|
|
180
|
+
|
|
181
|
+
Play
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
</td><td>
|
|
185
|
+
|
|
186
|
+
`"play"`
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</td><td>
|
|
190
|
+
|
|
191
|
+
**_(BETA)_**
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
</td></tr>
|
|
195
|
+
<tr><td>
|
|
196
|
+
|
|
197
|
+
Seek
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</td><td>
|
|
201
|
+
|
|
202
|
+
`"seek"`
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
</td><td>
|
|
206
|
+
|
|
207
|
+
**_(BETA)_**
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
</td></tr>
|
|
211
|
+
</tbody></table>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClapprStatsEvents](./player.clapprstatsevents.md)
|
|
4
|
+
|
|
5
|
+
## ClapprStatsEvents enum
|
|
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 declare enum ClapprStatsEvents
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Enumeration Members
|
|
18
|
+
|
|
19
|
+
<table><thead><tr><th>
|
|
20
|
+
|
|
21
|
+
Member
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Value
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</th><th>
|
|
30
|
+
|
|
31
|
+
Description
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</th></tr></thead>
|
|
35
|
+
<tbody><tr><td>
|
|
36
|
+
|
|
37
|
+
REPORT
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
</td><td>
|
|
41
|
+
|
|
42
|
+
`"clappr:stats:report"`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
**_(BETA)_** Emitted periodically with current measurements.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
</tbody></table>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [ClapprStatsMetrics](./player.clapprstatsmetrics.md)
|
|
4
|
+
|
|
5
|
+
## ClapprStatsMetrics 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 ClapprStatsMetrics = {
|
|
15
|
+
counters: {
|
|
16
|
+
[ClapprStatsCounter.Play]: number;
|
|
17
|
+
[ClapprStatsCounter.Pause]: number;
|
|
18
|
+
[ClapprStatsCounter.Error]: number;
|
|
19
|
+
[ClapprStatsCounter.Buffering]: number;
|
|
20
|
+
[ClapprStatsCounter.DecodedFrames]: number;
|
|
21
|
+
[ClapprStatsCounter.DroppedFrames]: number;
|
|
22
|
+
[ClapprStatsCounter.Fps]: number;
|
|
23
|
+
[ClapprStatsCounter.ChangeLevel]: number;
|
|
24
|
+
[ClapprStatsCounter.Seek]: number;
|
|
25
|
+
[ClapprStatsCounter.Fullscreen]: number;
|
|
26
|
+
[ClapprStatsCounter.DvrUsage]: number;
|
|
27
|
+
};
|
|
28
|
+
chrono: {
|
|
29
|
+
[ClapprStatsChronograph.Startup]: number;
|
|
30
|
+
[ClapprStatsChronograph.Watch]: number;
|
|
31
|
+
[ClapprStatsChronograph.Pause]: number;
|
|
32
|
+
[ClapprStatsChronograph.Buffering]: number;
|
|
33
|
+
[ClapprStatsChronograph.Session]: number;
|
|
34
|
+
};
|
|
35
|
+
extra: {
|
|
36
|
+
playbackName: string;
|
|
37
|
+
playbackType: string;
|
|
38
|
+
bitratesHistory: BitrateTrackRecord[];
|
|
39
|
+
bitrateWeightedMean: number;
|
|
40
|
+
bitrateMostUsed: number;
|
|
41
|
+
buffersize: number;
|
|
42
|
+
watchHistory: Array<[number, number]>;
|
|
43
|
+
watchedPercentage: number;
|
|
44
|
+
bufferingPercentage: number;
|
|
45
|
+
bandwidth: number;
|
|
46
|
+
duration: number;
|
|
47
|
+
currentTime: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
**References:** [ClapprStatsCounter.Play](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Pause](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Error](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Buffering](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.DecodedFrames](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.DroppedFrames](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Fps](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.ChangeLevel](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Seek](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.Fullscreen](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsCounter.DvrUsage](./player.clapprstatscounter.md)<!-- -->, [ClapprStatsChronograph.Startup](./player.clapprstatschronograph.md)<!-- -->, [ClapprStatsChronograph.Watch](./player.clapprstatschronograph.md)<!-- -->, [ClapprStatsChronograph.Pause](./player.clapprstatschronograph.md)<!-- -->, [ClapprStatsChronograph.Buffering](./player.clapprstatschronograph.md)<!-- -->, [ClapprStatsChronograph.Session](./player.clapprstatschronograph.md)<!-- -->, [BitrateTrackRecord](./player.bitratetrackrecord.md)
|
|
52
|
+
|
|
@@ -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
|
-
Configuration options for the
|
|
10
|
+
Configuration options for the [Clips](./player.clips.md) plugin.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
package/docs/api/player.md
CHANGED
|
@@ -215,7 +215,7 @@ Description
|
|
|
215
215
|
|
|
216
216
|
</td><td>
|
|
217
217
|
|
|
218
|
-
**_(BETA)_** `PLUGIN` that displays useful network
|
|
218
|
+
**_(BETA)_** `PLUGIN` that displays useful statistics regarding the playback as well as the network quality estimation.
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
</td></tr>
|
|
@@ -379,6 +379,39 @@ Description
|
|
|
379
379
|
</th></tr></thead>
|
|
380
380
|
<tbody><tr><td>
|
|
381
381
|
|
|
382
|
+
[ClapprStatsChronograph](./player.clapprstatschronograph.md)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
</td><td>
|
|
386
|
+
|
|
387
|
+
**_(BETA)_**
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
</td></tr>
|
|
391
|
+
<tr><td>
|
|
392
|
+
|
|
393
|
+
[ClapprStatsCounter](./player.clapprstatscounter.md)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
</td><td>
|
|
397
|
+
|
|
398
|
+
**_(BETA)_**
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
</td></tr>
|
|
402
|
+
<tr><td>
|
|
403
|
+
|
|
404
|
+
[ClapprStatsEvents](./player.clapprstatsevents.md)
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
</td><td>
|
|
408
|
+
|
|
409
|
+
**_(BETA)_**
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
</td></tr>
|
|
413
|
+
<tr><td>
|
|
414
|
+
|
|
382
415
|
[GearEvents](./player.gearevents.md)
|
|
383
416
|
|
|
384
417
|
|
|
@@ -491,7 +524,7 @@ Description
|
|
|
491
524
|
|
|
492
525
|
</td><td>
|
|
493
526
|
|
|
494
|
-
**_(BETA)_** Configuration options for the
|
|
527
|
+
**_(BETA)_** Configuration options for the [Clips](./player.clips.md) plugin.
|
|
495
528
|
|
|
496
529
|
|
|
497
530
|
</td></tr>
|
|
@@ -655,6 +688,28 @@ Description
|
|
|
655
688
|
</th></tr></thead>
|
|
656
689
|
<tbody><tr><td>
|
|
657
690
|
|
|
691
|
+
[BitrateTrackRecord](./player.bitratetrackrecord.md)
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
</td><td>
|
|
695
|
+
|
|
696
|
+
**_(BETA)_**
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
</td></tr>
|
|
700
|
+
<tr><td>
|
|
701
|
+
|
|
702
|
+
[ClapprStatsMetrics](./player.clapprstatsmetrics.md)
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
</td><td>
|
|
706
|
+
|
|
707
|
+
**_(BETA)_**
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
</td></tr>
|
|
711
|
+
<tr><td>
|
|
712
|
+
|
|
658
713
|
[ClapprStatsSettings](./player.clapprstatssettings.md)
|
|
659
714
|
|
|
660
715
|
|
|
@@ -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 displays useful network
|
|
10
|
+
`PLUGIN` that displays useful statistics regarding the playback as well as the network quality estimation.
|
|
11
11
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
@@ -20,9 +20,9 @@ export declare class NerdStats extends UICorePlugin
|
|
|
20
20
|
|
|
21
21
|
Depends on:
|
|
22
22
|
|
|
23
|
-
- [BottomGear](./player.bottomgear.md)
|
|
23
|
+
- [BottomGear](./player.bottomgear.md) - where the button is attached
|
|
24
24
|
|
|
25
|
-
- [ClapprStats](./player.clapprstats.md)
|
|
25
|
+
- [ClapprStats](./player.clapprstats.md) - to get the metrics from
|
|
26
26
|
|
|
27
27
|
The plugin is rendered as an item in the gear menu.
|
|
28
28
|
|
|
@@ -199,7 +199,7 @@ _(Optional)_ Mute the audio output in order to comply with browsers' autoplay po
|
|
|
199
199
|
|
|
200
200
|
</td><td>
|
|
201
201
|
|
|
202
|
-
_(Optional)_ Stream type.
|
|
202
|
+
_(Optional)_ Stream type.
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
</td></tr>
|
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
## PlayerConfig.playbackType property
|
|
6
6
|
|
|
7
|
-
Stream type.
|
|
7
|
+
Stream type.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
playbackType?: PlaybackType;
|
|
13
13
|
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
Should only be set if known in advance, as it should not change once determined. Otherwise it might cause inconsistencies in the UI plugins behavior, for instance, glitches with rendering of the DVR controls or seek bar.
|
|
18
|
+
|
|
@@ -7,14 +7,17 @@
|
|
|
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
|
+
> Warning: This API is now obsolete.
|
|
11
|
+
>
|
|
12
|
+
> Use TimePosition instead
|
|
13
|
+
>
|
|
14
|
+
|
|
10
15
|
For the plugin development
|
|
11
16
|
|
|
12
17
|
**Signature:**
|
|
13
18
|
|
|
14
19
|
```typescript
|
|
15
|
-
export type TimeUpdate = TimePosition
|
|
16
|
-
firstFragDateTime: number;
|
|
17
|
-
};
|
|
20
|
+
export type TimeUpdate = TimePosition;
|
|
18
21
|
```
|
|
19
22
|
**References:** [TimePosition](./player.timeposition.md)
|
|
20
23
|
|
|
@@ -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;AAO7D,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;AAO7D,OAAO,2CAA2C,CAAA;AAUlD;;;;;;;;;GASG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,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;;MAItB;IAED;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACM,MAAM;IAmBf,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,qBAAqB;CAe9B"}
|
|
@@ -4,6 +4,7 @@ import { CLAPPR_VERSION } from '../../build.js';
|
|
|
4
4
|
import pluginHtml from '../../../assets/audio-selector/track-selector.ejs';
|
|
5
5
|
import '../../../assets/audio-selector/style.scss';
|
|
6
6
|
import audioArrow from '../../../assets/icons/old/quality-arrow.svg';
|
|
7
|
+
// import { trace } from '@gcorevideo/utils'
|
|
7
8
|
const VERSION = '2.22.4';
|
|
8
9
|
// const T = 'plugins.audiotracks'
|
|
9
10
|
/**
|
|
@@ -66,7 +67,7 @@ export class AudioTracks extends UICorePlugin {
|
|
|
66
67
|
const mediaControl = this.core.getPlugin('media_control');
|
|
67
68
|
assert(mediaControl, 'media_control plugin is required');
|
|
68
69
|
this.listenTo(mediaControl, Events.MEDIACONTROL_RENDERED, () => {
|
|
69
|
-
mediaControl.
|
|
70
|
+
mediaControl.mount('audiotracks', this.$el);
|
|
70
71
|
});
|
|
71
72
|
this.listenTo(mediaControl, Events.MEDIACONTROL_HIDE, this.hideMenu);
|
|
72
73
|
}
|
|
@@ -97,18 +98,18 @@ export class AudioTracks extends UICorePlugin {
|
|
|
97
98
|
if (!this.shouldRender()) {
|
|
98
99
|
return this;
|
|
99
100
|
}
|
|
100
|
-
const mediaControl = this.core.getPlugin('media_control');
|
|
101
101
|
this.$el.html(AudioTracks.template({
|
|
102
102
|
tracks: this.tracks,
|
|
103
103
|
title: this.getTitle(),
|
|
104
104
|
icon: audioArrow,
|
|
105
|
+
current: this.currentTrack?.id,
|
|
105
106
|
}));
|
|
106
107
|
this.updateText();
|
|
107
108
|
this.highlightCurrentTrack();
|
|
108
109
|
return this;
|
|
109
110
|
}
|
|
110
111
|
onTrackSelect(event) {
|
|
111
|
-
const id = event.
|
|
112
|
+
const id = event.currentTarget?.dataset?.audiotracksSelect;
|
|
112
113
|
if (id) {
|
|
113
114
|
this.selectAudioTrack(id);
|
|
114
115
|
}
|
|
@@ -117,7 +118,7 @@ export class AudioTracks extends UICorePlugin {
|
|
|
117
118
|
return false;
|
|
118
119
|
}
|
|
119
120
|
selectAudioTrack(id) {
|
|
120
|
-
this.
|
|
121
|
+
this.startTrackSwitching();
|
|
121
122
|
this.core.activeContainer.switchAudioTrack(id);
|
|
122
123
|
this.updateText();
|
|
123
124
|
}
|
|
@@ -125,7 +126,9 @@ export class AudioTracks extends UICorePlugin {
|
|
|
125
126
|
this.$el.find('#audiotracks-select').addClass('hidden');
|
|
126
127
|
}
|
|
127
128
|
toggleContextMenu() {
|
|
128
|
-
this.$el.find('#audiotracks-select').toggleClass('hidden');
|
|
129
|
+
this.$el.find('#audiotracks-select').toggleClass('hidden'); // TODO use plain CSS display: none
|
|
130
|
+
const open = !this.$el.find('#audiotracks-select').hasClass('hidden'); // TODO hold state
|
|
131
|
+
this.$el.find('#audiotracks-button').attr('aria-expanded', open);
|
|
129
132
|
}
|
|
130
133
|
buttonElement() {
|
|
131
134
|
return this.$('button');
|
|
@@ -143,7 +146,7 @@ export class AudioTracks extends UICorePlugin {
|
|
|
143
146
|
}
|
|
144
147
|
return this.currentTrack.label || this.currentTrack.language;
|
|
145
148
|
}
|
|
146
|
-
|
|
149
|
+
startTrackSwitching() {
|
|
147
150
|
this.buttonElement().addClass('changing');
|
|
148
151
|
}
|
|
149
152
|
updateText() {
|
|
@@ -154,12 +157,16 @@ export class AudioTracks extends UICorePlugin {
|
|
|
154
157
|
}
|
|
155
158
|
highlightCurrentTrack() {
|
|
156
159
|
this.trackElement().removeClass('current');
|
|
157
|
-
this.trackElement()
|
|
160
|
+
this.trackElement()
|
|
161
|
+
.find('a')
|
|
162
|
+
.removeClass('gcore-skin-active')
|
|
163
|
+
.attr('aria-checked', 'false');
|
|
158
164
|
if (this.currentTrack) {
|
|
159
165
|
this.trackElement(this.currentTrack.id)
|
|
160
166
|
.addClass('current')
|
|
161
167
|
.find('a')
|
|
162
|
-
.addClass('gcore-skin-active')
|
|
168
|
+
.addClass('gcore-skin-active')
|
|
169
|
+
.attr('aria-checked', 'true');
|
|
163
170
|
}
|
|
164
171
|
}
|
|
165
172
|
}
|