@srgssr/pillarbox-web 1.12.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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/dist/pillarbox-core.cjs.js +307 -0
  3. package/dist/pillarbox-core.cjs.min.js +2 -0
  4. package/dist/pillarbox-core.cjs.min.js.map +1 -0
  5. package/dist/pillarbox-core.es.js +305 -0
  6. package/dist/pillarbox-core.es.min.js +2 -0
  7. package/dist/pillarbox-core.es.min.js.map +1 -0
  8. package/dist/pillarbox-core.umd.js +68327 -0
  9. package/dist/pillarbox-core.umd.min.js +35 -0
  10. package/dist/pillarbox-core.umd.min.js.map +1 -0
  11. package/dist/pillarbox.cjs.js +3571 -0
  12. package/dist/pillarbox.cjs.min.js +2 -0
  13. package/dist/pillarbox.cjs.min.js.map +1 -0
  14. package/dist/pillarbox.es.js +3569 -0
  15. package/dist/pillarbox.es.min.js +2 -0
  16. package/dist/pillarbox.es.min.js.map +1 -0
  17. package/dist/pillarbox.min.css +1 -0
  18. package/dist/pillarbox.min.css.map +1 -0
  19. package/dist/pillarbox.umd.js +71591 -0
  20. package/dist/pillarbox.umd.min.js +35 -0
  21. package/dist/pillarbox.umd.min.js.map +1 -0
  22. package/dist/types/build.es.d.ts +5 -0
  23. package/dist/types/build.es.d.ts.map +1 -0
  24. package/dist/types/src/analytics/SRGAnalytics.d.ts +414 -0
  25. package/dist/types/src/analytics/SRGAnalytics.d.ts.map +1 -0
  26. package/dist/types/src/components/player.d.ts +116 -0
  27. package/dist/types/src/components/player.d.ts.map +1 -0
  28. package/dist/types/src/components/typedef.d.ts +14 -0
  29. package/dist/types/src/components/typedef.d.ts.map +1 -0
  30. package/dist/types/src/dataProvider/model/MediaComposition.d.ts +154 -0
  31. package/dist/types/src/dataProvider/model/MediaComposition.d.ts.map +1 -0
  32. package/dist/types/src/dataProvider/model/typedef.d.ts +1485 -0
  33. package/dist/types/src/dataProvider/model/typedef.d.ts.map +1 -0
  34. package/dist/types/src/dataProvider/services/DataProvider.d.ts +40 -0
  35. package/dist/types/src/dataProvider/services/DataProvider.d.ts.map +1 -0
  36. package/dist/types/src/lang/de.d.ts +2 -0
  37. package/dist/types/src/lang/de.d.ts.map +1 -0
  38. package/dist/types/src/lang/en.d.ts +2 -0
  39. package/dist/types/src/lang/en.d.ts.map +1 -0
  40. package/dist/types/src/lang/fr.d.ts +2 -0
  41. package/dist/types/src/lang/fr.d.ts.map +1 -0
  42. package/dist/types/src/lang/it.d.ts +2 -0
  43. package/dist/types/src/lang/it.d.ts.map +1 -0
  44. package/dist/types/src/lang/rm.d.ts +2 -0
  45. package/dist/types/src/lang/rm.d.ts.map +1 -0
  46. package/dist/types/src/middleware/srgssr.d.ts +271 -0
  47. package/dist/types/src/middleware/srgssr.d.ts.map +1 -0
  48. package/dist/types/src/middleware/typedef.d.ts +67 -0
  49. package/dist/types/src/middleware/typedef.d.ts.map +1 -0
  50. package/dist/types/src/pillarbox.d.ts +11 -0
  51. package/dist/types/src/pillarbox.d.ts.map +1 -0
  52. package/dist/types/src/utils/AkamaiTokenService.d.ts +73 -0
  53. package/dist/types/src/utils/AkamaiTokenService.d.ts.map +1 -0
  54. package/dist/types/src/utils/Drm.d.ts +31 -0
  55. package/dist/types/src/utils/Drm.d.ts.map +1 -0
  56. package/dist/types/src/utils/Image.d.ts +33 -0
  57. package/dist/types/src/utils/Image.d.ts.map +1 -0
  58. package/dist/types/src/utils/PlayerEvents.d.ts +177 -0
  59. package/dist/types/src/utils/PlayerEvents.d.ts.map +1 -0
  60. package/dist/types/src/utils/typedef.d.ts +17 -0
  61. package/dist/types/src/utils/typedef.d.ts.map +1 -0
  62. package/package.json +109 -0
  63. package/scss/components/_big-play.scss +30 -0
  64. package/scss/components/_captions-settings.scss +71 -0
  65. package/scss/components/_control-bar.scss +15 -0
  66. package/scss/components/_control-spacer.scss +9 -0
  67. package/scss/components/_control.scss +8 -0
  68. package/scss/components/_error.scss +10 -0
  69. package/scss/components/_layout.scss +63 -0
  70. package/scss/components/_loading.scss +34 -0
  71. package/scss/components/_progress.scss +70 -0
  72. package/scss/components/_slider.scss +9 -0
  73. package/scss/components/_text-track.scss +8 -0
  74. package/scss/components/_time.scss +29 -0
  75. package/scss/components/_title-bar.scss +9 -0
  76. package/scss/components/_volume.scss +16 -0
  77. package/scss/components/menu/_menu-popup.scss +30 -0
  78. package/scss/components/menu/_menu.scss +26 -0
  79. package/scss/pillarbox.scss +26 -0
@@ -0,0 +1,5 @@
1
+ import Pillarbox from './src/pillarbox.js';
2
+ import Player from './src/components/player.js';
3
+ import SrgSsr from './src/middleware/srgssr.js';
4
+ export { Pillarbox as default, Player, SrgSsr };
5
+ //# sourceMappingURL=build.es.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.es.d.ts","sourceRoot":"","sources":["../../build.es.js"],"names":[],"mappings":"sBAEsB,oBAAoB;mBADvB,4BAA4B;mBAD5B,4BAA4B"}
@@ -0,0 +1,414 @@
1
+ export default SRGAnalytics;
2
+ /**
3
+ * SRG analytics
4
+ * @class SRGAnalytics
5
+ * @ignore
6
+ *
7
+ * ### Script URL
8
+ * JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js
9
+ *
10
+ * ### Official documentation
11
+ * Variables list
12
+ * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Datalayer+for+media+players
13
+ *
14
+ * Standard event sequences
15
+ * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/standard+streaming+events%3A+sequence+of+events+for+media+player+actions
16
+ *
17
+ * Review of Standard Media Actions
18
+ * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Implementation+Concept+-+draft
19
+ *
20
+ * ComScore Implementation Guide
21
+ * @see https://www.dropbox.com/sh/cdwuikq0abxi21m/AABmSyXYKUTWSAwRZgQA9Ujna/JavaScript%20Latest%20Version?dl=0&preview=Comscore_Library-JavaScript-Streaming_Tag-Implementation_Guide-International.pdf&subfolder_nav_tracking=1
22
+ *
23
+ * ### Variables list
24
+ * - 'event_id', // init | play | stop | pos | pause | seek | uptime | eof
25
+ * - 'event_timestamp', // Seems to be generated automatically from the documentation, but the TP overrides it
26
+ * - 'event_name', // NA TP seems to not sending this variable
27
+ * - 'event_source', // NA TP seems to not sending this variable
28
+ * - 'event_name', // NA TP seems to not sending this variable
29
+ * - 'event_value', // NA TP seems to not sending this variable
30
+ * - 'navigation_environment', // prod | preprod
31
+ * - 'media_subtitles_on', // string true | false
32
+ * - 'media_timeshift', // need better description
33
+ * - 'media_quality', // SD | HD ?
34
+ * - 'media_bandwidth', // NA for the web, 64000
35
+ * - 'media_volume', // from 0 to 100
36
+ * - 'media_embedding_url', //
37
+ * - 'media_player_name', // videojs | letterbox-web ?
38
+ * - 'media_chromecast_selected', // boolean true | false
39
+ * - 'media_player_version', // player's version
40
+ * - 'media_player_display', // is the player mode, on the TP : inline, embed etc..
41
+ * - 'media_audio_track', // NA
42
+ * - 'media_position_real', // NA
43
+ * - 'media_time_spent', // NA
44
+ * - 'device_id', // NA
45
+ * - 'user_id_log_in', // NA only RTS has log in today
46
+ * - 'media_thumbnail', // Not required by the spec but sended by the TP
47
+ * - 'media_bu_distributer', // Not required by the spec but sended by the TP
48
+ *
49
+ *
50
+ * ### Sequence stories
51
+ *
52
+ * __Story 1 (AoD/VOD-basics)__: A VoD is played. The user does not interact with the player. The VoD plays to its end.
53
+ *
54
+ * Hints:
55
+ * - Media sessions always start with PLAY. They end with STOP or EOF (or with PAUSE or last POS)
56
+ * - POS is sent ever 30s
57
+ *
58
+ *
59
+ * __Story 2 (livestream-basics A)__: A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.
60
+ *
61
+ * Hints:
62
+ * - Media sessions always start with PLAY. They end with STOP (or, worse for data quailty, with PAUSE or last POS/UPTIME)
63
+ * - UPTIME is sent only for livestreams
64
+ * - POS is sent ever 30s, UPTIME every 60s with inital UPTIME after 30s.
65
+ * - This is the interval: 30s: POS + UPTIME; 60s: POS; 90s: POS + UPTIME; ...
66
+ *
67
+ *
68
+ * __Story 3 (Seeking a VoD/AoD)__: A VoD is played. User seeks in the VoD/AoD.
69
+ *
70
+ * Hints:
71
+ * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the media position has altered.
72
+ *
73
+ *
74
+ * __Story 4 (Seeking a livestream)__: A Livestream is played. User goes back in the livestream.
75
+ *
76
+ * Hints:
77
+ * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the a new variable, media_timeshift is passed.
78
+ * - For livestreams media_position is always the "time passed on your watch" - regardless of the SEEK event. So, if 1 second after PLAY the slider is moved back 600 seconds, then:
79
+ * 1. The the value of media_timeshift is '600'.
80
+ * 2. The value of media_position is '1'.
81
+ */
82
+ declare class SRGAnalytics {
83
+ /**
84
+ * Return the current timestamp in seconds.
85
+ *
86
+ * @returns {Number} Timestamp in seconds
87
+ */
88
+ static now(): number;
89
+ constructor(player: any, { debug, environment, playerVersion, tagCommanderScriptURL, }?: {
90
+ debug?: boolean;
91
+ environment?: string;
92
+ playerVersion?: string;
93
+ tagCommanderScriptURL?: string;
94
+ });
95
+ isDebugEnabled: boolean;
96
+ elapsedPlaybackTime: number;
97
+ environment: string;
98
+ hasStarted: boolean;
99
+ heartBeatIntervalId: NodeJS.Timeout;
100
+ initialized: boolean;
101
+ isSeeking: boolean;
102
+ isWaiting: boolean;
103
+ mediaSession: number;
104
+ pendingQueue: any[];
105
+ pendingTagCommanderReload: boolean;
106
+ player: any;
107
+ playerVersion: string;
108
+ srcMediaData: any;
109
+ startPlaybackSession: number;
110
+ tagCommanderScriptURL: string;
111
+ trackedCurrentTime: number;
112
+ uptimeIntervalId: NodeJS.Timeout;
113
+ /**
114
+ * Sent when the window, the document and its resources are about to be unloaded.
115
+ *
116
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
117
+ */
118
+ beforeunload(): void;
119
+ /**
120
+ * Clear timers used to send uptime and heartbeat.
121
+ */
122
+ clearTimers(): void;
123
+ /**
124
+ * Get the tracked current time in seconds.
125
+ *
126
+ * @returns {Number} current time in seconds
127
+ */
128
+ currentTime(): number;
129
+ /**
130
+ * Get or set debug mode.
131
+ *
132
+ * @returns {Boolean|undefined}
133
+ */
134
+ debug(enabled: any): boolean | undefined;
135
+ /**
136
+ * Destroy all properties and setIntervals to avoid mixing media sessions.
137
+ */
138
+ destroy(): void;
139
+ /**
140
+ * Dispose all listeners used to send analytics data to TagCommander.
141
+ *
142
+ * Calls `beforeunload` to send a notify stop.
143
+ * Clear intervals and timeouts.
144
+ *
145
+ * __Used events__
146
+ * - beforeunload
147
+ * - emptied
148
+ * - ended
149
+ * - loadstart
150
+ * - loadeddata
151
+ * - play
152
+ * - pause
153
+ * - timeupdate
154
+ */
155
+ dispose(): void;
156
+ /**
157
+ * Sent before a new media is loading.
158
+ * - Destroy all properties.
159
+ * - Send a notify stop if the media is not ended and new media is about to be loaded.
160
+ */
161
+ emptied(): void;
162
+ /**
163
+ * Sent when playback completes.
164
+ *
165
+ * @see https://docs.videojs.com/player#event:ended
166
+ */
167
+ ended(): void;
168
+ /**
169
+ * Flush the queued events when tc event script is loaded.
170
+ */
171
+ flush(): void;
172
+ /**
173
+ * Get the language of the current audio track.
174
+ *
175
+ * @returns {String} empty string or uppercase language.
176
+ */
177
+ getCurrentAudioTrack(): string;
178
+ /**
179
+ * Get the language of the current text track.
180
+ *
181
+ * @returns {String} empty string or uppercase language.
182
+ */
183
+ getCurrentTextTrack(): string;
184
+ /**
185
+ * Get the position inside the dvr window where the 0 represents the live edge
186
+ *
187
+ * @return {Number} 0 or the position in milliseconds
188
+ */
189
+ getDvrWindowPosition(): number;
190
+ /**
191
+ * Get the size of the live DVR window in milliseconds.
192
+ *
193
+ * @return {Number} DVR window size in milliseconds
194
+ */
195
+ getDvrWindowSize(): number;
196
+ /**
197
+ * Get the elapsed playback time in seconds.
198
+ *
199
+ * @returns {Number} elapsed time in seconds
200
+ */
201
+ getElapsedPlaybackTime(): number;
202
+ /**
203
+ * Get the elapsed playing time in seconds.
204
+ *
205
+ * @returns {Number} elapsed time in seconds
206
+ */
207
+ getElapsedPlayingTime(): number;
208
+ /**
209
+ * Set all event labels to be sent to TagCommander. The event labels are updated whenever a new event occurs.
210
+ *
211
+ * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof
212
+ *
213
+ * @returns {Object} JSON to be sent to TagCommander
214
+ */
215
+ getEventLabels(eventName: string): any;
216
+ /**
217
+ * Set all internal labels to be sent to TagCommander. Internal labels are assigned once at initialisation time.
218
+ */
219
+ getInternalLabels(): void;
220
+ /**
221
+ * Heart beat, current position of a AoD/VoD (every 30s).
222
+ *
223
+ * @description The action pos should be sent regularly every 30 seconds.
224
+ * It is used for tracking the viewed chapters of a video and the last position of the video, in case the user ends the video by closing the browser tab/window.
225
+ *
226
+ * - pos should be sent when the media player is in "play mode".
227
+ * - once the video is paused or stopped, the timer for sending these actions must be stopped.
228
+ *
229
+ * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/standard+streaming+events%3A+sequence+of+events+for+media+player+actions#standardstreamingevents:sequenceofeventsformediaplayeractions-mandatoryplayerevents
230
+ */
231
+ heartBeat(): void;
232
+ /**
233
+ * Initialize callbacks used to send analytics data to TagCommander.
234
+ *
235
+ * __Used events__
236
+ * - beforeunload
237
+ * - emptied
238
+ * - ended
239
+ * - loadstart
240
+ * - loadeddata
241
+ * - play
242
+ * - pause
243
+ * - ratechange
244
+ * - seeking
245
+ * - timeupdate
246
+ * - waiting
247
+ */
248
+ initCallbacks(): void;
249
+ beforeunloadListener: any;
250
+ emptiedListener: any;
251
+ endedListener: any;
252
+ loadstartListener: any;
253
+ loadeddataListener: any;
254
+ playListener: any;
255
+ pauseListener: any;
256
+ rateChangeListener: any;
257
+ seekingListener: any;
258
+ timeUpdateListener: any;
259
+ waitingListener: any;
260
+ /**
261
+ * Initialize all listeners used to send analytics data to TagCommander.
262
+ *
263
+ * __Used events__
264
+ * - beforeunload
265
+ * - dispose
266
+ * - emptied
267
+ * - ended
268
+ * - loadstart
269
+ * - loadeddata
270
+ * - play
271
+ * - pause
272
+ * - timeupdate
273
+ * - waiting
274
+ */
275
+ initListeners(): void;
276
+ /**
277
+ * Initialize TagCommander script dynamically and add it to the DOM
278
+ */
279
+ initScript(): void;
280
+ /**
281
+ * Check if the audio track is enabled.
282
+ *
283
+ * @returns {Boolean} __true__ if enabled __false__ otherwise.
284
+ */
285
+ isAudioTrackEnabled(): boolean;
286
+ /**
287
+ * Check if the media is a live with DVR.
288
+ *
289
+ * @returns {Boolean} __true__ if it DVR __false__ otherwise.
290
+ */
291
+ isMediaDvr(): boolean;
292
+ /**
293
+ * Check if the media is a live.
294
+ *
295
+ * @returns {Boolean} __true__ if live __false__ otherwise.
296
+ */
297
+ isMediaLive(): boolean;
298
+ /**
299
+ * Check if the media is an on demand.
300
+ *
301
+ * @returns {Boolean} __true__ if on demand __false__ otherwise.
302
+ */
303
+ isMediaOnDemand(): boolean;
304
+ /**
305
+ * Check if the text track is enabled.
306
+ *
307
+ * @returns {Boolean} __true__ if enabled __false__ otherwise.
308
+ */
309
+ isTextTrackEnabled(): boolean;
310
+ /**
311
+ * Check if the tracker is disabled.
312
+ *
313
+ * @returns {Boolean} __true__ if disabled __false__ otherwise.
314
+ */
315
+ isTrackerDisabled(): boolean;
316
+ /**
317
+ * Sent when loading of the media begins.
318
+ *
319
+ * @see https://docs.videojs.com/player#event:loadstart
320
+ */
321
+ loadstart(): void;
322
+ /**
323
+ * The first frame of the media has finished loading.
324
+ *
325
+ * @see https://docs.videojs.com/player#event:loadeddata
326
+ */
327
+ loadeddata(): void;
328
+ /**
329
+ * Event logger that prints the current event, event labels and internal labels in the browser's console.
330
+ *
331
+ * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof
332
+ * @param {Object} eventMetadata event metadata object
333
+ * @param {String} severity log | warn | error
334
+ */
335
+ log(eventName: string, eventMetadata: any, severity?: string): void;
336
+ /**
337
+ * Notify TagCommander all event and internal labels. If tc script is not available it queues all pending events.
338
+ *
339
+ * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof
340
+ */
341
+ notify(eventName: string, eventMetadata: any): void;
342
+ /**
343
+ * Sent when the playback state is no longer paused, as a result of the play method, or the autoplay attribute.
344
+ *
345
+ * @see https://docs.videojs.com/player#event:play
346
+ */
347
+ play(): void;
348
+ /**
349
+ * Sent when the playback state is changed to paused (paused property is true).
350
+ * Pause event is sent if :
351
+ * - The player is not scrubbing
352
+ * - The stream is not a live only
353
+ * - The current time is strictly inferior to the duration
354
+ *
355
+ * @see https://docs.videojs.com/player#event:pause
356
+ */
357
+ pause(): void;
358
+ /**
359
+ * Sent to ComScore when the playback rate changes.
360
+ *
361
+ * @see https://github.com/SRGSSR/srgletterbox-web/issues/761
362
+ * @see https://jira.srg.beecollaboration.com/browse/ADI-256
363
+ */
364
+ rateChange(): void;
365
+ /**
366
+ * Reload the tagCommander container and set all ComScore labels
367
+ */
368
+ reloadTagCommanderContainer(): void;
369
+ /**
370
+ * Sent when the current time is modified by the player's currentTime API.
371
+ *
372
+ * @see https://docs.videojs.com/player#event:seeking
373
+ */
374
+ seeking(): void;
375
+ /**
376
+ * Track current time updates delayed by a tick.
377
+ *
378
+ * @see https://docs.videojs.com/player#event:timeupdate
379
+ */
380
+ timeUpdate(): void;
381
+ /**
382
+ * Gets the number of seconds that separate from the live edge that is represented by 0.
383
+ *
384
+ * @returns {String}
385
+ */
386
+ timeShifted(): string;
387
+ /**
388
+ * Update the src media data.
389
+ */
390
+ updateSrcMediaData(srcMediaData: any): void;
391
+ /**
392
+ * Calculate the uptime when playing a live stream with or without DVR
393
+ *
394
+ * __Rules__:
395
+ * - Send the first uptime after 30 seconds
396
+ * - Send uptime each 60 seconds after the 30 seconds
397
+ * - Uptime is sent only when playing
398
+ */
399
+ uptime(): void;
400
+ uptimeTimeoutId: NodeJS.Timeout;
401
+ /**
402
+ * __ComScore__:
403
+ * It's expected notifyBufferStart() to be called when the player starts buffering
404
+ * and a call to notifyBufferStop() when content resumes after buffering.
405
+ *
406
+ * @see Item 2: https://jira.srg.beecollaboration.com/browse/PLAY-2628
407
+ *
408
+ * After the issue PLAYRTS-321
409
+ * @see Fix: https://jira.srg.beecollaboration.com/browse/PLAYRTS-321?focusedCommentId=201023&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-201023
410
+ * @see Fix: https://jira.srg.beecollaboration.com/browse/PLAYRTS-3065
411
+ */
412
+ waiting(): void;
413
+ }
414
+ //# sourceMappingURL=SRGAnalytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SRGAnalytics.d.ts","sourceRoot":"","sources":["../../../../src/analytics/SRGAnalytics.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH;IA6lBE;;;;OAIG;IACH,qBAEC;IAnmBD;;;;;OA+BC;IAtBC,wBAA2B;IAC3B,4BAA4B;IAC5B,oBAA8B;IAC9B,oBAAuB;IACvB,oCAAoC;IAEpC,qBAAwB;IACxB,mBAAsB;IACtB,mBAAsB;IACtB,qBAAqB;IACrB,oBAAsB;IACtB,mCAAsC;IACtC,YAAoB;IACpB,sBAAkC;IAClC,kBAA6B;IAC7B,6BAA6B;IAC7B,8BAAkD;IAClD,2BAA2B;IAC3B,iCAAiC;IAMnC;;;;OAIG;IACH,qBAEC;IAED;;OAEG;IACH,oBAIC;IAED;;;;OAIG;IACH,sBAGC;IAED;;;;OAIG;IACH,qBAFa,UAAQ,SAAS,CAQ7B;IAED;;OAEG;IACH,gBAiBC;IAED;;;;;;;;;;;;;;;OAeG;IACH,gBAgBC;IAED;;;;OAIG;IACH,gBAIC;IAED;;;;OAIG;IACH,cAMC;IAED;;OAEG;IACH,cAmBC;IAED;;;;OAIG;IACH,+BAYC;IAED;;;;OAIG;IACH,8BAUC;IAED;;;;OAIG;IACH,+BAMC;IAED;;;;OAIG;IACH,2BAKC;IAED;;;;OAIG;IACH,iCAMC;IAED;;;;OAIG;IACH,gCAIC;IAED;;;;;;OAMG;IACH,uCA+CC;IAED;;OAEG;IACH,0BAcC;IAED;;;;;;;;;;OAUG;IACH,kBAOC;IAED;;;;;;;;;;;;;;;OAeG;IACH,sBAYC;IAXC,0BAAwD;IACxD,qBAA8C;IAC9C,mBAA0C;IAC1C,uBAAkD;IAClD,wBAAoD;IACpD,kBAAwC;IACxC,mBAA0C;IAC1C,wBAAoD;IACpD,qBAA8C;IAC9C,wBAAoD;IACpD,qBAA8C;IAGhD;;;;;;;;;;;;;;OAcG;IACH,sBAgBC;IAED;;OAEG;IACH,mBAkBC;IAED;;;;OAIG;IACH,+BAEC;IAED;;;;OAIG;IACH,sBAOC;IAED;;;;OAIG;IACH,uBAOC;IAED;;;;OAIG;IACH,2BAEC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;OAIG;IACH,6BAaC;IAED;;;;OAIG;IACH,kBAYC;IAED;;;;OAIG;IACH,mBAKC;IAED;;;;;;OAMG;IACH,oEASC;IAED;;;;OAIG;IACH,oDA6BC;IAWD;;;;OAIG;IACH,aAkBC;IAED;;;;;;;;OAQG;IACH,cAoBC;IAED;;;;;OAKG;IACH,mBAEC;IAED;;OAEG;IACH,oCAOC;IAED;;;;OAIG;IACH,gBAKC;IAED;;;;OAIG;IACH,mBAIC;IAED;;;;OAIG;IACH,sBASC;IAED;;OAEG;IACH,4CAEC;IAED;;;;;;;OAOG;IACH,eAkBC;IAVC,gCASS;IAGX;;;;;;;;;;OAUG;IACH,gBAsBC;CACF"}
@@ -0,0 +1,116 @@
1
+ export default Player;
2
+ declare const Player_base: typeof import("video.js/dist/types/player").default;
3
+ /**
4
+ * This class extends the video.js Player.
5
+ *
6
+ * @class Player
7
+ * @see https://docs.videojs.com/player
8
+ */
9
+ declare class Player extends Player_base {
10
+ constructor(tag: any, options: any, ready: any);
11
+ /**
12
+ * A getter/setter for the media's audio track.
13
+ * Activates the audio track according to the language and kind properties.
14
+ * Falls back on the first audio track found if the kind property is not satisfied.
15
+ *
16
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind
17
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language
18
+ *
19
+ * @param {import('./typedef').TrackSelector} [trackSelector]
20
+ *
21
+ * @example
22
+ * // Get the current audio track
23
+ * player.audioTrack();
24
+ *
25
+ * @example
26
+ * // Activate an audio track based on language and kind properties
27
+ * player.audioTrack({language:'en', kind:'description'});
28
+ *
29
+ * @example
30
+ * // Activate first audio track found corresponding to language
31
+ * player.audioTrack({language:'fr'});
32
+ *
33
+ * @return {import('video.js/dist/types/tracks/audio-track').default | undefined} The
34
+ * currently enabled audio track. See {@link https://docs.videojs.com/audiotrack}.
35
+ */
36
+ audioTrack(trackSelector?: import('./typedef').TrackSelector): import('video.js/dist/types/tracks/audio-track').default | undefined;
37
+ /**
38
+ * Calculates an array of ranges based on the `buffered()` data.
39
+ *
40
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered
41
+ *
42
+ * @returns {Array<{start: number, end: number}>} An array of objects representing start and end points of buffered ranges.
43
+ */
44
+ bufferedRanges(): Array<{
45
+ start: number;
46
+ end: number;
47
+ }>;
48
+ /**
49
+ * Get the percent (as a decimal) of the media that's been played.
50
+ * This method is not a part of the native HTML video API.
51
+ *
52
+ * Live streams with DVR are not currently supported.
53
+ *
54
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#htmlmediaelement.played
55
+ *
56
+ * @return {number}
57
+ * A decimal between 0 and 1 representing the percent
58
+ * that is played 0 being 0% and 1 being 100%
59
+ */
60
+ playedPercent(): number;
61
+ /**
62
+ * Get an array of ranges based on the `played` data.
63
+ *
64
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#htmlmediaelement.played
65
+ *
66
+ * @returns {Array<{start: number, end: number}>} An array of objects representing start and end points of played ranges.
67
+ */
68
+ playedRanges(): Array<{
69
+ start: number;
70
+ end: number;
71
+ }>;
72
+ /**
73
+ * Calculates an array of ranges based on the `seekable()` data.
74
+ *
75
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekable
76
+ *
77
+ * @returns {Array<{start: number, end: number}>} An array of objects representing start and end points of seekable ranges.
78
+ */
79
+ seekableRanges(): Array<{
80
+ start: number;
81
+ end: number;
82
+ }>;
83
+ /**
84
+ * A getter/setter for the media's text track.
85
+ * Activates the text track according to the language and kind properties.
86
+ * Falls back on the first text track found if the kind property is not satisfied.
87
+ * Disables all subtitle tracks that are `showing` if the `trackSelector` is truthy but does not satisfy any condition.
88
+ *
89
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind
90
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/textTrack/language
91
+ *
92
+ * @param {import('./typedef').TrackSelector} [trackSelector]
93
+ *
94
+ * @example
95
+ * // Get the current text track
96
+ * player.textTrack();
97
+ *
98
+ * @example
99
+ * // Disable all text tracks has a side effect
100
+ * player.textTrack('off');
101
+ * player.textTrack({});
102
+ *
103
+ * @example
104
+ * // Activate an text track based on language and kind properties
105
+ * player.textTrack({language:'en', kind:'captions'});
106
+ *
107
+ * @example
108
+ * // Activate first text track found corresponding to language
109
+ * player.textTrack({language:'fr'});
110
+ *
111
+ * @return {import('video.js/dist/types/tracks/text-track').default | undefined} The
112
+ * currently enabled text track. See {@link https://docs.videojs.com/texttrack}.
113
+ */
114
+ textTrack(trackSelector?: import('./typedef').TrackSelector): import('video.js/dist/types/tracks/text-track').default | undefined;
115
+ }
116
+ //# sourceMappingURL=player.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../../../src/components/player.js"],"names":[],"mappings":";;AASA;;;;;GAKG;AACH;IACE,gDAUC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,2BAjBW,OAAO,WAAW,EAAE,aAAa,GAchC,OAAO,wCAAwC,EAAE,OAAO,GAAG,SAAS,CAsB/E;IAED;;;;;;OAMG;IACH,kBAFa,MAAM;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC,CAa/C;IAED;;;;;;;;;;;OAWG;IACH,iBAJY,MAAM,CAgBjB;IAED;;;;;;OAMG;IACH,gBAFa,MAAM;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC,CAa/C;IAED;;;;;;OAMG;IACH,kBAFa,MAAM;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC,CAa/C;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,0BAtBW,OAAO,WAAW,EAAE,aAAa,GAmBhC,OAAO,uCAAuC,EAAE,OAAO,GAAG,SAAS,CAgC9E;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The track to select
3
+ */
4
+ export type TrackSelector = {
5
+ /**
6
+ * The track language
7
+ */
8
+ language: string;
9
+ /**
10
+ * The track kind
11
+ */
12
+ kind: string;
13
+ };
14
+ //# sourceMappingURL=typedef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../../../src/components/typedef.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}