shaka-player 4.9.34 → 4.9.36

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/AUTHORS +1 -0
  2. package/CONTRIBUTORS +1 -0
  3. package/README.md +9 -3
  4. package/dist/controls.css +1 -1
  5. package/dist/controls.css.map +1 -1
  6. package/dist/deps.js +6 -6
  7. package/dist/locales.js +31 -31
  8. package/dist/shaka-player.compiled.d.ts +1 -0
  9. package/dist/shaka-player.compiled.debug.d.ts +1 -0
  10. package/dist/shaka-player.compiled.debug.externs.js +4 -3
  11. package/dist/shaka-player.compiled.debug.js +445 -427
  12. package/dist/shaka-player.compiled.debug.map +3 -3
  13. package/dist/shaka-player.compiled.externs.js +4 -3
  14. package/dist/shaka-player.compiled.js +1254 -1240
  15. package/dist/shaka-player.compiled.map +3 -3
  16. package/dist/shaka-player.dash.d.ts +4099 -0
  17. package/dist/shaka-player.dash.debug.d.ts +4099 -0
  18. package/dist/shaka-player.dash.debug.externs.js +4188 -0
  19. package/dist/shaka-player.dash.debug.js +2161 -0
  20. package/dist/shaka-player.dash.debug.map +8 -0
  21. package/dist/shaka-player.dash.externs.js +4188 -0
  22. package/dist/shaka-player.dash.js +1007 -0
  23. package/dist/shaka-player.dash.map +8 -0
  24. package/dist/shaka-player.hls.d.ts +4196 -0
  25. package/dist/shaka-player.hls.debug.d.ts +4196 -0
  26. package/dist/shaka-player.hls.debug.externs.js +4403 -0
  27. package/dist/shaka-player.hls.debug.js +2243 -0
  28. package/dist/shaka-player.hls.debug.map +8 -0
  29. package/dist/shaka-player.hls.externs.js +4403 -0
  30. package/dist/shaka-player.hls.js +1076 -0
  31. package/dist/shaka-player.hls.map +8 -0
  32. package/dist/shaka-player.ui.d.ts +1 -0
  33. package/dist/shaka-player.ui.debug.d.ts +1 -0
  34. package/dist/shaka-player.ui.debug.externs.js +4 -3
  35. package/dist/shaka-player.ui.debug.js +472 -454
  36. package/dist/shaka-player.ui.debug.map +3 -3
  37. package/dist/shaka-player.ui.externs.js +4 -3
  38. package/dist/shaka-player.ui.js +1495 -1484
  39. package/dist/shaka-player.ui.map +3 -3
  40. package/externs/shaka/player.js +8 -4
  41. package/lib/cast/cast_proxy.js +48 -10
  42. package/lib/cea/cea708_service.js +20 -2
  43. package/lib/cea/dtvcc_packet_builder.js +15 -0
  44. package/lib/dash/dash_parser.js +24 -13
  45. package/lib/dash/mpd_utils.js +7 -4
  46. package/lib/dash/segment_template.js +74 -56
  47. package/lib/hls/hls_parser.js +5 -4
  48. package/lib/hls/manifest_text_parser.js +1 -0
  49. package/lib/media/content_workarounds.js +110 -72
  50. package/lib/media/drm_engine.js +72 -11
  51. package/lib/media/gap_jumping_controller.js +14 -1
  52. package/lib/media/media_source_engine.js +29 -11
  53. package/lib/media/region_timeline.js +4 -3
  54. package/lib/media/segment_utils.js +28 -16
  55. package/lib/media/streaming_engine.js +38 -12
  56. package/lib/net/http_fetch_plugin.js +1 -1
  57. package/lib/net/http_plugin_utils.js +4 -1
  58. package/lib/net/networking_engine.js +8 -0
  59. package/lib/net/networking_utils.js +1 -0
  60. package/lib/player.js +109 -37
  61. package/lib/polyfill/patchedmediakeys_apple.js +21 -0
  62. package/lib/text/cue.js +6 -2
  63. package/lib/text/mp4_ttml_parser.js +94 -6
  64. package/lib/text/ui_text_displayer.js +35 -4
  65. package/lib/transmuxer/ac3_transmuxer.js +6 -1
  66. package/lib/util/config_utils.js +13 -3
  67. package/lib/util/drm_utils.js +8 -0
  68. package/lib/util/error.js +6 -0
  69. package/lib/util/mp4_generator.js +19 -4
  70. package/lib/util/periods.js +4 -2
  71. package/lib/util/platform.js +60 -12
  72. package/lib/util/player_configuration.js +13 -2
  73. package/lib/util/stream_utils.js +18 -0
  74. package/lib/util/tXml.js +3 -2
  75. package/package.json +3 -3
  76. package/ui/controls.js +2 -6
  77. package/ui/less/thumbnails.less +1 -0
  78. package/ui/statistics_button.js +3 -1
  79. package/ui/ui.js +44 -35
@@ -0,0 +1,4188 @@
1
+ /*! @license
2
+ * Shaka Player
3
+ * Copyright 2016 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @fileoverview Generated externs. DO NOT EDIT!
8
+ * @externs
9
+ * @suppress {constantProperty, duplicate} To prevent compiler
10
+ * errors with the namespace being declared both here and by
11
+ * goog.provide in the library.
12
+ */
13
+
14
+ /** @namespace */
15
+ window.shaka = {};
16
+ /** @const */
17
+ shaka.abr = {};
18
+ /** @const */
19
+ shaka.cea = {};
20
+ /** @const */
21
+ shaka.config = {};
22
+ /** @const */
23
+ shaka.dash = {};
24
+ /** @const */
25
+ shaka.lcevc = {};
26
+ /** @const */
27
+ shaka.media = {};
28
+ /** @const */
29
+ shaka.media.SegmentPrefetch = {};
30
+ /** @const */
31
+ shaka.net = {};
32
+ /** @const */
33
+ shaka.text = {};
34
+ /** @const */
35
+ shaka.transmuxer = {};
36
+ /** @const */
37
+ shaka.util = {};
38
+ /** @const */
39
+ shaka.util.CmcdManager = {};
40
+
41
+ /**
42
+ * An interface to standardize how objects release internal references
43
+ * synchronously. If an object needs to asynchronously release references, then
44
+ * it should use 'shaka.util.IDestroyable'.
45
+ * @interface
46
+ */
47
+ shaka.util.IReleasable = class {
48
+ /**
49
+ * Request that this object release all internal references.
50
+ */
51
+ release() {}
52
+ };
53
+ /**
54
+ * @summary
55
+ * An EventManager maintains a collection of "event
56
+ * bindings" between event targets and event listeners.
57
+ * @implements {shaka.util.IReleasable}
58
+ */
59
+ shaka.util.EventManager = class {
60
+ /** */
61
+ constructor() {}
62
+ /**
63
+ * Detaches all event listeners.
64
+ * @override
65
+ */
66
+ release() {}
67
+ /**
68
+ * Attaches an event listener to an event target.
69
+ * @param {EventTarget} target The event target.
70
+ * @param {string} type The event type.
71
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
72
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
73
+ * specifies characteristics about the event listener.
74
+ * The passive option, if true, indicates that this function will never
75
+ * call preventDefault(), which improves scrolling performance.
76
+ */
77
+ listen(target, type, listener, options) {}
78
+ /**
79
+ * Attaches an event listener to an event target. The listener will be
80
+ * removed when the first instance of the event is fired.
81
+ * @param {EventTarget} target The event target.
82
+ * @param {string} type The event type.
83
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
84
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
85
+ * specifies characteristics about the event listener.
86
+ * The passive option, if true, indicates that this function will never
87
+ * call preventDefault(), which improves scrolling performance.
88
+ */
89
+ listenOnce(target, type, listener, options) {}
90
+ /**
91
+ * Detaches an event listener from an event target.
92
+ * @param {EventTarget} target The event target.
93
+ * @param {string} type The event type.
94
+ * @param {shaka.util.EventManager.ListenerType=} listener The event listener.
95
+ */
96
+ unlisten(target, type, listener) {}
97
+ /**
98
+ * Detaches all event listeners from all targets.
99
+ */
100
+ removeAll() {}
101
+ };
102
+ /**
103
+ * @typedef {function(!Event)}
104
+ */
105
+ shaka.util.EventManager.ListenerType;
106
+ /**
107
+ * @summary A set of BufferSource utility functions.
108
+ */
109
+ shaka.util.BufferUtils = class {
110
+ /**
111
+ * Compare two buffers for equality. For buffers of different types, this
112
+ * compares the underlying buffers as binary data.
113
+ * @param {?BufferSource} arr1
114
+ * @param {?BufferSource} arr2
115
+ * @return {boolean}
116
+ * @suppress {strictMissingProperties}
117
+ */
118
+ static equal(arr1, arr2) {}
119
+ /**
120
+ * Gets an ArrayBuffer that contains the data from the given TypedArray. Note
121
+ * this will allocate a new ArrayBuffer if the object is a partial view of
122
+ * the data.
123
+ * @param {!BufferSource} view
124
+ * @return {!ArrayBuffer}
125
+ */
126
+ static toArrayBuffer(view) {}
127
+ /**
128
+ * Creates a new Uint8Array view on the same buffer. This clamps the values
129
+ * to be within the same view (i.e. you can't use this to move past the end
130
+ * of the view, even if the underlying buffer is larger). However, you can
131
+ * pass a negative offset to access the data before the view.
132
+ * @param {BufferSource} data
133
+ * @param {number=} offset The offset from the beginning of this data's view
134
+ * to start the new view at.
135
+ * @param {number=} length The byte length of the new view.
136
+ * @return {!Uint8Array}
137
+ */
138
+ static toUint8(data, offset, length) {}
139
+ /**
140
+ * Creates a new Uint16Array view on the same buffer. This clamps the values
141
+ * to be within the same view (i.e. you can't use this to move past the end
142
+ * of the view, even if the underlying buffer is larger). However, you can
143
+ * pass a negative offset to access the data before the view.
144
+ * @param {BufferSource} data
145
+ * @param {number=} offset The offset from the beginning of this data's view
146
+ * to start the new view at.
147
+ * @param {number=} length The byte length of the new view.
148
+ * @return {!Uint16Array}
149
+ */
150
+ static toUint16(data, offset, length) {}
151
+ /**
152
+ * Creates a DataView over the given buffer.
153
+ * @see toUint8
154
+ * @param {BufferSource} buffer
155
+ * @param {number=} offset
156
+ * @param {number=} length
157
+ * @return {!DataView}
158
+ */
159
+ static toDataView(buffer, offset, length) {}
160
+ };
161
+ /**
162
+ * The IClosedCaptionParser defines the interface to provide all operations for
163
+ * parsing the closed captions embedded in Dash videos streams.
164
+ * TODO: Remove this interface and move method definitions
165
+ * directly to ClosedCaptonParser.
166
+ * @interface
167
+ */
168
+ shaka.media.IClosedCaptionParser = class {
169
+ };
170
+ /**
171
+ * Closed Caption Parser provides all operations for parsing the closed captions
172
+ * embedded in Dash videos streams.
173
+ * @implements {shaka.media.IClosedCaptionParser}
174
+ * @final
175
+ */
176
+ shaka.media.ClosedCaptionParser = class {
177
+ /**
178
+ * @param {string} mimeType
179
+ */
180
+ constructor(mimeType) {}
181
+ /**
182
+ * @param {string} mimeType
183
+ * @param {!shaka.extern.CeaParserPlugin} plugin
184
+ */
185
+ static registerParser(mimeType, plugin) {}
186
+ /**
187
+ * @param {string} mimeType
188
+ */
189
+ static unregisterParser(mimeType) {}
190
+ /**
191
+ * @param {string} mimeType
192
+ * @return {?shaka.extern.CeaParserPlugin}
193
+ */
194
+ static findParser(mimeType) {}
195
+ /**
196
+ * @param {!shaka.extern.CaptionDecoderPlugin} plugin
197
+ */
198
+ static registerDecoder(plugin) {}
199
+ /**
200
+ */
201
+ static unregisterDecoder() {}
202
+ /**
203
+ * @return {?shaka.extern.CaptionDecoderPlugin}
204
+ */
205
+ static findDecoder() {}
206
+ };
207
+ /**
208
+ */
209
+ shaka.text.CueRegion = class {
210
+ /** */
211
+ constructor() {}
212
+ };
213
+ /**
214
+ * Region identifier.
215
+ * @type {string}
216
+ */
217
+ shaka.text.CueRegion.prototype.id;
218
+ /**
219
+ * The X offset to start the rendering area in viewportAnchorUnits of the
220
+ * video width.
221
+ * @type {number}
222
+ */
223
+ shaka.text.CueRegion.prototype.viewportAnchorX;
224
+ /**
225
+ * The X offset to start the rendering area in viewportAnchorUnits of the
226
+ * video height.
227
+ * @type {number}
228
+ */
229
+ shaka.text.CueRegion.prototype.viewportAnchorY;
230
+ /**
231
+ * The X offset to start the rendering area in percentage (0-100) of this
232
+ * region width.
233
+ * @type {number}
234
+ */
235
+ shaka.text.CueRegion.prototype.regionAnchorX;
236
+ /**
237
+ * The Y offset to start the rendering area in percentage (0-100) of the
238
+ * region height.
239
+ * @type {number}
240
+ */
241
+ shaka.text.CueRegion.prototype.regionAnchorY;
242
+ /**
243
+ * The width of the rendering area in widthUnits.
244
+ * @type {number}
245
+ */
246
+ shaka.text.CueRegion.prototype.width;
247
+ /**
248
+ * The width of the rendering area in heightUnits.
249
+ * @type {number}
250
+ */
251
+ shaka.text.CueRegion.prototype.height;
252
+ /**
253
+ * The units (percentage, pixels or lines) the region height is in.
254
+ * @type {shaka.text.CueRegion.units}
255
+ */
256
+ shaka.text.CueRegion.prototype.heightUnits;
257
+ /**
258
+ * The units (percentage or pixels) the region width is in.
259
+ * @type {shaka.text.CueRegion.units}
260
+ */
261
+ shaka.text.CueRegion.prototype.widthUnits;
262
+ /**
263
+ * The units (percentage or pixels) the region viewportAnchors are in.
264
+ * @type {shaka.text.CueRegion.units}
265
+ */
266
+ shaka.text.CueRegion.prototype.viewportAnchorUnits;
267
+ /**
268
+ * If scroll=UP, it means that cues in the region will be added to the
269
+ * bottom of the region and will push any already displayed cues in the
270
+ * region up. Otherwise (scroll=NONE) cues will stay fixed at the location
271
+ * they were first painted in.
272
+ * @type {shaka.text.CueRegion.scrollMode}
273
+ */
274
+ shaka.text.CueRegion.prototype.scroll;
275
+ /**
276
+ * @enum {number}
277
+ */
278
+ shaka.text.CueRegion.units = {
279
+ 'PX': 0,
280
+ 'PERCENTAGE': 1,
281
+ 'LINES': 2
282
+ };
283
+ /**
284
+ * @enum {string}
285
+ */
286
+ shaka.text.CueRegion.scrollMode = {
287
+ 'NONE': '',
288
+ 'UP': 'up'
289
+ };
290
+ /**
291
+ */
292
+ shaka.text.Cue = class {
293
+ /**
294
+ * @param {number} startTime
295
+ * @param {number} endTime
296
+ * @param {string} payload
297
+ */
298
+ constructor(startTime, endTime, payload) {}
299
+ /**
300
+ * Create a copy of the cue with the same properties.
301
+ * @return {!shaka.text.Cue}
302
+ * @suppress {checkTypes} since we must use [] and "in" with a struct type.
303
+ */
304
+ clone() {}
305
+ /**
306
+ * Check if two Cues have all the same values in all properties.
307
+ * @param {!shaka.text.Cue} cue1
308
+ * @param {!shaka.text.Cue} cue2
309
+ * @return {boolean}
310
+ * @suppress {checkTypes} since we must use [] and "in" with a struct type.
311
+ */
312
+ static equal(cue1, cue2) {}
313
+ };
314
+ /**
315
+ * The start time of the cue in seconds, relative to the start of the
316
+ * presentation.
317
+ * @type {number}
318
+ */
319
+ shaka.text.Cue.prototype.startTime;
320
+ /**
321
+ * The end time of the cue in seconds, relative to the start of the
322
+ * presentation.
323
+ * @type {number}
324
+ */
325
+ shaka.text.Cue.prototype.endTime;
326
+ /**
327
+ * The text payload of the cue. If nestedCues is non-empty, this should be
328
+ * empty. Top-level block containers should have no payload of their own.
329
+ * @type {string}
330
+ */
331
+ shaka.text.Cue.prototype.payload;
332
+ /**
333
+ * The region to render the cue into. Only supported on top-level cues,
334
+ * because nested cues are inline elements.
335
+ * @type {shaka.text.CueRegion}
336
+ */
337
+ shaka.text.Cue.prototype.region;
338
+ /**
339
+ * The indent (in percent) of the cue box in the direction defined by the
340
+ * writing direction.
341
+ * @type {?number}
342
+ */
343
+ shaka.text.Cue.prototype.position;
344
+ /**
345
+ * Position alignment of the cue.
346
+ * @type {shaka.text.Cue.positionAlign}
347
+ */
348
+ shaka.text.Cue.prototype.positionAlign;
349
+ /**
350
+ * Size of the cue box (in percents), where 0 means "auto".
351
+ * @type {number}
352
+ */
353
+ shaka.text.Cue.prototype.size;
354
+ /**
355
+ * Alignment of the text inside the cue box.
356
+ * @type {shaka.text.Cue.textAlign}
357
+ */
358
+ shaka.text.Cue.prototype.textAlign;
359
+ /**
360
+ * Text direction of the cue.
361
+ * @type {shaka.text.Cue.direction}
362
+ */
363
+ shaka.text.Cue.prototype.direction;
364
+ /**
365
+ * Text writing mode of the cue.
366
+ * @type {shaka.text.Cue.writingMode}
367
+ */
368
+ shaka.text.Cue.prototype.writingMode;
369
+ /**
370
+ * The way to interpret line field. (Either as an integer line number or
371
+ * percentage from the display box).
372
+ * @type {shaka.text.Cue.lineInterpretation}
373
+ */
374
+ shaka.text.Cue.prototype.lineInterpretation;
375
+ /**
376
+ * The offset from the display box in either number of lines or
377
+ * percentage depending on the value of lineInterpretation.
378
+ * @type {?number}
379
+ */
380
+ shaka.text.Cue.prototype.line;
381
+ /**
382
+ * Separation between line areas inside the cue box in px or em
383
+ * (e.g. '100px'/'100em'). If not specified, this should be no less than
384
+ * the largest font size applied to the text in the cue.
385
+ * @type {string}.
386
+ */
387
+ shaka.text.Cue.prototype.lineHeight;
388
+ /**
389
+ * Line alignment of the cue box.
390
+ * Start alignment means the cue box’s top side (for horizontal cues), left
391
+ * side (for vertical growing right), or right side (for vertical growing
392
+ * left) is aligned at the line.
393
+ * Center alignment means the cue box is centered at the line.
394
+ * End alignment The cue box’s bottom side (for horizontal cues), right side
395
+ * (for vertical growing right), or left side (for vertical growing left) is
396
+ * aligned at the line.
397
+ * @type {shaka.text.Cue.lineAlign}
398
+ */
399
+ shaka.text.Cue.prototype.lineAlign;
400
+ /**
401
+ * Vertical alignments of the cues within their extents.
402
+ * 'BEFORE' means displaying the captions at the top of the text display
403
+ * container box, 'CENTER' means in the middle, 'AFTER' means at the bottom.
404
+ * @type {shaka.text.Cue.displayAlign}
405
+ */
406
+ shaka.text.Cue.prototype.displayAlign;
407
+ /**
408
+ * Text color as a CSS color, e.g. "#FFFFFF" or "white".
409
+ * @type {string}
410
+ */
411
+ shaka.text.Cue.prototype.color;
412
+ /**
413
+ * Text background color as a CSS color, e.g. "#FFFFFF" or "white".
414
+ * @type {string}
415
+ */
416
+ shaka.text.Cue.prototype.backgroundColor;
417
+ /**
418
+ * The URL of the background image, e.g. "data:[mime type];base64,[data]".
419
+ * @type {string}
420
+ */
421
+ shaka.text.Cue.prototype.backgroundImage;
422
+ /**
423
+ * The border around this cue as a CSS border.
424
+ * @type {string}
425
+ */
426
+ shaka.text.Cue.prototype.border;
427
+ /**
428
+ * Text font size in px or em (e.g. '100px'/'100em').
429
+ * @type {string}
430
+ */
431
+ shaka.text.Cue.prototype.fontSize;
432
+ /**
433
+ * Text font weight. Either normal or bold.
434
+ * @type {shaka.text.Cue.fontWeight}
435
+ */
436
+ shaka.text.Cue.prototype.fontWeight;
437
+ /**
438
+ * Text font style. Normal, italic or oblique.
439
+ * @type {shaka.text.Cue.fontStyle}
440
+ */
441
+ shaka.text.Cue.prototype.fontStyle;
442
+ /**
443
+ * Text font family.
444
+ * @type {string}
445
+ */
446
+ shaka.text.Cue.prototype.fontFamily;
447
+ /**
448
+ * Text letter spacing as a CSS letter-spacing value.
449
+ * @type {string}
450
+ */
451
+ shaka.text.Cue.prototype.letterSpacing;
452
+ /**
453
+ * Text line padding as a CSS line-padding value.
454
+ * @type {string}
455
+ */
456
+ shaka.text.Cue.prototype.linePadding;
457
+ /**
458
+ * Opacity of the cue element, from 0-1.
459
+ * @type {number}
460
+ */
461
+ shaka.text.Cue.prototype.opacity;
462
+ /**
463
+ * Text combine upright as a CSS text-combine-upright value.
464
+ * @type {string}
465
+ */
466
+ shaka.text.Cue.prototype.textCombineUpright;
467
+ /**
468
+ * Text decoration. A combination of underline, overline
469
+ * and line through. Empty array means no decoration.
470
+ * @type {!Array.<!shaka.text.Cue.textDecoration>}
471
+ */
472
+ shaka.text.Cue.prototype.textDecoration;
473
+ /**
474
+ * Text shadow color as a CSS text-shadow value.
475
+ * @type {string}
476
+ */
477
+ shaka.text.Cue.prototype.textShadow;
478
+ /**
479
+ * Text stroke color as a CSS color, e.g. "#FFFFFF" or "white".
480
+ * @type {string}
481
+ */
482
+ shaka.text.Cue.prototype.textStrokeColor;
483
+ /**
484
+ * Text stroke width as a CSS stroke-width value.
485
+ * @type {string}
486
+ */
487
+ shaka.text.Cue.prototype.textStrokeWidth;
488
+ /**
489
+ * Whether or not line wrapping should be applied to the cue.
490
+ * @type {boolean}
491
+ */
492
+ shaka.text.Cue.prototype.wrapLine;
493
+ /**
494
+ * Id of the cue.
495
+ * @type {string}
496
+ */
497
+ shaka.text.Cue.prototype.id;
498
+ /**
499
+ * Nested cues, which should be laid out horizontally in one block.
500
+ * Top-level cues are blocks, and nested cues are inline elements.
501
+ * Cues can be nested arbitrarily deeply.
502
+ * @type {!Array.<!shaka.text.Cue>}
503
+ */
504
+ shaka.text.Cue.prototype.nestedCues;
505
+ /**
506
+ * If true, this represents a container element that is "above" the main
507
+ * cues. For example, the <body> and <div> tags that contain the <p> tags
508
+ * in a TTML file. This controls the flow of the final cues; any nested cues
509
+ * within an "isContainer" cue will be laid out as separate lines.
510
+ * @type {boolean}
511
+ */
512
+ shaka.text.Cue.prototype.isContainer;
513
+ /**
514
+ * Whether or not the cue only acts as a line break between two nested cues.
515
+ * Should only appear in nested cues.
516
+ * @type {boolean}
517
+ */
518
+ shaka.text.Cue.prototype.lineBreak;
519
+ /**
520
+ * Used to indicate the type of ruby tag that should be used when rendering
521
+ * the cue. Valid values: ruby, rp, rt.
522
+ * @type {?string}
523
+ */
524
+ shaka.text.Cue.prototype.rubyTag;
525
+ /**
526
+ * The number of horizontal and vertical cells into which the Root Container
527
+ * Region area is divided.
528
+ * @type {{ columns: number, rows: number }}
529
+ */
530
+ shaka.text.Cue.prototype.cellResolution;
531
+ /**
532
+ * @enum {string}
533
+ */
534
+ shaka.text.Cue.positionAlign = {
535
+ 'LEFT': 'line-left',
536
+ 'RIGHT': 'line-right',
537
+ 'CENTER': 'center',
538
+ 'AUTO': 'auto'
539
+ };
540
+ /**
541
+ * @enum {string}
542
+ */
543
+ shaka.text.Cue.textAlign = {
544
+ 'LEFT': 'left',
545
+ 'RIGHT': 'right',
546
+ 'CENTER': 'center',
547
+ 'START': 'start',
548
+ 'END': 'end'
549
+ };
550
+ /**
551
+ * Vertical alignments of the cues within their extents.
552
+ * 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
553
+ * means in the middle, 'AFTER' means at the bottom.
554
+ * @enum {string}
555
+ */
556
+ shaka.text.Cue.displayAlign = {
557
+ 'BEFORE': 'before',
558
+ 'CENTER': 'center',
559
+ 'AFTER': 'after'
560
+ };
561
+ /**
562
+ * @enum {string}
563
+ */
564
+ shaka.text.Cue.direction = {
565
+ 'HORIZONTAL_LEFT_TO_RIGHT': 'ltr',
566
+ 'HORIZONTAL_RIGHT_TO_LEFT': 'rtl'
567
+ };
568
+ /**
569
+ * @enum {string}
570
+ */
571
+ shaka.text.Cue.writingMode = {
572
+ 'HORIZONTAL_TOP_TO_BOTTOM': 'horizontal-tb',
573
+ 'VERTICAL_LEFT_TO_RIGHT': 'vertical-lr',
574
+ 'VERTICAL_RIGHT_TO_LEFT': 'vertical-rl'
575
+ };
576
+ /**
577
+ * @enum {number}
578
+ */
579
+ shaka.text.Cue.lineInterpretation = {
580
+ 'LINE_NUMBER': 0,
581
+ 'PERCENTAGE': 1
582
+ };
583
+ /**
584
+ * @enum {string}
585
+ */
586
+ shaka.text.Cue.lineAlign = {
587
+ 'CENTER': 'center',
588
+ 'START': 'start',
589
+ 'END': 'end'
590
+ };
591
+ /**
592
+ * Default text color according to
593
+ * https://w3c.github.io/webvtt/#default-text-color
594
+ * @enum {string}
595
+ */
596
+ shaka.text.Cue.defaultTextColor = {
597
+ 'white': 'white',
598
+ 'lime': 'lime',
599
+ 'cyan': 'cyan',
600
+ 'red': 'red',
601
+ 'yellow': 'yellow',
602
+ 'magenta': 'magenta',
603
+ 'blue': 'blue',
604
+ 'black': 'black'
605
+ };
606
+ /**
607
+ * Default text background color according to
608
+ * https://w3c.github.io/webvtt/#default-text-background
609
+ * @enum {string}
610
+ */
611
+ shaka.text.Cue.defaultTextBackgroundColor = {
612
+ 'bg_white': 'white',
613
+ 'bg_lime': 'lime',
614
+ 'bg_cyan': 'cyan',
615
+ 'bg_red': 'red',
616
+ 'bg_yellow': 'yellow',
617
+ 'bg_magenta': 'magenta',
618
+ 'bg_blue': 'blue',
619
+ 'bg_black': 'black'
620
+ };
621
+ /**
622
+ * In CSS font weight can be a number, where 400 is normal and 700 is bold.
623
+ * Use these values for the enum for consistency.
624
+ * @enum {number}
625
+ */
626
+ shaka.text.Cue.fontWeight = {
627
+ 'NORMAL': 400,
628
+ 'BOLD': 700
629
+ };
630
+ /**
631
+ * @enum {string}
632
+ */
633
+ shaka.text.Cue.fontStyle = {
634
+ 'NORMAL': 'normal',
635
+ 'ITALIC': 'italic',
636
+ 'OBLIQUE': 'oblique'
637
+ };
638
+ /**
639
+ * @enum {string}
640
+ */
641
+ shaka.text.Cue.textDecoration = {
642
+ 'UNDERLINE': 'underline',
643
+ 'LINE_THROUGH': 'lineThrough',
644
+ 'OVERLINE': 'overline'
645
+ };
646
+ /**
647
+ * An interface to standardize how objects are destroyed.
648
+ * @interface
649
+ */
650
+ shaka.util.IDestroyable = class {
651
+ /**
652
+ * Request that this object be destroyed, releasing all resources and shutting
653
+ * down all operations. Returns a Promise which is resolved when destruction
654
+ * is complete. This Promise should never be rejected.
655
+ * @return {!Promise}
656
+ */
657
+ destroy() {}
658
+ };
659
+ /**
660
+ * @summary Manages transmuxer plugins.
661
+ * @implements {shaka.util.IDestroyable}
662
+ */
663
+ shaka.transmuxer.TransmuxerEngine = class {
664
+ /**
665
+ * @override
666
+ */
667
+ destroy() {}
668
+ /**
669
+ * @param {string} mimeType
670
+ * @param {!shaka.extern.TransmuxerPlugin} plugin
671
+ * @param {number} priority
672
+ */
673
+ static registerTransmuxer(mimeType, plugin, priority) {}
674
+ /**
675
+ * @param {string} mimeType
676
+ * @param {number} priority
677
+ */
678
+ static unregisterTransmuxer(mimeType, priority) {}
679
+ /**
680
+ * @param {string} mimeType
681
+ * @param {string=} contentType
682
+ * @return {?shaka.extern.TransmuxerPlugin}
683
+ */
684
+ static findTransmuxer(mimeType, contentType) {}
685
+ };
686
+ /**
687
+ * Priority level for transmuxer plugins.
688
+ * If multiple plugins are provided for the same mime type, only the
689
+ * highest-priority one is used.
690
+ * @enum {number}
691
+ */
692
+ shaka.transmuxer.TransmuxerEngine.PluginPriority = {
693
+ 'FALLBACK': 1,
694
+ 'PREFERRED_SECONDARY': 2,
695
+ 'PREFERRED': 3,
696
+ 'APPLICATION': 4
697
+ };
698
+ /**
699
+ * @summary
700
+ * Describes an error that happened.
701
+ * @description
702
+ * This uses numerical codes to describe
703
+ * which error happened.
704
+ * Some error are caused by errors from the browser. In these cases, the error
705
+ * object is provided as part of the <code>data</code> field. System codes come
706
+ * from the browser and may or may not be documented. Here are some places
707
+ * where the errors may be documented:
708
+ * <ul>
709
+ * <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
710
+ * <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
711
+ * <li><a href="https://hresult.info">Edge/PlayReady errors</a>
712
+ * </ul>
713
+ * @implements {shaka.extern.Error}
714
+ * @extends {Error}
715
+ */
716
+ shaka.util.Error = class {
717
+ /**
718
+ * @param {shaka.util.Error.Severity} severity
719
+ * @param {shaka.util.Error.Category} category
720
+ * @param {shaka.util.Error.Code} code
721
+ * @param {...*} varArgs
722
+ */
723
+ constructor(severity, category, code, ...varArgs) {}
724
+ };
725
+ /**
726
+ * @override
727
+ */
728
+ shaka.util.Error.prototype.severity;
729
+ /**
730
+ * @override
731
+ */
732
+ shaka.util.Error.prototype.category;
733
+ /**
734
+ * @override
735
+ */
736
+ shaka.util.Error.prototype.code;
737
+ /**
738
+ * @override
739
+ */
740
+ shaka.util.Error.prototype.data;
741
+ /**
742
+ * @override
743
+ */
744
+ shaka.util.Error.prototype.handled;
745
+ /**
746
+ * @enum {number}
747
+ */
748
+ shaka.util.Error.Severity = {
749
+ 'RECOVERABLE': 1,
750
+ 'CRITICAL': 2
751
+ };
752
+ /**
753
+ * @enum {number}
754
+ */
755
+ shaka.util.Error.Category = {
756
+ 'NETWORK': 1,
757
+ 'TEXT': 2,
758
+ 'MEDIA': 3,
759
+ 'MANIFEST': 4,
760
+ 'STREAMING': 5,
761
+ 'DRM': 6,
762
+ 'PLAYER': 7,
763
+ 'CAST': 8,
764
+ 'STORAGE': 9,
765
+ 'ADS': 10
766
+ };
767
+ /**
768
+ * @enum {number}
769
+ */
770
+ shaka.util.Error.Code = {
771
+ 'UNSUPPORTED_SCHEME': 1000,
772
+ 'BAD_HTTP_STATUS': 1001,
773
+ 'HTTP_ERROR': 1002,
774
+ 'TIMEOUT': 1003,
775
+ 'MALFORMED_DATA_URI': 1004,
776
+ 'REQUEST_FILTER_ERROR': 1006,
777
+ 'RESPONSE_FILTER_ERROR': 1007,
778
+ 'MALFORMED_TEST_URI': 1008,
779
+ 'UNEXPECTED_TEST_REQUEST': 1009,
780
+ 'ATTEMPTS_EXHAUSTED': 1010,
781
+ 'SEGMENT_MISSING': 1011,
782
+ 'INVALID_TEXT_HEADER': 2000,
783
+ 'INVALID_TEXT_CUE': 2001,
784
+ 'UNABLE_TO_DETECT_ENCODING': 2003,
785
+ 'BAD_ENCODING': 2004,
786
+ 'INVALID_XML': 2005,
787
+ 'INVALID_MP4_TTML': 2007,
788
+ 'INVALID_MP4_VTT': 2008,
789
+ 'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
790
+ 'INVALID_MP4_CEA': 2010,
791
+ 'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
792
+ 'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
793
+ 'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
794
+ 'MISSING_TEXT_PLUGIN': 2014,
795
+ 'CHAPTERS_TRACK_FAILED': 2015,
796
+ 'UNSUPPORTED_EXTERNAL_THUMBNAILS_URI': 2017,
797
+ 'BUFFER_READ_OUT_OF_BOUNDS': 3000,
798
+ 'JS_INTEGER_OVERFLOW': 3001,
799
+ 'EBML_OVERFLOW': 3002,
800
+ 'EBML_BAD_FLOATING_POINT_SIZE': 3003,
801
+ 'MP4_SIDX_WRONG_BOX_TYPE': 3004,
802
+ 'MP4_SIDX_INVALID_TIMESCALE': 3005,
803
+ 'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
804
+ 'WEBM_CUES_ELEMENT_MISSING': 3007,
805
+ 'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
806
+ 'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
807
+ 'WEBM_INFO_ELEMENT_MISSING': 3010,
808
+ 'WEBM_DURATION_ELEMENT_MISSING': 3011,
809
+ 'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
810
+ 'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
811
+ 'MEDIA_SOURCE_OPERATION_FAILED': 3014,
812
+ 'MEDIA_SOURCE_OPERATION_THREW': 3015,
813
+ 'VIDEO_ERROR': 3016,
814
+ 'QUOTA_EXCEEDED_ERROR': 3017,
815
+ 'TRANSMUXING_FAILED': 3018,
816
+ 'CONTENT_TRANSFORMATION_FAILED': 3019,
817
+ 'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
818
+ 'MSS_TRANSMUXING_FAILED': 3022,
819
+ 'TRANSMUXING_NO_VIDEO_DATA': 3023,
820
+ 'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
821
+ 'DASH_INVALID_XML': 4001,
822
+ 'DASH_NO_SEGMENT_INFO': 4002,
823
+ 'DASH_EMPTY_ADAPTATION_SET': 4003,
824
+ 'DASH_EMPTY_PERIOD': 4004,
825
+ 'DASH_WEBM_MISSING_INIT': 4005,
826
+ 'DASH_UNSUPPORTED_CONTAINER': 4006,
827
+ 'DASH_PSSH_BAD_ENCODING': 4007,
828
+ 'DASH_NO_COMMON_KEY_SYSTEM': 4008,
829
+ 'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
830
+ 'DASH_CONFLICTING_KEY_IDS': 4010,
831
+ 'RESTRICTIONS_CANNOT_BE_MET': 4012,
832
+ 'HLS_PLAYLIST_HEADER_MISSING': 4015,
833
+ 'INVALID_HLS_TAG': 4016,
834
+ 'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
835
+ 'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
836
+ 'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
837
+ 'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
838
+ 'HLS_REQUIRED_TAG_MISSING': 4024,
839
+ 'HLS_COULD_NOT_GUESS_CODECS': 4025,
840
+ 'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
841
+ 'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
842
+ 'DASH_XLINK_DEPTH_LIMIT': 4028,
843
+ 'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
844
+ 'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
845
+ 'NO_VARIANTS': 4036,
846
+ 'PERIOD_FLATTENING_FAILED': 4037,
847
+ 'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
848
+ 'HLS_VARIABLE_NOT_FOUND': 4039,
849
+ 'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
850
+ 'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
851
+ 'NO_WEB_CRYPTO_API': 4042,
852
+ 'CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM': 4045,
853
+ 'MSS_INVALID_XML': 4046,
854
+ 'MSS_LIVE_CONTENT_NOT_SUPPORTED': 4047,
855
+ 'AES_128_INVALID_IV_LENGTH': 4048,
856
+ 'AES_128_INVALID_KEY_LENGTH': 4049,
857
+ 'DASH_CONFLICTING_AES_128': 4050,
858
+ 'DASH_UNSUPPORTED_AES_128': 4051,
859
+ 'DASH_INVALID_PATCH': 4052,
860
+ 'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
861
+ 'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
862
+ 'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
863
+ 'FAILED_TO_CREATE_CDM': 6002,
864
+ 'FAILED_TO_ATTACH_TO_VIDEO': 6003,
865
+ 'INVALID_SERVER_CERTIFICATE': 6004,
866
+ 'FAILED_TO_CREATE_SESSION': 6005,
867
+ 'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
868
+ 'LICENSE_REQUEST_FAILED': 6007,
869
+ 'LICENSE_RESPONSE_REJECTED': 6008,
870
+ 'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
871
+ 'NO_LICENSE_SERVER_GIVEN': 6012,
872
+ 'OFFLINE_SESSION_REMOVED': 6013,
873
+ 'EXPIRED': 6014,
874
+ 'SERVER_CERTIFICATE_REQUIRED': 6015,
875
+ 'INIT_DATA_TRANSFORM_ERROR': 6016,
876
+ 'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
877
+ 'MIN_HDCP_VERSION_NOT_MATCH': 6018,
878
+ 'ERROR_CHECKING_HDCP_VERSION': 6019,
879
+ 'LOAD_INTERRUPTED': 7000,
880
+ 'OPERATION_ABORTED': 7001,
881
+ 'NO_VIDEO_ELEMENT': 7002,
882
+ 'OBJECT_DESTROYED': 7003,
883
+ 'CONTENT_NOT_LOADED': 7004,
884
+ 'SRC_EQUALS_PRELOAD_NOT_SUPPORTED': 7005,
885
+ 'PRELOAD_DESTROYED': 7006,
886
+ 'CAST_API_UNAVAILABLE': 8000,
887
+ 'NO_CAST_RECEIVERS': 8001,
888
+ 'ALREADY_CASTING': 8002,
889
+ 'UNEXPECTED_CAST_ERROR': 8003,
890
+ 'CAST_CANCELED_BY_USER': 8004,
891
+ 'CAST_CONNECTION_TIMED_OUT': 8005,
892
+ 'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
893
+ 'STORAGE_NOT_SUPPORTED': 9000,
894
+ 'INDEXED_DB_ERROR': 9001,
895
+ 'DEPRECATED_OPERATION_ABORTED': 9002,
896
+ 'REQUESTED_ITEM_NOT_FOUND': 9003,
897
+ 'MALFORMED_OFFLINE_URI': 9004,
898
+ 'CANNOT_STORE_LIVE_OFFLINE': 9005,
899
+ 'NO_INIT_DATA_FOR_OFFLINE': 9007,
900
+ 'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
901
+ 'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
902
+ 'KEY_NOT_FOUND': 9012,
903
+ 'MISSING_STORAGE_CELL': 9013,
904
+ 'STORAGE_LIMIT_REACHED': 9014,
905
+ 'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
906
+ 'MODIFY_OPERATION_NOT_SUPPORTED': 9016,
907
+ 'INDEXED_DB_INIT_TIMED_OUT': 9017,
908
+ 'CS_IMA_SDK_MISSING': 10000,
909
+ 'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
910
+ 'SS_IMA_SDK_MISSING': 10002,
911
+ 'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
912
+ 'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
913
+ 'MT_AD_MANAGER_NOT_INITIALIZED': 10005
914
+ };
915
+ /**
916
+ * A timer allows a single function to be executed at a later time or at
917
+ * regular intervals.
918
+ * @final
919
+ */
920
+ shaka.util.Timer = class {
921
+ /**
922
+ * Create a new timer. A timer is committed to a single callback function.
923
+ * While there is no technical reason to do this, it is far easier to
924
+ * understand and use timers when they are connected to one functional idea.
925
+ * @param {function()} onTick
926
+ */
927
+ constructor(onTick) {}
928
+ /**
929
+ * Have the timer call |onTick| now.
930
+ * @return {!shaka.util.Timer}
931
+ */
932
+ tickNow() {}
933
+ /**
934
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
935
+ * called first.
936
+ * @param {number} seconds
937
+ * @return {!shaka.util.Timer}
938
+ */
939
+ tickAfter(seconds) {}
940
+ /**
941
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
942
+ * @param {number} seconds
943
+ * @return {!shaka.util.Timer}
944
+ */
945
+ tickEvery(seconds) {}
946
+ /**
947
+ * Stop the timer and clear the previous behaviour. The timer is still usable
948
+ * after calling |stop|.
949
+ */
950
+ stop() {}
951
+ };
952
+ /**
953
+ * @namespace shaka.util.StringUtils
954
+ * @summary A set of string utility functions.
955
+ */
956
+ shaka.util.StringUtils = class {
957
+ /**
958
+ * Creates a string from the given buffer as UTF-8 encoding.
959
+ * @param {?BufferSource} data
960
+ * @return {string}
961
+ */
962
+ static fromUTF8(data) {}
963
+ /**
964
+ * Creates a string from the given buffer as UTF-16 encoding.
965
+ * @param {?BufferSource} data
966
+ * @param {boolean} littleEndian
967
+ true to read little endian, false to read big.
968
+ * @param {boolean=} noThrow true to avoid throwing in cases where we may
969
+ * expect invalid input. If noThrow is true and the data has an odd
970
+ * length,it will be truncated.
971
+ * @return {string}
972
+ */
973
+ static fromUTF16(data, littleEndian, noThrow) {}
974
+ /**
975
+ * Creates a string from the given buffer, auto-detecting the encoding that is
976
+ * being used. If it cannot detect the encoding, it will throw an exception.
977
+ * @param {?BufferSource} data
978
+ * @return {string}
979
+ */
980
+ static fromBytesAutoDetect(data) {}
981
+ /**
982
+ * Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
983
+ * @param {string} str
984
+ * @return {!ArrayBuffer}
985
+ */
986
+ static toUTF8(str) {}
987
+ /**
988
+ * Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
989
+ * @param {string} str
990
+ * @param {boolean} littleEndian
991
+ * @return {!ArrayBuffer}
992
+ */
993
+ static toUTF16(str, littleEndian) {}
994
+ /**
995
+ * Resets the fromCharCode method's implementation.
996
+ * For debug use.
997
+ */
998
+ static resetFromCharCode() {}
999
+ };
1000
+ /**
1001
+ * @summary A set of Uint8Array utility functions.
1002
+ */
1003
+ shaka.util.Uint8ArrayUtils = class {
1004
+ /**
1005
+ * Convert a buffer to a base64 string. The output will be standard
1006
+ * alphabet as opposed to base64url safe alphabet.
1007
+ * @param {BufferSource} data
1008
+ * @return {string}
1009
+ */
1010
+ static toStandardBase64(data) {}
1011
+ /**
1012
+ * Convert a buffer to a base64 string. The output will always use the
1013
+ * alternate encoding/alphabet also known as "base64url".
1014
+ * @param {BufferSource} data
1015
+ * @param {boolean=} padding If true, pad the output with equals signs.
1016
+ * Defaults to true.
1017
+ * @return {string}
1018
+ */
1019
+ static toBase64(data, padding) {}
1020
+ /**
1021
+ * Convert a base64 string to a Uint8Array. Accepts either the standard
1022
+ * alphabet or the alternate "base64url" alphabet.
1023
+ * @param {string} str
1024
+ * @return {!Uint8Array}
1025
+ */
1026
+ static fromBase64(str) {}
1027
+ /**
1028
+ * Convert a hex string to a Uint8Array.
1029
+ * @param {string} str
1030
+ * @return {!Uint8Array}
1031
+ */
1032
+ static fromHex(str) {}
1033
+ /**
1034
+ * Convert a buffer to a hex string.
1035
+ * @param {BufferSource} data
1036
+ * @return {string}
1037
+ */
1038
+ static toHex(data) {}
1039
+ /**
1040
+ * Concatenate buffers.
1041
+ * @param {...BufferSource} varArgs
1042
+ * @return {!Uint8Array}
1043
+ */
1044
+ static concat(...varArgs) {}
1045
+ };
1046
+ /**
1047
+ * @summary A set of utility functions for dealing with MIME types.
1048
+ */
1049
+ shaka.util.MimeUtils = class {
1050
+ /**
1051
+ * Takes a MIME type and optional codecs string and produces the full MIME
1052
+ * type. Also remove the codecs for raw formats.
1053
+ * @param {string} mimeType
1054
+ * @param {string=} codecs
1055
+ * @return {string}
1056
+ */
1057
+ static getFullType(mimeType, codecs) {}
1058
+ /**
1059
+ * Takes a MIME type and optional codecs string and produces the full MIME
1060
+ * type.
1061
+ * @param {string} mimeType
1062
+ * @param {string=} codecs
1063
+ * @return {string}
1064
+ */
1065
+ static getFullTypeWithAllCodecs(mimeType, codecs) {}
1066
+ };
1067
+ /**
1068
+ * @summary Manages text parsers and cues.
1069
+ * @implements {shaka.util.IDestroyable}
1070
+ */
1071
+ shaka.text.TextEngine = class {
1072
+ /** @param {shaka.extern.TextDisplayer} displayer */
1073
+ constructor(displayer) {}
1074
+ /**
1075
+ * @param {string} mimeType
1076
+ * @param {!shaka.extern.TextParserPlugin} plugin
1077
+ */
1078
+ static registerParser(mimeType, plugin) {}
1079
+ /**
1080
+ * @param {string} mimeType
1081
+ */
1082
+ static unregisterParser(mimeType) {}
1083
+ /**
1084
+ * @return {?shaka.extern.TextParserPlugin}
1085
+ */
1086
+ static findParser(mimeType) {}
1087
+ /**
1088
+ * @override
1089
+ */
1090
+ destroy() {}
1091
+ };
1092
+ /**
1093
+ * @summary A set of language utility functions.
1094
+ * @final
1095
+ */
1096
+ shaka.util.LanguageUtils = class {
1097
+ /**
1098
+ * Check if |locale1| and |locale2| are locale-compatible.
1099
+ * Locale-compatible is defined as all components in each locale match. Since
1100
+ * we only respect the language and region components, we only check that
1101
+ * the language and region components match.
1102
+ * Examples:
1103
+ * Locale A | Locale B | Locale Compatible
1104
+ * ---------------------------------------
1105
+ * en-US | en-US | true
1106
+ * en | en-US | false
1107
+ * en-US | en-CA | false
1108
+ * @param {string} locale1
1109
+ * @param {string} locale2
1110
+ * @return {boolean}
1111
+ */
1112
+ static areLocaleCompatible(locale1, locale2) {}
1113
+ /**
1114
+ * Check if |locale1| and |locale2| are language-compatible.
1115
+ * Language compatible is when the language component of each locale matches.
1116
+ * This means that no matter what region they have (or don't have) as long as
1117
+ * the language components match, they are language-compatible.
1118
+ * Examples:
1119
+ * Locale A | Locale B | Language-Compatible
1120
+ * -----------------------------------------
1121
+ * en-US | en-US | true
1122
+ * en-US | en | true
1123
+ * en-US | en-CA | true
1124
+ * en-CA | fr-CA | false
1125
+ * @param {string} locale1
1126
+ * @param {string} locale2
1127
+ * @return {boolean}
1128
+ */
1129
+ static areLanguageCompatible(locale1, locale2) {}
1130
+ /**
1131
+ * Check if |possibleParent| is the parent locale of |possibleChild|. Because
1132
+ * we do not support dialects, the parent-child relationship is a lot simpler.
1133
+ * In a parent child relationship:
1134
+ * - The parent and child have the same language-component
1135
+ * - The parent has no region-component
1136
+ * - The child has a region-component
1137
+ * Example:
1138
+ * Locale A | Locale B | Is A The parent of B?
1139
+ * --------------------------------------------
1140
+ * en-US | en-US | no
1141
+ * en-US | en | no
1142
+ * en | en-US | yes
1143
+ * en | en | no
1144
+ * en | fr | no
1145
+ * @param {string} possibleParent
1146
+ * @param {string} possibleChild
1147
+ * @return {boolean}
1148
+ */
1149
+ static isParentOf(possibleParent, possibleChild) {}
1150
+ /**
1151
+ * Check if |localeA| shares the same parent with |localeB|. Since we don't
1152
+ * support dialect, we will only look at language and region. For two locales
1153
+ * to be siblings:
1154
+ * - Both must have language-components
1155
+ * - Both must have region-components
1156
+ * - Both must have the same language-component
1157
+ * Example:
1158
+ * Locale A | Locale B | Siblings?
1159
+ * --------------------------------------------
1160
+ * en-US | en-US | yes
1161
+ * en-US | en-CA | yes
1162
+ * en-US | en | no
1163
+ * en | en-US | no
1164
+ * en | en | no
1165
+ * en | fr | no
1166
+ * @param {string} localeA
1167
+ * @param {string} localeB
1168
+ * @return {boolean}
1169
+ */
1170
+ static isSiblingOf(localeA, localeB) {}
1171
+ /**
1172
+ * Normalize a locale. This will take a locale and canonicalize it to a state
1173
+ * that we are prepared to work with.
1174
+ * We only support with:
1175
+ * - language
1176
+ * - language-REGION
1177
+ * If given a dialect, we will discard it. We will convert any 3-character
1178
+ * codes to 2-character codes. We will force language codes to lowercase and
1179
+ * region codes to uppercase.
1180
+ * @param {string} locale
1181
+ * @return {string}
1182
+ */
1183
+ static normalize(locale) {}
1184
+ /**
1185
+ * Check if two language codes are siblings. Language codes are siblings if
1186
+ * they share the same base language while neither one is the base language.
1187
+ * For example, "en-US" and "en-CA" are siblings but "en-US" and "en" are not
1188
+ * siblings.
1189
+ * @param {string} a
1190
+ * @param {string} b
1191
+ * @return {boolean}
1192
+ */
1193
+ static areSiblings(a, b) {}
1194
+ /**
1195
+ * Compute a numerical relatedness for language codes. Language codes with a
1196
+ * higher relatedness are a better match. Unrelated language codes have a
1197
+ * relatedness score of 0.
1198
+ * @param {string} target
1199
+ * @param {string} candidate
1200
+ * @return {number}
1201
+ */
1202
+ static relatedness(target, candidate) {}
1203
+ /**
1204
+ * Get the normalized base language for a language code.
1205
+ * @param {string} lang
1206
+ * @return {string}
1207
+ */
1208
+ static getBase(lang) {}
1209
+ /**
1210
+ * Get the normalized language of the given text stream. Will return 'und' if
1211
+ * a language is not found on the text stream.
1212
+ * This should always be used to get the language from a text stream.
1213
+ * @param {shaka.extern.Stream} stream
1214
+ * @return {string}
1215
+ */
1216
+ static getLocaleForText(stream) {}
1217
+ /**
1218
+ * Get the normalized locale for the given variant. This will look through
1219
+ * the variant to find the locale that represents the content in the variant.
1220
+ * This will return 'und' if no language can be found.
1221
+ * This should always be used to get the locale from a variant.
1222
+ * @param {shaka.extern.Variant} variant
1223
+ * @return {string}
1224
+ */
1225
+ static getLocaleForVariant(variant) {}
1226
+ /**
1227
+ * Find the locale in |searchSpace| that comes closest to |target|. If no
1228
+ * locale is found to be close to |target|, then |null| will be returned.
1229
+ * @param {string} target
1230
+ * @param {!Iterable.<string>} searchSpace
1231
+ * @return {?string}
1232
+ */
1233
+ static findClosestLocale(target, searchSpace) {}
1234
+ };
1235
+ /**
1236
+ * @summary A set of utility functions for dealing with Streams and Manifests.
1237
+ */
1238
+ shaka.util.StreamUtils = class {
1239
+ /**
1240
+ * @param {shaka.extern.Variant} variant
1241
+ * @param {shaka.extern.Restrictions} restrictions
1242
+ * Configured restrictions from the user.
1243
+ * @param {shaka.extern.Resolution} maxHwRes
1244
+ * The maximum resolution the hardware can handle.
1245
+ * This is applied separately from user restrictions because the setting
1246
+ * should not be easily replaced by the user's configuration.
1247
+ * @return {boolean}
1248
+ */
1249
+ static meetsRestrictions(variant, restrictions, maxHwRes) {}
1250
+ };
1251
+ /**
1252
+ * @summary
1253
+ * <p>
1254
+ * This defines the default ABR manager for the Player. An instance of this
1255
+ * class is used when no ABR manager is given.
1256
+ * </p>
1257
+ * <p>
1258
+ * The behavior of this class is to take throughput samples using
1259
+ * segmentDownloaded to estimate the current network bandwidth. Then it will
1260
+ * use that to choose the streams that best fit the current bandwidth. It will
1261
+ * always pick the highest bandwidth variant it thinks can be played.
1262
+ * </p>
1263
+ * <p>
1264
+ * After initial choices are made, this class will call switchCallback() when
1265
+ * there is a better choice. switchCallback() will not be called more than once
1266
+ * per ({@link shaka.abr.SimpleAbrManager.SWITCH_INTERVAL_MS}).
1267
+ * </p>
1268
+ * @implements {shaka.extern.AbrManager}
1269
+ * @implements {shaka.util.IReleasable}
1270
+ */
1271
+ shaka.abr.SimpleAbrManager = class {
1272
+ /** */
1273
+ constructor() {}
1274
+ /**
1275
+ * @override
1276
+ */
1277
+ stop() {}
1278
+ /**
1279
+ * @override
1280
+ */
1281
+ release() {}
1282
+ /**
1283
+ * @override
1284
+ */
1285
+ init(switchCallback) {}
1286
+ /**
1287
+ * @param {boolean=} preferFastSwitching
1288
+ * @return {shaka.extern.Variant}
1289
+ * @override
1290
+ */
1291
+ chooseVariant(preferFastSwitching) {}
1292
+ /**
1293
+ * @override
1294
+ */
1295
+ enable() {}
1296
+ /**
1297
+ * @override
1298
+ */
1299
+ disable() {}
1300
+ /**
1301
+ * @param {number} deltaTimeMs The duration, in milliseconds, that the request
1302
+ * took to complete.
1303
+ * @param {number} numBytes The total number of bytes transferred.
1304
+ * @param {boolean} allowSwitch Indicate if the segment is allowed to switch
1305
+ * to another stream.
1306
+ * @param {shaka.extern.Request=} request
1307
+ * A reference to the request
1308
+ * @override
1309
+ */
1310
+ segmentDownloaded(deltaTimeMs, numBytes, allowSwitch, request) {}
1311
+ /**
1312
+ * @override
1313
+ */
1314
+ trySuggestStreams() {}
1315
+ /**
1316
+ * @override
1317
+ */
1318
+ getBandwidthEstimate() {}
1319
+ /**
1320
+ * @override
1321
+ */
1322
+ setVariants(variants) {}
1323
+ /**
1324
+ * @override
1325
+ */
1326
+ playbackRateChanged(rate) {}
1327
+ /**
1328
+ * @override
1329
+ */
1330
+ setMediaElement(mediaElement) {}
1331
+ /**
1332
+ * @override
1333
+ */
1334
+ setCmsdManager(cmsdManager) {}
1335
+ /**
1336
+ * @override
1337
+ */
1338
+ configure(config) {}
1339
+ };
1340
+ /**
1341
+ * @summary DataViewReader abstracts a DataView object.
1342
+ */
1343
+ shaka.util.DataViewReader = class {
1344
+ /**
1345
+ * @param {BufferSource} data
1346
+ * @param {shaka.util.DataViewReader.Endianness} endianness The endianness.
1347
+ */
1348
+ constructor(data, endianness) {}
1349
+ /**
1350
+ * @return {boolean} True if the reader has more data, false otherwise.
1351
+ */
1352
+ hasMoreData() {}
1353
+ /**
1354
+ * Gets the current byte position.
1355
+ * @return {number}
1356
+ */
1357
+ getPosition() {}
1358
+ /**
1359
+ * Gets the byte length of the DataView.
1360
+ * @return {number}
1361
+ */
1362
+ getLength() {}
1363
+ /**
1364
+ * Reads an unsigned 8 bit integer, and advances the reader.
1365
+ * @return {number} The integer.
1366
+ */
1367
+ readUint8() {}
1368
+ /**
1369
+ * Reads an unsigned 16 bit integer, and advances the reader.
1370
+ * @return {number} The integer.
1371
+ */
1372
+ readUint16() {}
1373
+ /**
1374
+ * Reads an unsigned 32 bit integer, and advances the reader.
1375
+ * @return {number} The integer.
1376
+ */
1377
+ readUint32() {}
1378
+ /**
1379
+ * Reads a signed 32 bit integer, and advances the reader.
1380
+ * @return {number} The integer.
1381
+ */
1382
+ readInt32() {}
1383
+ /**
1384
+ * Reads an unsigned 64 bit integer, and advances the reader.
1385
+ * @return {number} The integer.
1386
+ */
1387
+ readUint64() {}
1388
+ /**
1389
+ * Reads the specified number of raw bytes.
1390
+ * @param {number} bytes The number of bytes to read.
1391
+ * @return {!Uint8Array}
1392
+ */
1393
+ readBytes(bytes) {}
1394
+ /**
1395
+ * Skips the specified number of bytes.
1396
+ * @param {number} bytes The number of bytes to skip.
1397
+ */
1398
+ skip(bytes) {}
1399
+ /**
1400
+ * Rewinds the specified number of bytes.
1401
+ * @param {number} bytes The number of bytes to rewind.
1402
+ */
1403
+ rewind(bytes) {}
1404
+ /**
1405
+ * Seeks to a specified position.
1406
+ * @param {number} position The desired byte position within the DataView.
1407
+ */
1408
+ seek(position) {}
1409
+ /**
1410
+ * Keeps reading until it reaches a byte that equals to zero. The text is
1411
+ * assumed to be UTF-8.
1412
+ * @return {string}
1413
+ */
1414
+ readTerminatedString() {}
1415
+ };
1416
+ /**
1417
+ * Endianness.
1418
+ * @enum {number}
1419
+ */
1420
+ shaka.util.DataViewReader.Endianness = {
1421
+ 'BIG_ENDIAN': 0,
1422
+ 'LITTLE_ENDIAN': 1
1423
+ };
1424
+ /**
1425
+ * CEA-X08 captions decoder.
1426
+ * @implements {shaka.extern.ICaptionDecoder}
1427
+ */
1428
+ shaka.cea.CeaDecoder = class {
1429
+ /** */
1430
+ constructor() {}
1431
+ };
1432
+ /**
1433
+ */
1434
+ shaka.util.Mp4Parser = class {
1435
+ /** */
1436
+ constructor() {}
1437
+ /**
1438
+ * Declare a box type as a Box.
1439
+ * @param {string} type
1440
+ * @param {!shaka.util.Mp4Parser.CallbackType} definition
1441
+ * @return {!shaka.util.Mp4Parser}
1442
+ */
1443
+ box(type, definition) {}
1444
+ /**
1445
+ * Declare a box type as a Full Box.
1446
+ * @param {string} type
1447
+ * @param {!shaka.util.Mp4Parser.CallbackType} definition
1448
+ * @return {!shaka.util.Mp4Parser}
1449
+ */
1450
+ fullBox(type, definition) {}
1451
+ /**
1452
+ * Stop parsing. Useful for extracting information from partial segments and
1453
+ * avoiding an out-of-bounds error once you find what you are looking for.
1454
+ */
1455
+ stop() {}
1456
+ /**
1457
+ * Parse the given data using the added callbacks.
1458
+ * @param {!BufferSource} data
1459
+ * @param {boolean=} partialOkay If true, allow reading partial payloads
1460
+ * from some boxes. If the goal is a child box, we can sometimes find it
1461
+ * without enough data to find all child boxes.
1462
+ * @param {boolean=} stopOnPartial If true, stop reading if an incomplete
1463
+ * box is detected.
1464
+ */
1465
+ parse(data, partialOkay, stopOnPartial) {}
1466
+ /**
1467
+ * Parse the next box on the current level.
1468
+ * @param {number} absStart The absolute start position in the original
1469
+ * byte array.
1470
+ * @param {!shaka.util.DataViewReader} reader
1471
+ * @param {boolean=} partialOkay If true, allow reading partial payloads
1472
+ * from some boxes. If the goal is a child box, we can sometimes find it
1473
+ * without enough data to find all child boxes.
1474
+ * @param {boolean=} stopOnPartial If true, stop reading if an incomplete
1475
+ * box is detected.
1476
+ */
1477
+ parseNext(absStart, reader, partialOkay, stopOnPartial) {}
1478
+ /**
1479
+ * A callback that tells the Mp4 parser to treat the body of a box as a series
1480
+ * of boxes. The number of boxes is limited by the size of the parent box.
1481
+ * @param {!shaka.extern.ParsedBox} box
1482
+ */
1483
+ static children(box) {}
1484
+ /**
1485
+ * A callback that tells the Mp4 parser to treat the body of a box as a sample
1486
+ * description. A sample description box has a fixed number of children. The
1487
+ * number of children is represented by a 4 byte unsigned integer. Each child
1488
+ * is a box.
1489
+ * @param {!shaka.extern.ParsedBox} box
1490
+ */
1491
+ static sampleDescription(box) {}
1492
+ /**
1493
+ * A callback that tells the Mp4 parser to treat the body of a box as a visual
1494
+ * sample entry. A visual sample entry has some fixed-sized fields
1495
+ * describing the video codec parameters, followed by an arbitrary number of
1496
+ * appended children. Each child is a box.
1497
+ * @param {!shaka.extern.ParsedBox} box
1498
+ */
1499
+ static visualSampleEntry(box) {}
1500
+ /**
1501
+ * A callback that tells the Mp4 parser to treat the body of a box as a audio
1502
+ * sample entry. A audio sample entry has some fixed-sized fields
1503
+ * describing the audio codec parameters, followed by an arbitrary number of
1504
+ * appended children. Each child is a box.
1505
+ * @param {!shaka.extern.ParsedBox} box
1506
+ */
1507
+ static audioSampleEntry(box) {}
1508
+ /**
1509
+ * Create a callback that tells the Mp4 parser to treat the body of a box as a
1510
+ * binary blob and to parse the body's contents using the provided callback.
1511
+ * @param {function(!Uint8Array)} callback
1512
+ * @return {!shaka.util.Mp4Parser.CallbackType}
1513
+ */
1514
+ static allData(callback) {}
1515
+ /**
1516
+ * Convert an integer type from a box into an ascii string name.
1517
+ * Useful for debugging.
1518
+ * @param {number} type The type of the box, a uint32.
1519
+ * @return {string}
1520
+ */
1521
+ static typeToString(type) {}
1522
+ /**
1523
+ * Find the header size of the box.
1524
+ * Useful for modifying boxes in place or finding the exact offset of a field.
1525
+ * @param {shaka.extern.ParsedBox} box
1526
+ * @return {number}
1527
+ */
1528
+ static headerSize(box) {}
1529
+ };
1530
+ /**
1531
+ * @typedef {function(!shaka.extern.ParsedBox)}
1532
+ */
1533
+ shaka.util.Mp4Parser.CallbackType;
1534
+ /**
1535
+ * MPEG4 stream parser used for extracting 708 closed captions data.
1536
+ * @implements {shaka.extern.ICeaParser}
1537
+ */
1538
+ shaka.cea.Mp4CeaParser = class {
1539
+ /** */
1540
+ constructor() {}
1541
+ };
1542
+ /**
1543
+ * @summary
1544
+ * Parser for exponential Golomb codes, a variable-bitwidth number encoding
1545
+ * scheme used by h264.
1546
+ * Based on https://github.com/videojs/mux.js/blob/main/lib/utils/exp-golomb.js
1547
+ */
1548
+ shaka.util.ExpGolomb = class {
1549
+ /**
1550
+ * @param {!Uint8Array} data
1551
+ * @param {boolean=} convertEbsp2rbsp
1552
+ */
1553
+ constructor(data, convertEbsp2rbsp) {}
1554
+ };
1555
+ /**
1556
+ * @summary A set of Id3Utils utility functions.
1557
+ */
1558
+ shaka.util.Id3Utils = class {
1559
+ /**
1560
+ * Returns an array of ID3 frames found in all the ID3 tags in the id3Data
1561
+ * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags
1562
+ * @return {!Array.<shaka.extern.MetadataFrame>}
1563
+ */
1564
+ static getID3Frames(id3Data) {}
1565
+ /**
1566
+ * Returns any adjacent ID3 tags found in data starting at offset, as one
1567
+ * block of data
1568
+ * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags
1569
+ * @param {number=} offset - The offset at which to start searching
1570
+ * @return {!Uint8Array}
1571
+ */
1572
+ static getID3Data(id3Data, offset) {}
1573
+ };
1574
+ /**
1575
+ * @see https://en.wikipedia.org/wiki/MPEG_transport_stream
1576
+ */
1577
+ shaka.util.TsParser = class {
1578
+ /** */
1579
+ constructor() {}
1580
+ /**
1581
+ * Clear previous data
1582
+ */
1583
+ clearData() {}
1584
+ /**
1585
+ * Parse the given data
1586
+ * @param {Uint8Array} data
1587
+ * @return {!shaka.util.TsParser}
1588
+ */
1589
+ parse(data) {}
1590
+ /**
1591
+ * Parse AVC Nalus
1592
+ * The code is based on hls.js
1593
+ * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
1594
+ * @param {shaka.extern.MPEG_PES} pes
1595
+ * @param {?shaka.extern.MPEG_PES=} nextPes
1596
+ * @return {!Array.<shaka.extern.VideoNalu>}
1597
+ */
1598
+ parseAvcNalus(pes, nextPes) {}
1599
+ /**
1600
+ * Parse AVC and HVC Nalus
1601
+ * The code is based on hls.js
1602
+ * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
1603
+ * @param {shaka.extern.MPEG_PES} pes
1604
+ * @param {{nalu: ?shaka.extern.VideoNalu, state: ?number}} lastInfo
1605
+ * @return {!Array.<shaka.extern.VideoNalu>}
1606
+ */
1607
+ parseNalus(pes, lastInfo) {}
1608
+ /**
1609
+ * Return the ID3 metadata
1610
+ * @return {!Array.<shaka.extern.ID3Metadata>}
1611
+ */
1612
+ getMetadata() {}
1613
+ /**
1614
+ * Return the audio data
1615
+ * @return {!Array.<shaka.extern.MPEG_PES>}
1616
+ */
1617
+ getAudioData() {}
1618
+ /**
1619
+ * Return the video data
1620
+ * @param {boolean=} naluProcessing
1621
+ * @return {!Array.<shaka.extern.MPEG_PES>}
1622
+ */
1623
+ getVideoData(naluProcessing) {}
1624
+ /**
1625
+ * Return the start time for the audio and video
1626
+ * @param {string} contentType
1627
+ * @return {?number}
1628
+ */
1629
+ getStartTime(contentType) {}
1630
+ /**
1631
+ * Return the audio and video codecs
1632
+ * @return {{audio: ?string, video: ?string}}
1633
+ */
1634
+ getCodecs() {}
1635
+ /**
1636
+ * Return the video data
1637
+ * @return {!Array.<shaka.extern.VideoNalu>}
1638
+ */
1639
+ getVideoNalus() {}
1640
+ /**
1641
+ * Return the video resolution
1642
+ * @return {{height: ?string, width: ?string}}
1643
+ */
1644
+ getVideoResolution() {}
1645
+ /**
1646
+ * Return the video information
1647
+ * @return {{height: ?string, width: ?string, codec: ?string}}
1648
+ */
1649
+ getVideoInfo() {}
1650
+ /**
1651
+ * Check if the passed data corresponds to an MPEG2-TS
1652
+ * @param {Uint8Array} data
1653
+ * @return {boolean}
1654
+ */
1655
+ static probe(data) {}
1656
+ /**
1657
+ * Returns the synchronization offset
1658
+ * @param {Uint8Array} data
1659
+ * @return {number}
1660
+ */
1661
+ static syncOffset(data) {}
1662
+ };
1663
+ /**
1664
+ * @const {number}
1665
+ */
1666
+ shaka.util.TsParser.Timescale;
1667
+ /**
1668
+ * MPEG TS CEA parser.
1669
+ * @implements {shaka.extern.ICeaParser}
1670
+ */
1671
+ shaka.cea.TsCeaParser = class {
1672
+ /** */
1673
+ constructor() {}
1674
+ };
1675
+ /**
1676
+ * @enum {number}
1677
+ */
1678
+ shaka.config.AutoShowText = {
1679
+ 'NEVER': 0,
1680
+ 'ALWAYS': 1,
1681
+ 'IF_PREFERRED_TEXT_LANGUAGE': 2,
1682
+ 'IF_SUBTITLES_MAY_BE_NEEDED': 3
1683
+ };
1684
+ /**
1685
+ * @enum {string}
1686
+ */
1687
+ shaka.config.CodecSwitchingStrategy = {
1688
+ 'RELOAD': 'reload',
1689
+ 'SMOOTH': 'smooth'
1690
+ };
1691
+ /**
1692
+ * A utility to wrap abortable operations. Note that these are not cancelable.
1693
+ * Cancelation implies undoing what has been done so far, whereas aborting only
1694
+ * means that further work is stopped.
1695
+ * @implements {shaka.extern.IAbortableOperation.<T>}
1696
+ * @template T
1697
+ */
1698
+ shaka.util.AbortableOperation = class {
1699
+ /**
1700
+ * @param {!Promise.<T>} promise
1701
+ * A Promise which represents the underlying operation. It is resolved when
1702
+ * the operation is complete, and rejected if the operation fails or is
1703
+ * aborted. Aborted operations should be rejected with a shaka.util.Error
1704
+ * object using the error code OPERATION_ABORTED.
1705
+ * @param {function():!Promise} onAbort
1706
+ * Will be called by this object to abort the underlying operation.
1707
+ * This is not cancelation, and will not necessarily result in any work
1708
+ * being undone. abort() should return a Promise which is resolved when the
1709
+ * underlying operation has been aborted. The returned Promise should never
1710
+ * be rejected.
1711
+ */
1712
+ constructor(promise, onAbort) {}
1713
+ /**
1714
+ * @param {!shaka.util.Error} error
1715
+ * @return {!shaka.util.AbortableOperation} An operation which has already
1716
+ * failed with the error given by the caller.
1717
+ */
1718
+ static failed(error) {}
1719
+ /**
1720
+ * @return {!shaka.util.AbortableOperation} An operation which has already
1721
+ * failed with the error OPERATION_ABORTED.
1722
+ */
1723
+ static aborted() {}
1724
+ /**
1725
+ * @param {U} value
1726
+ * @return {!shaka.util.AbortableOperation.<U>} An operation which has already
1727
+ * completed with the given value.
1728
+ * @template U
1729
+ */
1730
+ static completed(value) {}
1731
+ /**
1732
+ * @param {!Promise.<U>} promise
1733
+ * @return {!shaka.util.AbortableOperation.<U>} An operation which cannot be
1734
+ * aborted. It will be completed when the given Promise is resolved, or
1735
+ * will be failed when the given Promise is rejected.
1736
+ * @template U
1737
+ */
1738
+ static notAbortable(promise) {}
1739
+ /**
1740
+ * @override
1741
+ */
1742
+ abort() {}
1743
+ /**
1744
+ * @param {!Array.<!shaka.util.AbortableOperation>} operations
1745
+ * @return {!shaka.util.AbortableOperation} An operation which is resolved
1746
+ * when all operations are successful and fails when any operation fails.
1747
+ * For this operation, abort() aborts all given operations.
1748
+ */
1749
+ static all(operations) {}
1750
+ /**
1751
+ * @override
1752
+ */
1753
+ finally(onFinal) {}
1754
+ /**
1755
+ * @param {(undefined|
1756
+ * function(T):U|
1757
+ * function(T):!Promise.<U>|
1758
+ * function(T):!shaka.util.AbortableOperation.<U>)} onSuccess
1759
+ * A callback to be invoked after this operation is complete, to chain to
1760
+ * another operation. The callback can return a plain value, a Promise to
1761
+ * an asynchronous value, or another AbortableOperation.
1762
+ * @param {function(*)=} onError
1763
+ * An optional callback to be invoked if this operation fails, to perform
1764
+ * some cleanup or error handling. Analogous to the second parameter of
1765
+ * Promise.prototype.then.
1766
+ * @return {!shaka.util.AbortableOperation.<U>} An operation which is resolved
1767
+ * when this operation and the operation started by the callback are both
1768
+ * complete.
1769
+ * @template U
1770
+ */
1771
+ chain(onSuccess, onError) {}
1772
+ };
1773
+ /**
1774
+ * @const {!Promise.<T>}
1775
+ */
1776
+ shaka.util.AbortableOperation.prototype.promise;
1777
+ /**
1778
+ * @summary Create an Event work-alike object based on the provided dictionary.
1779
+ * The event should contain all of the same properties from the dict.
1780
+ * @extends {Event}
1781
+ */
1782
+ shaka.util.FakeEvent = class {
1783
+ /**
1784
+ * @param {string} type
1785
+ * @param {Map.<string, Object>=} dict
1786
+ */
1787
+ constructor(type, dict) {}
1788
+ };
1789
+ /**
1790
+ * @summary A work-alike for EventTarget. Only DOM elements may be true
1791
+ * EventTargets, but this can be used as a base class to provide event dispatch
1792
+ * to non-DOM classes. Only FakeEvents should be dispatched.
1793
+ * @implements {EventTarget}
1794
+ * @implements {shaka.util.IReleasable}
1795
+ */
1796
+ shaka.util.FakeEventTarget = class {
1797
+ /** */
1798
+ constructor() {}
1799
+ /**
1800
+ * Add an event listener to this object.
1801
+ * @param {string} type The event type to listen for.
1802
+ * @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
1803
+ * listener object to invoke.
1804
+ * @param {(!AddEventListenerOptions|boolean)=} options Ignored.
1805
+ * @override
1806
+ */
1807
+ addEventListener(type, listener, options) {}
1808
+ /**
1809
+ * Add an event listener to this object that is invoked for all events types
1810
+ * the object fires.
1811
+ * @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
1812
+ * listener object to invoke.
1813
+ */
1814
+ listenToAllEvents(listener) {}
1815
+ /**
1816
+ * Remove an event listener from this object.
1817
+ * @param {string} type The event type for which you wish to remove a
1818
+ * listener.
1819
+ * @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
1820
+ * listener object to remove.
1821
+ * @param {(EventListenerOptions|boolean)=} options Ignored.
1822
+ * @override
1823
+ */
1824
+ removeEventListener(type, listener, options) {}
1825
+ /**
1826
+ * Dispatch an event from this object.
1827
+ * @param {!Event} event The event to be dispatched from this object.
1828
+ * @return {boolean} True if the default action was prevented.
1829
+ * @override
1830
+ */
1831
+ dispatchEvent(event) {}
1832
+ /**
1833
+ * @override
1834
+ */
1835
+ release() {}
1836
+ };
1837
+ /**
1838
+ * These are the listener types defined in the closure extern for EventTarget.
1839
+ * @typedef {EventListener|function(!Event):*}
1840
+ */
1841
+ shaka.util.FakeEventTarget.ListenerType;
1842
+ /**
1843
+ * NetworkingEngine wraps all networking operations. This accepts plugins that
1844
+ * handle the actual request. A plugin is registered using registerScheme.
1845
+ * Each scheme has at most one plugin to handle the request.
1846
+ * @implements {shaka.util.IDestroyable}
1847
+ */
1848
+ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1849
+ /**
1850
+ * @param {shaka.net.NetworkingEngine.onProgressUpdated=} onProgressUpdated
1851
+ * Called when
1852
+ * a progress event is triggered. Passed the duration, in milliseconds,
1853
+ * that the request took, the number of bytes transferred, and the boolean
1854
+ * of whether the switching is allowed.
1855
+ * @param {shaka.net.NetworkingEngine.OnHeadersReceived=} onHeadersReceived
1856
+ * Called when the headers are received for a download.
1857
+ * @param {shaka.net.NetworkingEngine.OnDownloadFailed=} onDownloadFailed
1858
+ * Called when a download fails, for any reason.
1859
+ * @param {shaka.net.NetworkingEngine.OnRequest=} onRequest
1860
+ * Called when a request is made
1861
+ * @param {shaka.net.NetworkingEngine.OnRetry=} onRetry
1862
+ * Called when a request retry is made
1863
+ * @param {shaka.net.NetworkingEngine.OnResponse=} onResponse
1864
+ * Called when receive the response
1865
+ */
1866
+ constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
1867
+ /**
1868
+ * @param {boolean} forceHTTP
1869
+ */
1870
+ setForceHTTP(forceHTTP) {}
1871
+ /**
1872
+ * @param {boolean} forceHTTPS
1873
+ */
1874
+ setForceHTTPS(forceHTTPS) {}
1875
+ /**
1876
+ * Registers a scheme plugin. This plugin will handle all requests with the
1877
+ * given scheme. If a plugin with the same scheme already exists, it is
1878
+ * replaced, unless the existing plugin is of higher priority.
1879
+ * If no priority is provided, this defaults to the highest priority of
1880
+ * APPLICATION.
1881
+ * @param {string} scheme
1882
+ * @param {shaka.extern.SchemePlugin} plugin
1883
+ * @param {number=} priority
1884
+ * @param {boolean=} progressSupport
1885
+ */
1886
+ static registerScheme(scheme, plugin, priority, progressSupport) {}
1887
+ /**
1888
+ * Removes a scheme plugin.
1889
+ * @param {string} scheme
1890
+ */
1891
+ static unregisterScheme(scheme) {}
1892
+ /**
1893
+ * Registers a new request filter. All filters are applied in the order they
1894
+ * are registered.
1895
+ * @param {shaka.extern.RequestFilter} filter
1896
+ */
1897
+ registerRequestFilter(filter) {}
1898
+ /**
1899
+ * Removes a request filter.
1900
+ * @param {shaka.extern.RequestFilter} filter
1901
+ */
1902
+ unregisterRequestFilter(filter) {}
1903
+ /**
1904
+ * Clears all request filters.
1905
+ */
1906
+ clearAllRequestFilters() {}
1907
+ /**
1908
+ * Registers a new response filter. All filters are applied in the order they
1909
+ * are registered.
1910
+ * @param {shaka.extern.ResponseFilter} filter
1911
+ */
1912
+ registerResponseFilter(filter) {}
1913
+ /**
1914
+ * Removes a response filter.
1915
+ * @param {shaka.extern.ResponseFilter} filter
1916
+ */
1917
+ unregisterResponseFilter(filter) {}
1918
+ /**
1919
+ * Clears all response filters.
1920
+ */
1921
+ clearAllResponseFilters() {}
1922
+ /**
1923
+ * Gets a copy of the default retry parameters.
1924
+ * @return {shaka.extern.RetryParameters}
1925
+ * NOTE: The implementation moved to shaka.net.Backoff to avoid a circular
1926
+ * dependency between the two classes.
1927
+ */
1928
+ static defaultRetryParameters() {}
1929
+ /**
1930
+ * Makes a simple network request for the given URIs.
1931
+ * @param {!Array.<string>} uris
1932
+ * @param {shaka.extern.RetryParameters} retryParams
1933
+ * @param {?function(BufferSource):!Promise=} streamDataCallback
1934
+ * @return {shaka.extern.Request}
1935
+ */
1936
+ static makeRequest(uris, retryParams, streamDataCallback) {}
1937
+ /**
1938
+ * @override
1939
+ */
1940
+ destroy() {}
1941
+ /**
1942
+ * Makes a network request and returns the resulting data.
1943
+ * @param {shaka.net.NetworkingEngine.RequestType} type
1944
+ * @param {shaka.extern.Request} request
1945
+ * @param {shaka.extern.RequestContext=} context
1946
+ * @return {!shaka.net.NetworkingEngine.PendingRequest}
1947
+ */
1948
+ request(type, request, context) {}
1949
+ };
1950
+ /**
1951
+ * A wrapper class for the number of bytes remaining to be downloaded for the
1952
+ * request.
1953
+ * Instead of using PendingRequest directly, this class is needed to be sent to
1954
+ * plugin as a parameter, and a Promise is returned, before PendingRequest is
1955
+ * created.
1956
+ */
1957
+ shaka.net.NetworkingEngine.NumBytesRemainingClass = class {
1958
+ /**
1959
+ * Constructor
1960
+ */
1961
+ constructor() {}
1962
+ };
1963
+ /**
1964
+ * A pending network request. This can track the current progress of the
1965
+ * download, and allows the request to be aborted if the network is slow.
1966
+ * @implements {shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1967
+ * @extends {shaka.util.AbortableOperation}
1968
+ */
1969
+ shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOperation {
1970
+ /**
1971
+ * @param {!Promise} promise
1972
+ * A Promise which represents the underlying operation. It is resolved
1973
+ * when the operation is complete, and rejected if the operation fails or
1974
+ * is aborted. Aborted operations should be rejected with a
1975
+ * shaka.util.Error object using the error code OPERATION_ABORTED.
1976
+ * @param {function():!Promise} onAbort
1977
+ * Will be called by this object to abort the underlying operation. This
1978
+ * is not cancelation, and will not necessarily result in any work being
1979
+ * undone. abort() should return a Promise which is resolved when the
1980
+ * underlying operation has been aborted. The returned Promise should
1981
+ * never be rejected.
1982
+ * @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
1983
+ * numBytesRemainingObj
1984
+ */
1985
+ constructor(promise, onAbort, numBytesRemainingObj) {}
1986
+ };
1987
+ /**
1988
+ * Request types. Allows a filter to decide which requests to read/alter.
1989
+ * @enum {number}
1990
+ */
1991
+ shaka.net.NetworkingEngine.RequestType = {
1992
+ 'MANIFEST': 0,
1993
+ 'SEGMENT': 1,
1994
+ 'LICENSE': 2,
1995
+ 'APP': 3,
1996
+ 'TIMING': 4,
1997
+ 'SERVER_CERTIFICATE': 5,
1998
+ 'KEY': 6,
1999
+ 'ADS': 7,
2000
+ 'CONTENT_STEERING': 8
2001
+ };
2002
+ /**
2003
+ * A more advanced form of the RequestType structure, meant to describe
2004
+ * sub-types of basic request types.
2005
+ * For example, an INIT_SEGMENT is a sub-type of SEGMENT.
2006
+ * This is meant to allow for more specificity to be added to the request type
2007
+ * data, without breaking backwards compatibility.
2008
+ * @enum {number}
2009
+ */
2010
+ shaka.net.NetworkingEngine.AdvancedRequestType = {
2011
+ 'INIT_SEGMENT': 0,
2012
+ 'MEDIA_SEGMENT': 1,
2013
+ 'MEDIA_PLAYLIST': 2,
2014
+ 'MASTER_PLAYLIST': 3,
2015
+ 'MPD': 4,
2016
+ 'MSS': 5
2017
+ };
2018
+ /**
2019
+ * Priority level for network scheme plugins.
2020
+ * If multiple plugins are provided for the same scheme, only the
2021
+ * highest-priority one is used.
2022
+ * @enum {number}
2023
+ */
2024
+ shaka.net.NetworkingEngine.PluginPriority = {
2025
+ 'FALLBACK': 1,
2026
+ 'PREFERRED': 2,
2027
+ 'APPLICATION': 3
2028
+ };
2029
+ /**
2030
+ * @typedef {function(
2031
+ * !Object.<string, string>,
2032
+ * !shaka.extern.Request,
2033
+ * !shaka.net.NetworkingEngine.RequestType)}
2034
+ * @description
2035
+ * A callback function that passes the shaka.extern.HeadersReceived along to
2036
+ * the player, plus some extra data.
2037
+ */
2038
+ shaka.net.NetworkingEngine.OnHeadersReceived;
2039
+ /**
2040
+ * @typedef {function(
2041
+ * number,
2042
+ * number,
2043
+ * boolean,
2044
+ * shaka.extern.Request=)}
2045
+ * @description
2046
+ * A callback that is passed the duration, in milliseconds,
2047
+ * that the request took, the number of bytes transferred, a boolean
2048
+ * representing whether the switching is allowed and a ref to the
2049
+ * original request.
2050
+ */
2051
+ shaka.net.NetworkingEngine.onProgressUpdated;
2052
+ /**
2053
+ * @typedef {function(
2054
+ * !shaka.extern.Request,
2055
+ * ?shaka.util.Error,
2056
+ * number,
2057
+ * boolean)}
2058
+ * @description
2059
+ * A callback function that notifies the player when a download fails, for any
2060
+ * reason (e.g. even if the download was aborted).
2061
+ */
2062
+ shaka.net.NetworkingEngine.OnDownloadFailed;
2063
+ /**
2064
+ * @typedef {function(
2065
+ * !shaka.net.NetworkingEngine.RequestType,
2066
+ * !shaka.extern.Request,
2067
+ * (shaka.extern.RequestContext|undefined))}
2068
+ * @description
2069
+ * A callback function called on every request
2070
+ */
2071
+ shaka.net.NetworkingEngine.OnRequest;
2072
+ /**
2073
+ * @typedef {function(
2074
+ * !shaka.net.NetworkingEngine.RequestType,
2075
+ * (shaka.extern.RequestContext|undefined),
2076
+ * string,
2077
+ * string)}
2078
+ * @description
2079
+ * A callback function called on every request retry. The first string is the
2080
+ * new URI and the second string is the old URI.
2081
+ */
2082
+ shaka.net.NetworkingEngine.OnRetry;
2083
+ /**
2084
+ * @typedef {function(
2085
+ * !shaka.net.NetworkingEngine.RequestType,
2086
+ * !shaka.extern.Response,
2087
+ * (shaka.extern.RequestContext|undefined))}
2088
+ * @description
2089
+ * A callback function called on every request
2090
+ */
2091
+ shaka.net.NetworkingEngine.OnResponse;
2092
+ /**
2093
+ * Creates an InitSegmentReference, which provides the location to an
2094
+ * initialization segment.
2095
+ */
2096
+ shaka.media.InitSegmentReference = class {
2097
+ /**
2098
+ * @param {function():!Array.<string>} uris A function that creates the URIs
2099
+ * of the resource containing the segment.
2100
+ * @param {number} startByte The offset from the start of the resource to the
2101
+ * start of the segment.
2102
+ * @param {?number} endByte The offset from the start of the resource
2103
+ * to the end of the segment, inclusive. A value of null indicates that the
2104
+ * segment extends to the end of the resource.
2105
+ * @param {null|shaka.extern.MediaQualityInfo=} mediaQuality Information about
2106
+ * the quality of the media associated with this init segment.
2107
+ * @param {(null|number)=} timescale
2108
+ * @param {(null|BufferSource)=} segmentData
2109
+ * @param {?shaka.extern.aesKey=} aesKey
2110
+ * The segment's AES-128-CBC full segment encryption key and iv.
2111
+ */
2112
+ constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData, aesKey) {}
2113
+ /**
2114
+ * Returns the offset from the start of the resource to the
2115
+ * start of the segment.
2116
+ * @return {number}
2117
+ */
2118
+ getStartByte() {}
2119
+ /**
2120
+ * Returns the offset from the start of the resource to the end of the
2121
+ * segment, inclusive. A value of null indicates that the segment extends
2122
+ * to the end of the resource.
2123
+ * @return {?number}
2124
+ */
2125
+ getEndByte() {}
2126
+ };
2127
+ /**
2128
+ * SegmentReference provides the start time, end time, and location to a media
2129
+ * segment.
2130
+ */
2131
+ shaka.media.SegmentReference = class {
2132
+ /**
2133
+ * @param {number} startTime The segment's start time in seconds.
2134
+ * @param {number} endTime The segment's end time in seconds. The segment
2135
+ * ends the instant before this time, so |endTime| must be strictly greater
2136
+ * than |startTime|.
2137
+ * @param {function():!Array.<string>} uris
2138
+ * A function that creates the URIs of the resource containing the segment.
2139
+ * @param {number} startByte The offset from the start of the resource to the
2140
+ * start of the segment.
2141
+ * @param {?number} endByte The offset from the start of the resource to the
2142
+ * end of the segment, inclusive. A value of null indicates that the
2143
+ * segment extends to the end of the resource.
2144
+ * @param {shaka.media.InitSegmentReference} initSegmentReference
2145
+ * The segment's initialization segment metadata, or null if the segments
2146
+ * are self-initializing.
2147
+ * @param {number} timestampOffset
2148
+ * The amount of time, in seconds, that must be added to the segment's
2149
+ * internal timestamps to align it to the presentation timeline.
2150
+ * <br>
2151
+ * For DASH, this value should equal the Period start time minus the first
2152
+ * presentation timestamp of the first frame/sample in the Period. For
2153
+ * example, for MP4 based streams, this value should equal Period start
2154
+ * minus the first segment's tfdt box's 'baseMediaDecodeTime' field (after
2155
+ * it has been converted to seconds).
2156
+ * <br>
2157
+ * For HLS, this value should be the start time of the most recent
2158
+ * discontinuity, or 0 if there is no preceding discontinuity. Only used
2159
+ * in segments mode.
2160
+ * @param {number} appendWindowStart
2161
+ * The start of the append window for this reference, relative to the
2162
+ * presentation. Any content from before this time will be removed by
2163
+ * MediaSource.
2164
+ * @param {number} appendWindowEnd
2165
+ * The end of the append window for this reference, relative to the
2166
+ * presentation. Any content from after this time will be removed by
2167
+ * MediaSource.
2168
+ * @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
2169
+ * A list of SegmentReferences for the partial segments.
2170
+ * @param {?string=} tilesLayout
2171
+ * The value is a grid-item-dimension consisting of two positive decimal
2172
+ * integers in the format: column-x-row ('4x3'). It describes the
2173
+ * arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
2174
+ * @param {?number=} tileDuration
2175
+ * The explicit duration of an individual tile within the tiles grid.
2176
+ * If not provided, the duration should be automatically calculated based on
2177
+ * the duration of the reference.
2178
+ * @param {?number=} syncTime
2179
+ * A time value, expressed in seconds since 1970, which is used to
2180
+ * synchronize between streams. Both produced and consumed by the HLS
2181
+ * parser. Other components should not need this value.
2182
+ * @param {shaka.media.SegmentReference.Status=} status
2183
+ * The segment status is used to indicate that a segment does not exist or is
2184
+ * not available.
2185
+ * @param {?shaka.extern.aesKey=} aesKey
2186
+ * The segment's AES-128-CBC full segment encryption key and iv.
2187
+ * @param {boolean=} allPartialSegments
2188
+ * Indicate if the segment has all partial segments
2189
+ */
2190
+ constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, aesKey, allPartialSegments) {}
2191
+ /**
2192
+ * Creates and returns the URIs of the resource containing the segment.
2193
+ * @return {!Array.<string>}
2194
+ */
2195
+ getUris() {}
2196
+ /**
2197
+ * Returns the segment's start time in seconds.
2198
+ * @return {number}
2199
+ */
2200
+ getStartTime() {}
2201
+ /**
2202
+ * Returns the segment's end time in seconds.
2203
+ * @return {number}
2204
+ */
2205
+ getEndTime() {}
2206
+ /**
2207
+ * Returns the offset from the start of the resource to the
2208
+ * start of the segment.
2209
+ * @return {number}
2210
+ */
2211
+ getStartByte() {}
2212
+ /**
2213
+ * Returns the offset from the start of the resource to the end of the
2214
+ * segment, inclusive. A value of null indicates that the segment extends to
2215
+ * the end of the resource.
2216
+ * @return {?number}
2217
+ */
2218
+ getEndByte() {}
2219
+ /**
2220
+ * Returns the segment's tiles layout. Only defined in image segments.
2221
+ * @return {?string}
2222
+ */
2223
+ getTilesLayout() {}
2224
+ /**
2225
+ * Returns the segment's explicit tile duration.
2226
+ * Only defined in image segments.
2227
+ * @return {?number}
2228
+ */
2229
+ getTileDuration() {}
2230
+ /**
2231
+ * Returns the segment's status.
2232
+ * @return {shaka.media.SegmentReference.Status}
2233
+ */
2234
+ getStatus() {}
2235
+ /**
2236
+ * Mark the reference as unavailable.
2237
+ */
2238
+ markAsUnavailable() {}
2239
+ /**
2240
+ * Mark the reference as preload.
2241
+ */
2242
+ markAsPreload() {}
2243
+ /**
2244
+ * Returns true if the segment is preloaded.
2245
+ * @return {boolean}
2246
+ */
2247
+ isPreload() {}
2248
+ /**
2249
+ * Mark the reference as non-independent.
2250
+ */
2251
+ markAsNonIndependent() {}
2252
+ /**
2253
+ * Returns true if the segment is independent.
2254
+ * @return {boolean}
2255
+ */
2256
+ isIndependent() {}
2257
+ /**
2258
+ * Mark the reference as partial.
2259
+ */
2260
+ markAsPartial() {}
2261
+ /**
2262
+ * Returns true if the segment is partial.
2263
+ * @return {boolean}
2264
+ */
2265
+ isPartial() {}
2266
+ /**
2267
+ * Mark the reference as being the last part of the full segment
2268
+ */
2269
+ markAsLastPartial() {}
2270
+ /**
2271
+ * Returns true if reference as being the last part of the full segment.
2272
+ * @return {boolean}
2273
+ */
2274
+ isLastPartial() {}
2275
+ /**
2276
+ * Mark the reference as byterange optimization.
2277
+ * The "byterange optimization" means that it is playable using MP4 low
2278
+ * latency streaming with chunked data.
2279
+ */
2280
+ markAsByterangeOptimization() {}
2281
+ /**
2282
+ * Returns true if the segment has a byterange optimization.
2283
+ * @return {boolean}
2284
+ */
2285
+ hasByterangeOptimization() {}
2286
+ /**
2287
+ * Set the segment's thumbnail sprite.
2288
+ * @param {shaka.media.SegmentReference.ThumbnailSprite} thumbnailSprite
2289
+ */
2290
+ setThumbnailSprite(thumbnailSprite) {}
2291
+ /**
2292
+ * Returns the segment's thumbnail sprite.
2293
+ * @return {?shaka.media.SegmentReference.ThumbnailSprite}
2294
+ */
2295
+ getThumbnailSprite() {}
2296
+ /**
2297
+ * Offset the segment reference by a fixed amount.
2298
+ * @param {number} offset The amount to add to the segment's start and end
2299
+ * times.
2300
+ */
2301
+ offset(offset) {}
2302
+ /**
2303
+ * Sync this segment against a particular sync time that will serve as "0" in
2304
+ * the presentation timeline.
2305
+ * @param {number} lowestSyncTime
2306
+ */
2307
+ syncAgainst(lowestSyncTime) {}
2308
+ /**
2309
+ * Set the segment data.
2310
+ * @param {!BufferSource} segmentData
2311
+ */
2312
+ setSegmentData(segmentData) {}
2313
+ /**
2314
+ * Return the segment data.
2315
+ * @return {?BufferSource}
2316
+ */
2317
+ getSegmentData() {}
2318
+ };
2319
+ /**
2320
+ * Rather than using booleans to communicate what the state of the reference,
2321
+ * we have this enum.
2322
+ * @enum {number}
2323
+ */
2324
+ shaka.media.SegmentReference.Status = {
2325
+ AVAILABLE: 0,
2326
+ UNAVAILABLE: 1,
2327
+ MISSING: 2
2328
+ };
2329
+ /**
2330
+ * @typedef {{
2331
+ * height: number,
2332
+ * positionX: number,
2333
+ * positionY: number,
2334
+ * width: number
2335
+ * }}
2336
+ * @property {number} height
2337
+ * The thumbnail height in px.
2338
+ * @property {number} positionX
2339
+ * The thumbnail left position in px.
2340
+ * @property {number} positionY
2341
+ * The thumbnail top position in px.
2342
+ * @property {number} width
2343
+ * The thumbnail width in px.
2344
+ */
2345
+ shaka.media.SegmentReference.ThumbnailSprite;
2346
+ /**
2347
+ * SegmentIndex.
2348
+ * @implements {shaka.extern.SegmentIndex}
2349
+ * @implements {shaka.util.IReleasable}
2350
+ * @implements {Iterable.<!shaka.media.SegmentReference>}
2351
+ */
2352
+ shaka.media.SegmentIndex = class {
2353
+ /**
2354
+ * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2355
+ * SegmentReferences, which must be sorted first by their start times
2356
+ * (ascending) and second by their end times (ascending).
2357
+ */
2358
+ constructor(references) {}
2359
+ /**
2360
+ * @override
2361
+ */
2362
+ getNumReferences() {}
2363
+ /**
2364
+ * @override
2365
+ */
2366
+ getNumEvicted() {}
2367
+ /**
2368
+ * @override
2369
+ */
2370
+ release() {}
2371
+ /**
2372
+ * Marks the index as immutable. Segments cannot be added or removed after
2373
+ * this point. This doesn't affect the references themselves. This also
2374
+ * makes the destroy/release methods do nothing.
2375
+ * This is mainly for testing.
2376
+ */
2377
+ markImmutable() {}
2378
+ /**
2379
+ * @override
2380
+ */
2381
+ find(time) {}
2382
+ /**
2383
+ * @override
2384
+ */
2385
+ get(position) {}
2386
+ /**
2387
+ * Offset all segment references by a fixed amount.
2388
+ * @param {number} offset The amount to add to each segment's start and end
2389
+ * times.
2390
+ */
2391
+ offset(offset) {}
2392
+ /**
2393
+ * Merges the given SegmentReferences and evicts the ones that end before the
2394
+ * given time. Supports extending the original references only.
2395
+ * Will not replace old references or interleave new ones.
2396
+ * Used, for example, by the DASH and HLS parser, where manifests may not list
2397
+ * all available references, so we must keep available references in memory to
2398
+ * fill the availability window.
2399
+ * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2400
+ * SegmentReferences, which must be sorted first by their start times
2401
+ * (ascending) and second by their end times (ascending).
2402
+ * @param {number} windowStart The start of the availability window to filter
2403
+ * out the references that are no longer available.
2404
+ */
2405
+ mergeAndEvict(references, windowStart) {}
2406
+ /**
2407
+ * Removes all SegmentReferences that end before the given time.
2408
+ * @param {number} time The time in seconds.
2409
+ */
2410
+ evict(time) {}
2411
+ /**
2412
+ * Drops references that start after windowEnd, or end before windowStart,
2413
+ * and contracts the last reference so that it ends at windowEnd.
2414
+ * Do not call on the last period of a live presentation (unknown duration).
2415
+ * It is okay to call on the other periods of a live presentation, where the
2416
+ * duration is known and another period has been added.
2417
+ * @param {number} windowStart
2418
+ * @param {?number} windowEnd
2419
+ * @param {boolean=} isNew Whether this is a new SegmentIndex and we shouldn't
2420
+ * update the number of evicted elements.
2421
+ */
2422
+ fit(windowStart, windowEnd, isNew) {}
2423
+ /**
2424
+ * Updates the references every so often. Stops when the references list
2425
+ * returned by the callback is null.
2426
+ * @param {number} interval The interval in seconds.
2427
+ * @param {function():Array.<shaka.media.SegmentReference>} updateCallback
2428
+ */
2429
+ updateEvery(interval, updateCallback) {}
2430
+ /**
2431
+ * Returns a new iterator that initially points to the segment that contains
2432
+ * the given time, or the nearest independent segment before it.
2433
+ * Like the normal iterator, next() must be called first to get to the first
2434
+ * element. Returns null if we do not find a segment at the
2435
+ * requested time.
2436
+ * The first segment returned by the iterator _MUST_ be an independent
2437
+ * segment. Assumes that only partial references can be dependent, based on
2438
+ * RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
2439
+ * Playlist will contain at least one independent frame."
2440
+ * @param {number} time
2441
+ * @param {boolean=} allowNonIndepedent
2442
+ * @param {boolean=} reverse
2443
+ * @return {?shaka.media.SegmentIterator}
2444
+ */
2445
+ getIteratorForTime(time, allowNonIndepedent, reverse) {}
2446
+ /**
2447
+ * Create a SegmentIndex for a single segment of the given start time and
2448
+ * duration at the given URIs.
2449
+ * @param {number} startTime
2450
+ * @param {number} duration
2451
+ * @param {!Array.<string>} uris
2452
+ * @return {!shaka.media.SegmentIndex}
2453
+ */
2454
+ static forSingleSegment(startTime, duration, uris) {}
2455
+ };
2456
+ /**
2457
+ * An iterator over a SegmentIndex's references.
2458
+ * @implements {Iterator.<shaka.media.SegmentReference>}
2459
+ */
2460
+ shaka.media.SegmentIterator = class {
2461
+ /**
2462
+ * @param {shaka.media.SegmentIndex} segmentIndex
2463
+ * @param {number} index
2464
+ * @param {number} partialSegmentIndex
2465
+ * @param {boolean} reverse
2466
+ */
2467
+ constructor(segmentIndex, index, partialSegmentIndex, reverse) {}
2468
+ /**
2469
+ * @param {boolean} reverse
2470
+ */
2471
+ setReverse(reverse) {}
2472
+ /**
2473
+ * @return {number}
2474
+ */
2475
+ currentPosition() {}
2476
+ /**
2477
+ * @return {shaka.media.SegmentReference}
2478
+ */
2479
+ current() {}
2480
+ /**
2481
+ * @override
2482
+ */
2483
+ next() {}
2484
+ /**
2485
+ */
2486
+ resetToLastIndependent() {}
2487
+ };
2488
+ /**
2489
+ * A meta-SegmentIndex composed of multiple other SegmentIndexes.
2490
+ * Used in constructing multi-Period Streams for DASH.
2491
+ * @extends shaka.media.SegmentIndex
2492
+ * @implements {shaka.util.IReleasable}
2493
+ * @implements {Iterable.<!shaka.media.SegmentReference>}
2494
+ */
2495
+ shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
2496
+ /** */
2497
+ constructor() {}
2498
+ /**
2499
+ * @override
2500
+ */
2501
+ release() {}
2502
+ /**
2503
+ * @override
2504
+ */
2505
+ forEachTopLevelReference(fn) {}
2506
+ /**
2507
+ * @override
2508
+ */
2509
+ find(time) {}
2510
+ /**
2511
+ * @override
2512
+ */
2513
+ get(position) {}
2514
+ /**
2515
+ * @override
2516
+ */
2517
+ offset(offset) {}
2518
+ /**
2519
+ * @override
2520
+ */
2521
+ merge(references) {}
2522
+ /**
2523
+ * @override
2524
+ */
2525
+ evict(time) {}
2526
+ /**
2527
+ * @override
2528
+ */
2529
+ mergeAndEvict(references, windowStart) {}
2530
+ /**
2531
+ * @override
2532
+ */
2533
+ fit(windowStart, windowEnd) {}
2534
+ /**
2535
+ * @override
2536
+ */
2537
+ updateEvery(interval, updateCallback) {}
2538
+ };
2539
+ /**
2540
+ * @summary An interface to register manifest parsers.
2541
+ */
2542
+ shaka.media.ManifestParser = class {
2543
+ /**
2544
+ * Registers a manifest parser by file extension.
2545
+ * @param {string} extension The file extension of the manifest.
2546
+ * @param {shaka.extern.ManifestParser.Factory} parserFactory The factory
2547
+ * used to create parser instances.
2548
+ */
2549
+ static registerParserByExtension(extension, parserFactory) {}
2550
+ /**
2551
+ * Registers a manifest parser by MIME type.
2552
+ * @param {string} mimeType The MIME type of the manifest.
2553
+ * @param {shaka.extern.ManifestParser.Factory} parserFactory The factory
2554
+ * used to create parser instances.
2555
+ */
2556
+ static registerParserByMime(mimeType, parserFactory) {}
2557
+ /**
2558
+ * Unregisters a manifest parser by MIME type.
2559
+ * @param {string} mimeType The MIME type of the manifest.
2560
+ */
2561
+ static unregisterParserByMime(mimeType) {}
2562
+ };
2563
+ /**
2564
+ * @enum {string}
2565
+ */
2566
+ shaka.media.ManifestParser.AccessibilityPurpose = {
2567
+ VISUALLY_IMPAIRED: 'visually impaired',
2568
+ HARD_OF_HEARING: 'hard of hearing'
2569
+ };
2570
+ /**
2571
+ * PresentationTimeline.
2572
+ */
2573
+ shaka.media.PresentationTimeline = class {
2574
+ /**
2575
+ * @param {?number} presentationStartTime The wall-clock time, in seconds,
2576
+ * when the presentation started or will start. Only required for live.
2577
+ * @param {number} presentationDelay The delay to give the presentation, in
2578
+ * seconds. Only required for live.
2579
+ * @param {boolean=} autoCorrectDrift Whether to account for drift when
2580
+ * determining the availability window.
2581
+ * @see {shaka.extern.Manifest}
2582
+ * @see {@tutorial architecture}
2583
+ */
2584
+ constructor(presentationStartTime, presentationDelay, autoCorrectDrift) {}
2585
+ /**
2586
+ * @return {number} The presentation's duration in seconds.
2587
+ * Infinity indicates that the presentation continues indefinitely.
2588
+ */
2589
+ getDuration() {}
2590
+ /**
2591
+ * @return {number} The presentation's max segment duration in seconds.
2592
+ */
2593
+ getMaxSegmentDuration() {}
2594
+ /**
2595
+ * Sets the presentation's start time.
2596
+ * @param {number} presentationStartTime The wall-clock time, in seconds,
2597
+ * when the presentation started or will start. Only required for live.
2598
+ */
2599
+ setPresentationStartTime(presentationStartTime) {}
2600
+ /**
2601
+ * Sets the presentation's duration.
2602
+ * @param {number} duration The presentation's duration in seconds.
2603
+ * Infinity indicates that the presentation continues indefinitely.
2604
+ */
2605
+ setDuration(duration) {}
2606
+ /**
2607
+ * @return {?number} The presentation's start time in seconds.
2608
+ */
2609
+ getPresentationStartTime() {}
2610
+ /**
2611
+ * Sets the clock offset, which is the difference between the client's clock
2612
+ * and the server's clock, in milliseconds (i.e., serverTime = Date.now() +
2613
+ * clockOffset).
2614
+ * @param {number} offset The clock offset, in ms.
2615
+ */
2616
+ setClockOffset(offset) {}
2617
+ /**
2618
+ * Sets the presentation's static flag.
2619
+ * @param {boolean} isStatic If true, the presentation is static, meaning all
2620
+ * segments are available at once.
2621
+ */
2622
+ setStatic(isStatic) {}
2623
+ /**
2624
+ * Sets the presentation's segment availability duration. The segment
2625
+ * availability duration should only be set for live.
2626
+ * @param {number} segmentAvailabilityDuration The presentation's new segment
2627
+ * availability duration in seconds.
2628
+ */
2629
+ setSegmentAvailabilityDuration(segmentAvailabilityDuration) {}
2630
+ /**
2631
+ * Gets the presentation's segment availability duration.
2632
+ * @return {number}
2633
+ */
2634
+ getSegmentAvailabilityDuration() {}
2635
+ /**
2636
+ * Sets the presentation delay in seconds.
2637
+ * @param {number} delay
2638
+ */
2639
+ setDelay(delay) {}
2640
+ /**
2641
+ * Gets the presentation delay in seconds.
2642
+ * @return {number}
2643
+ */
2644
+ getDelay() {}
2645
+ /**
2646
+ * Gives PresentationTimeline a Stream's timeline so it can size and position
2647
+ * the segment availability window, and account for missing segment
2648
+ * information.
2649
+ * @param {!Array.<shaka.media.PresentationTimeline.TimeRange>} timeline
2650
+ * @param {number} startOffset
2651
+ */
2652
+ notifyTimeRange(timeline, startOffset) {}
2653
+ /**
2654
+ * Gives PresentationTimeline an array of segments so it can size and position
2655
+ * the segment availability window, and account for missing segment
2656
+ * information. These segments do not necessarily need to all be from the
2657
+ * same stream.
2658
+ * @param {!Array.<!shaka.media.SegmentReference>} references
2659
+ */
2660
+ notifySegments(references) {}
2661
+ /**
2662
+ * Lock the presentation timeline's start time. After this is called, no
2663
+ * further adjustments to presentationStartTime_ will be permitted.
2664
+ * This should be called after all Periods have been parsed, and all calls to
2665
+ * notifySegments() from the initial manifest parse have been made.
2666
+ * Without this, we can get assertion failures in SegmentIndex for certain
2667
+ * DAI content. If DAI adds ad segments to the manifest faster than
2668
+ * real-time, adjustments to presentationStartTime_ can cause availability
2669
+ * windows to jump around on updates.
2670
+ */
2671
+ lockStartTime() {}
2672
+ /**
2673
+ * Returns if the presentation timeline's start time is locked.
2674
+ * @return {boolean}
2675
+ */
2676
+ isStartTimeLocked() {}
2677
+ /**
2678
+ * Sets the initial program date time.
2679
+ * @param {number} initialProgramDateTime
2680
+ */
2681
+ setInitialProgramDateTime(initialProgramDateTime) {}
2682
+ /**
2683
+ * @return {?number} The initial program date time in seconds.
2684
+ */
2685
+ getInitialProgramDateTime() {}
2686
+ /**
2687
+ * Gives PresentationTimeline a Stream's minimum segment start time.
2688
+ * @param {number} startTime
2689
+ */
2690
+ notifyMinSegmentStartTime(startTime) {}
2691
+ /**
2692
+ * Gives PresentationTimeline a Stream's maximum segment duration so it can
2693
+ * size and position the segment availability window. This function should be
2694
+ * called once for each Stream (no more, no less), but does not have to be
2695
+ * called if notifySegments() is called instead for a particular stream.
2696
+ * @param {number} maxSegmentDuration The maximum segment duration for a
2697
+ * particular stream.
2698
+ */
2699
+ notifyMaxSegmentDuration(maxSegmentDuration) {}
2700
+ /**
2701
+ * Offsets the segment times by the given amount.
2702
+ * @param {number} offset The number of seconds to offset by. A positive
2703
+ * number adjusts the segment times forward.
2704
+ */
2705
+ offset(offset) {}
2706
+ /**
2707
+ * @return {boolean} True if the presentation is live; otherwise, return
2708
+ * false.
2709
+ */
2710
+ isLive() {}
2711
+ /**
2712
+ * @return {boolean} True if the presentation is in progress (meaning not
2713
+ * live, but also not completely available); otherwise, return false.
2714
+ */
2715
+ isInProgress() {}
2716
+ /**
2717
+ * Gets the presentation's current segment availability start time. Segments
2718
+ * ending at or before this time should be assumed to be unavailable.
2719
+ * @return {number} The current segment availability start time, in seconds,
2720
+ * relative to the start of the presentation.
2721
+ */
2722
+ getSegmentAvailabilityStart() {}
2723
+ /**
2724
+ * Sets the start time of the user-defined seek range. This is only used for
2725
+ * VOD content.
2726
+ * @param {number} time
2727
+ */
2728
+ setUserSeekStart(time) {}
2729
+ /**
2730
+ * Gets the presentation's current segment availability end time. Segments
2731
+ * starting after this time should be assumed to be unavailable.
2732
+ * @return {number} The current segment availability end time, in seconds,
2733
+ * relative to the start of the presentation. For VOD, the availability
2734
+ * end time is the content's duration. If the Player's playRangeEnd
2735
+ * configuration is used, this can override the duration.
2736
+ */
2737
+ getSegmentAvailabilityEnd() {}
2738
+ /**
2739
+ * Gets the seek range start time, offset by the given amount. This is used
2740
+ * to ensure that we don't "fall" back out of the seek window while we are
2741
+ * buffering.
2742
+ * @param {number} offset The offset to add to the start time for live
2743
+ * streams.
2744
+ * @return {number} The current seek start time, in seconds, relative to the
2745
+ * start of the presentation.
2746
+ */
2747
+ getSafeSeekRangeStart(offset) {}
2748
+ /**
2749
+ * Gets the seek range start time.
2750
+ * @return {number}
2751
+ */
2752
+ getSeekRangeStart() {}
2753
+ /**
2754
+ * Gets the seek range end.
2755
+ * @return {number}
2756
+ */
2757
+ getSeekRangeEnd() {}
2758
+ /**
2759
+ * True if the presentation start time is being used to calculate the live
2760
+ * edge.
2761
+ * Using the presentation start time means that the stream may be subject to
2762
+ * encoder drift. At runtime, we will avoid using the presentation start time
2763
+ * whenever possible.
2764
+ * @return {boolean}
2765
+ */
2766
+ usingPresentationStartTime() {}
2767
+ /**
2768
+ * Sets the presentation's segment availability time offset. This should be
2769
+ * only set for Low Latency Dash.
2770
+ * The segments are available earlier for download than the availability start
2771
+ * time, so we can move closer to the live edge.
2772
+ * @param {number} offset
2773
+ */
2774
+ setAvailabilityTimeOffset(offset) {}
2775
+ };
2776
+ /**
2777
+ * @typedef {{
2778
+ * start: number,
2779
+ * unscaledStart: number,
2780
+ * end: number,
2781
+ * partialSegments: number,
2782
+ * segmentPosition: number
2783
+ * }}
2784
+ * @description
2785
+ * Defines a time range of a media segment. Times are in seconds.
2786
+ * @property {number} start
2787
+ * The start time of the range.
2788
+ * @property {number} unscaledStart
2789
+ * The start time of the range in representation timescale units.
2790
+ * @property {number} end
2791
+ * The end time (exclusive) of the range.
2792
+ * @property {number} partialSegments
2793
+ * The number of partial segments
2794
+ * @property {number} segmentPosition
2795
+ * The segment position of the timeline entry as it appears in the manifest
2796
+ */
2797
+ shaka.media.PresentationTimeline.TimeRange;
2798
+ /**
2799
+ * A utility to combine streams across periods.
2800
+ * @implements {shaka.util.IReleasable}
2801
+ * @final
2802
+ */
2803
+ shaka.util.PeriodCombiner = class {
2804
+ /** */
2805
+ constructor() {}
2806
+ /**
2807
+ * @return {!Array.<shaka.extern.Variant>}
2808
+ */
2809
+ getVariants() {}
2810
+ /**
2811
+ * @return {!Array.<shaka.extern.Stream>}
2812
+ */
2813
+ getTextStreams() {}
2814
+ /**
2815
+ * @return {!Array.<shaka.extern.Stream>}
2816
+ */
2817
+ getImageStreams() {}
2818
+ /**
2819
+ * Deletes a stream from matchedStreams because it is no longer needed
2820
+ * @param {?shaka.extern.Stream} stream
2821
+ * @param {string} periodId
2822
+ */
2823
+ deleteStream(stream, periodId) {}
2824
+ /**
2825
+ * @param {!Array.<shaka.extern.Period>} periods
2826
+ * @param {boolean} isDynamic
2827
+ * @param {boolean=} isPatchUpdate
2828
+ * @return {!Promise}
2829
+ */
2830
+ combinePeriods(periods, isDynamic, isPatchUpdate) {}
2831
+ /**
2832
+ * @param {boolean} allowed If set to true, multi-mimeType or multi-codec
2833
+ * variants will be allowed.
2834
+ */
2835
+ setAllowMultiTypeVariants(allowed) {}
2836
+ /**
2837
+ * @param {boolean} useOnce if true, stream will be used only once in period
2838
+ * flattening algoritnm.
2839
+ */
2840
+ setUseStreamOnce(useOnce) {}
2841
+ };
2842
+ /** */
2843
+ shaka.util.ConfigUtils = class {
2844
+ /**
2845
+ * @param {!Object} destination
2846
+ * @param {!Object} source
2847
+ * @param {!Object} template supplies default values
2848
+ * @param {!Object} overrides
2849
+ * Supplies override type checking. When the current path matches
2850
+ * the key in this object, each sub-value must match the type in this
2851
+ * object. If this contains an Object, it is used as the template.
2852
+ * @param {string} path to this part of the config
2853
+ * @return {boolean}
2854
+ */
2855
+ static mergeConfigObjects(destination, source, template, overrides, path) {}
2856
+ /**
2857
+ * Convert config from ('fieldName', value) format to a partial config object.
2858
+ * E. g. from ('manifest.retryParameters.maxAttempts', 1) to
2859
+ * { manifest: { retryParameters: { maxAttempts: 1 }}}.
2860
+ * @param {string} fieldName
2861
+ * @param {*} value
2862
+ * @return {!Object}
2863
+ */
2864
+ static convertToConfigObject(fieldName, value) {}
2865
+ /**
2866
+ * @param {!Object} object
2867
+ * @param {!Object} base
2868
+ * @return {!Object}
2869
+ */
2870
+ static getDifferenceFromConfigObjects(object, base) {}
2871
+ };
2872
+ /**
2873
+ * @summary A set of FairPlay utility functions.
2874
+ */
2875
+ shaka.util.FairPlayUtils = class {
2876
+ /**
2877
+ * Check if FairPlay is supported.
2878
+ * @return {!Promise.<boolean>}
2879
+ */
2880
+ static isFairPlaySupported() {}
2881
+ /**
2882
+ * Using the default method, extract a content ID from the init data. This is
2883
+ * based on the FairPlay example documentation.
2884
+ * @param {!BufferSource} initData
2885
+ * @return {string}
2886
+ */
2887
+ static defaultGetContentId(initData) {}
2888
+ /**
2889
+ * Transforms the init data buffer using the given data. The format is:
2890
+ * <pre>
2891
+ * [4 bytes] initDataSize
2892
+ * [initDataSize bytes] initData
2893
+ * [4 bytes] contentIdSize
2894
+ * [contentIdSize bytes] contentId
2895
+ * [4 bytes] certSize
2896
+ * [certSize bytes] cert
2897
+ * </pre>
2898
+ * @param {!BufferSource} initData
2899
+ * @param {!BufferSource|string} contentId
2900
+ * @param {?BufferSource} cert The server certificate; this will throw if not
2901
+ * provided.
2902
+ * @return {!Uint8Array}
2903
+ */
2904
+ static initDataTransform(initData, contentId, cert) {}
2905
+ /**
2906
+ * Verimatrix initDataTransform configuration.
2907
+ * @param {!Uint8Array} initData
2908
+ * @param {string} initDataType
2909
+ * @param {?shaka.extern.DrmInfo} drmInfo
2910
+ */
2911
+ static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
2912
+ /**
2913
+ * EZDRM initDataTransform configuration.
2914
+ * @param {!Uint8Array} initData
2915
+ * @param {string} initDataType
2916
+ * @param {?shaka.extern.DrmInfo} drmInfo
2917
+ */
2918
+ static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
2919
+ /**
2920
+ * Conax initDataTransform configuration.
2921
+ * @param {!Uint8Array} initData
2922
+ * @param {string} initDataType
2923
+ * @param {?shaka.extern.DrmInfo} drmInfo
2924
+ */
2925
+ static conaxInitDataTransform(initData, initDataType, drmInfo) {}
2926
+ /**
2927
+ * ExpressPlay initDataTransform configuration.
2928
+ * @param {!Uint8Array} initData
2929
+ * @param {string} initDataType
2930
+ * @param {?shaka.extern.DrmInfo} drmInfo
2931
+ */
2932
+ static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
2933
+ /**
2934
+ * Verimatrix FairPlay request.
2935
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2936
+ * @param {shaka.extern.Request} request
2937
+ * @param {shaka.extern.RequestContext=} context
2938
+ */
2939
+ static verimatrixFairPlayRequest(type, request, context) {}
2940
+ /**
2941
+ * EZDRM FairPlay request.
2942
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2943
+ * @param {shaka.extern.Request} request
2944
+ * @param {shaka.extern.RequestContext=} context
2945
+ */
2946
+ static ezdrmFairPlayRequest(type, request, context) {}
2947
+ /**
2948
+ * Conax FairPlay request.
2949
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2950
+ * @param {shaka.extern.Request} request
2951
+ * @param {shaka.extern.RequestContext=} context
2952
+ */
2953
+ static conaxFairPlayRequest(type, request, context) {}
2954
+ /**
2955
+ * ExpressPlay FairPlay request.
2956
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2957
+ * @param {shaka.extern.Request} request
2958
+ * @param {shaka.extern.RequestContext=} context
2959
+ */
2960
+ static expressplayFairPlayRequest(type, request, context) {}
2961
+ /**
2962
+ * Common FairPlay response transform for some DRMs providers.
2963
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2964
+ * @param {shaka.extern.Response} response
2965
+ * @param {shaka.extern.RequestContext=} context
2966
+ */
2967
+ static commonFairPlayResponse(type, response, context) {}
2968
+ };
2969
+ /**
2970
+ * @final
2971
+ */
2972
+ shaka.util.PlayerConfiguration = class {
2973
+ /**
2974
+ * @return {shaka.extern.PlayerConfiguration}
2975
+ */
2976
+ static createDefault() {}
2977
+ /**
2978
+ * Merges the given configuration changes into the given destination. This
2979
+ * uses the default Player configurations as the template.
2980
+ * @param {shaka.extern.PlayerConfiguration} destination
2981
+ * @param {!Object} updates
2982
+ * @param {shaka.extern.PlayerConfiguration=} template
2983
+ * @return {boolean}
2984
+ */
2985
+ static mergeConfigObjects(destination, updates, template) {}
2986
+ };
2987
+ /**
2988
+ * Creates a new DASH parser.
2989
+ * @implements {shaka.extern.ManifestParser}
2990
+ */
2991
+ shaka.dash.DashParser = class {
2992
+ /** Creates a new DASH parser. */
2993
+ constructor() {}
2994
+ /**
2995
+ * @override
2996
+ */
2997
+ configure(config) {}
2998
+ /**
2999
+ * @override
3000
+ */
3001
+ start(uri, playerInterface) {}
3002
+ /**
3003
+ * @override
3004
+ */
3005
+ stop() {}
3006
+ /**
3007
+ * @override
3008
+ */
3009
+ update() {}
3010
+ /**
3011
+ * @override
3012
+ */
3013
+ onExpirationUpdated(sessionId, expiration) {}
3014
+ /**
3015
+ * @override
3016
+ */
3017
+ onInitialVariantChosen(variant) {}
3018
+ /**
3019
+ * @override
3020
+ */
3021
+ banLocation(uri) {}
3022
+ };
3023
+ /**
3024
+ */
3025
+ shaka.dependencies = class {
3026
+ /**
3027
+ * Registers a new dependency.
3028
+ * @param {shaka.dependencies.Allowed} key which is used for retrieving a
3029
+ * dependency
3030
+ * @param {?} dep a dependency
3031
+ */
3032
+ static add(key, dep) {}
3033
+ /**
3034
+ * Check if we have a dependency for the key.
3035
+ * @param {shaka.dependencies.Allowed} key key
3036
+ * @return {boolean}
3037
+ */
3038
+ static has(key) {}
3039
+ };
3040
+ /**
3041
+ * @enum {string}
3042
+ */
3043
+ shaka.dependencies.Allowed = {
3044
+ muxjs: 'muxjs',
3045
+ ISOBoxer: 'ISOBoxer'
3046
+ };
3047
+ /**
3048
+ * @summary
3049
+ * lcevcDec - (MPEG-5 Part 2 LCEVC - Decoder) provides
3050
+ * all the operations related to the enhancement and rendering
3051
+ * of LCEVC enabled streams and on to a canvas.
3052
+ * @implements {shaka.util.IReleasable}
3053
+ */
3054
+ shaka.lcevc.Dec = class {
3055
+ /**
3056
+ * @param {HTMLVideoElement} media The video element that will be attached to
3057
+ * LCEVC Decoder for input.
3058
+ * @param {HTMLCanvasElement} canvas The canvas element that will be attached
3059
+ * to LCEVC Decoder to render the enhanced frames.
3060
+ * @param {shaka.extern.LcevcConfiguration} lcevcConfig LCEVC configuration
3061
+ * object to initialize the LCEVC Decoder.
3062
+ */
3063
+ constructor(media, canvas, lcevcConfig) {}
3064
+ /**
3065
+ * Close LCEVC Decoder.
3066
+ * @override
3067
+ */
3068
+ release() {}
3069
+ };
3070
+ /**
3071
+ * @typedef {function(
3072
+ * !(shaka.media.InitSegmentReference|shaka.media.SegmentReference),
3073
+ * shaka.extern.Stream,
3074
+ * ?function(BufferSource):!Promise=
3075
+ * ):!shaka.net.NetworkingEngine.PendingRequest}
3076
+ * @description
3077
+ * A callback function that fetches a segment.
3078
+ */
3079
+ shaka.media.SegmentPrefetch.FetchDispatcher;
3080
+ /**
3081
+ * @implements {shaka.util.IDestroyable}
3082
+ */
3083
+ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
3084
+ /**
3085
+ * @param {string} assetUri
3086
+ * @param {?string} mimeType
3087
+ * @param {number} startTimeOfLoad
3088
+ * @param {?number} startTime
3089
+ * @param {*} playerInterface
3090
+ */
3091
+ constructor(assetUri, mimeType, startTimeOfLoad, startTime, playerInterface) {}
3092
+ /**
3093
+ * Waits for the loading to be finished (or to fail with an error).
3094
+ * @return {!Promise}
3095
+ */
3096
+ waitForFinish() {}
3097
+ /**
3098
+ * Releases or stops all non-entrusted resources.
3099
+ * @override
3100
+ */
3101
+ destroy() {}
3102
+ };
3103
+ /**
3104
+ * @summary A networking plugin to handle http and https URIs via the Fetch API.
3105
+ */
3106
+ shaka.net.HttpFetchPlugin = class {
3107
+ /**
3108
+ * @param {string} uri
3109
+ * @param {shaka.extern.Request} request
3110
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
3111
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
3112
+ * progress event happened.
3113
+ * @param {shaka.extern.HeadersReceived} headersReceived Called when the
3114
+ * headers for the download are received, but before the body is.
3115
+ * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
3116
+ */
3117
+ static parse(uri, request, requestType, progressUpdated, headersReceived) {}
3118
+ /**
3119
+ * Determine if the Fetch API is supported in the browser. Note: this is
3120
+ * deliberately exposed as a method to allow the client app to use the same
3121
+ * logic as Shaka when determining support.
3122
+ * @return {boolean}
3123
+ */
3124
+ static isSupported() {}
3125
+ };
3126
+ /**
3127
+ * @summary A networking plugin to handle http and https URIs via XHR.
3128
+ */
3129
+ shaka.net.HttpXHRPlugin = class {
3130
+ /**
3131
+ * @param {string} uri
3132
+ * @param {shaka.extern.Request} request
3133
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
3134
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
3135
+ * progress event happened.
3136
+ * @param {shaka.extern.HeadersReceived} headersReceived Called when the
3137
+ * headers for the download are received, but before the body is.
3138
+ * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
3139
+ */
3140
+ static parse(uri, request, requestType, progressUpdated, headersReceived) {}
3141
+ };
3142
+ /**
3143
+ * A text displayer plugin using the browser's native VTTCue interface.
3144
+ * @implements {shaka.extern.TextDisplayer}
3145
+ */
3146
+ shaka.text.SimpleTextDisplayer = class {
3147
+ /**
3148
+ * @param {HTMLMediaElement} video
3149
+ * @param {string} label
3150
+ */
3151
+ constructor(video, label) {}
3152
+ /**
3153
+ * @override
3154
+ */
3155
+ configure(config) {}
3156
+ /**
3157
+ * @override
3158
+ */
3159
+ remove(start, end) {}
3160
+ /**
3161
+ * @override
3162
+ */
3163
+ append(cues) {}
3164
+ /**
3165
+ * @override
3166
+ */
3167
+ destroy() {}
3168
+ /**
3169
+ * @override
3170
+ */
3171
+ isTextVisible() {}
3172
+ /**
3173
+ * @override
3174
+ */
3175
+ setTextVisibility(on) {}
3176
+ };
3177
+ /**
3178
+ * A stub text displayer plugin that does nothing
3179
+ * @implements {shaka.extern.TextDisplayer}
3180
+ */
3181
+ shaka.text.StubTextDisplayer = class {
3182
+ /**
3183
+ * @override
3184
+ */
3185
+ configure(config) {}
3186
+ /**
3187
+ * @override
3188
+ */
3189
+ remove(start, end) {}
3190
+ /**
3191
+ * @override
3192
+ */
3193
+ append(cues) {}
3194
+ /**
3195
+ * @override
3196
+ */
3197
+ destroy() {}
3198
+ /**
3199
+ * @override
3200
+ */
3201
+ isTextVisible() {}
3202
+ /**
3203
+ * @override
3204
+ */
3205
+ setTextVisibility(on) {}
3206
+ };
3207
+ /** */
3208
+ shaka.util.Dom = class {
3209
+ /**
3210
+ * Remove all of the child nodes of an element.
3211
+ * @param {!Element} element
3212
+ */
3213
+ static removeAllChildren(element) {}
3214
+ };
3215
+ /**
3216
+ * The text displayer plugin for the Shaka Player UI. Can also be used directly
3217
+ * by providing an appropriate container element.
3218
+ * @implements {shaka.extern.TextDisplayer}
3219
+ * @final
3220
+ */
3221
+ shaka.text.UITextDisplayer = class {
3222
+ /**
3223
+ * Constructor.
3224
+ * @param {HTMLMediaElement} video
3225
+ * @param {HTMLElement} videoContainer
3226
+ */
3227
+ constructor(video, videoContainer) {}
3228
+ /**
3229
+ * @override
3230
+ */
3231
+ configure(config) {}
3232
+ /**
3233
+ * @override
3234
+ */
3235
+ append(cues) {}
3236
+ /**
3237
+ * @override
3238
+ */
3239
+ destroy() {}
3240
+ /**
3241
+ * @override
3242
+ */
3243
+ remove(start, end) {}
3244
+ /**
3245
+ * @override
3246
+ */
3247
+ isTextVisible() {}
3248
+ /**
3249
+ * @override
3250
+ */
3251
+ setTextVisibility(on) {}
3252
+ };
3253
+ /**
3254
+ * @summary Manage the conversion to WebVTT.
3255
+ */
3256
+ shaka.text.WebVttGenerator = class {
3257
+ };
3258
+ /**
3259
+ * @enum {string}
3260
+ */
3261
+ shaka.util.CmcdManager.StreamingFormat = {
3262
+ DASH: 'd',
3263
+ HLS: 'h',
3264
+ SMOOTH: 's',
3265
+ OTHER: 'o'
3266
+ };
3267
+ /**
3268
+ * @summary
3269
+ * A CmsdManager maintains CMSD state as well as a collection of utility
3270
+ * functions.
3271
+ */
3272
+ shaka.util.CmsdManager = class {
3273
+ /**
3274
+ * @param {shaka.extern.CmsdConfiguration} config
3275
+ */
3276
+ constructor(config) {}
3277
+ /**
3278
+ * Returns the max bitrate in bits per second. If there is no max bitrate or
3279
+ * it's not enabled, it returns null.
3280
+ * @return {?number}
3281
+ */
3282
+ getMaxBitrate() {}
3283
+ /**
3284
+ * Returns the estimated throughput in bits per second. If there is no
3285
+ * estimated throughput or it's not enabled, it returns null.
3286
+ * @return {?number}
3287
+ */
3288
+ getEstimatedThroughput() {}
3289
+ /**
3290
+ * Returns the response delay in milliseconds. If there is no response delay
3291
+ * or it's not enabled, it returns null.
3292
+ * @return {?number}
3293
+ */
3294
+ getResponseDelay() {}
3295
+ /**
3296
+ * Returns the RTT in milliseconds. If there is no RTT or it's not enabled,
3297
+ * it returns null.
3298
+ * @return {?number}
3299
+ */
3300
+ getRoundTripTime() {}
3301
+ /**
3302
+ * Gets the current bandwidth estimate.
3303
+ * @param {number} defaultEstimate
3304
+ * @return {number} The bandwidth estimate in bits per second.
3305
+ */
3306
+ getBandwidthEstimate(defaultEstimate) {}
3307
+ };
3308
+ /**
3309
+ * @summary The main player object for Shaka Player.
3310
+ * @implements {shaka.util.IDestroyable}
3311
+ */
3312
+ shaka.Player = class extends shaka.util.FakeEventTarget {
3313
+ /**
3314
+ * @param {HTMLMediaElement=} mediaElement
3315
+ * When provided, the player will attach to <code>mediaElement</code>,
3316
+ * similar to calling <code>attach</code>. When not provided, the player
3317
+ * will remain detached.
3318
+ * @param {function(shaka.Player)=} dependencyInjector Optional callback
3319
+ * which is called to inject mocks into the Player. Used for testing.
3320
+ */
3321
+ constructor(mediaElement, dependencyInjector) {}
3322
+ /**
3323
+ * After destruction, a Player object cannot be used again.
3324
+ * @override
3325
+ */
3326
+ destroy() {}
3327
+ /**
3328
+ * Registers a plugin callback that will be called with
3329
+ * <code>support()</code>. The callback will return the value that will be
3330
+ * stored in the return value from <code>support()</code>.
3331
+ * @param {string} name
3332
+ * @param {function():*} callback
3333
+ */
3334
+ static registerSupportPlugin(name, callback) {}
3335
+ /**
3336
+ * Set a factory to create an ad manager during player construction time.
3337
+ * This method needs to be called bafore instantiating the Player class.
3338
+ * @param {!shaka.extern.IAdManager.Factory} factory
3339
+ */
3340
+ static setAdManagerFactory(factory) {}
3341
+ /**
3342
+ * Return whether the browser provides basic support. If this returns false,
3343
+ * Shaka Player cannot be used at all. In this case, do not construct a
3344
+ * Player instance and do not use the library.
3345
+ * @return {boolean}
3346
+ */
3347
+ static isBrowserSupported() {}
3348
+ /**
3349
+ * Probes the browser to determine what features are supported. This makes a
3350
+ * number of requests to EME/MSE/etc which may result in user prompts. This
3351
+ * should only be used for diagnostics.
3352
+ * <p>
3353
+ * NOTE: This may show a request to the user for permission.
3354
+ * @see https://bit.ly/2ywccmH
3355
+ * @param {boolean=} promptsOkay
3356
+ * @return {!Promise.<shaka.extern.SupportType>}
3357
+ */
3358
+ static probeSupport(promptsOkay) {}
3359
+ /**
3360
+ * Attaches the player to a media element.
3361
+ * If the player was already attached to a media element, first detaches from
3362
+ * that media element.
3363
+ * @param {!HTMLMediaElement} mediaElement
3364
+ * @param {boolean=} initializeMediaSource
3365
+ * @return {!Promise}
3366
+ */
3367
+ attach(mediaElement, initializeMediaSource) {}
3368
+ /**
3369
+ * Calling <code>attachCanvas</code> will tell the player to set canvas
3370
+ * element for LCEVC decoding.
3371
+ * @param {HTMLCanvasElement} canvas
3372
+ */
3373
+ attachCanvas(canvas) {}
3374
+ /**
3375
+ * Detach the player from the current media element. Leaves the player in a
3376
+ * state where it cannot play media, until it has been attached to something
3377
+ * else.
3378
+ * @param {boolean=} keepAdManager
3379
+ * @return {!Promise}
3380
+ */
3381
+ detach(keepAdManager) {}
3382
+ /**
3383
+ * Unloads the currently playing stream, if any.
3384
+ * @param {boolean=} initializeMediaSource
3385
+ * @param {boolean=} keepAdManager
3386
+ * @return {!Promise}
3387
+ */
3388
+ unload(initializeMediaSource, keepAdManager) {}
3389
+ /**
3390
+ * Provides a way to update the stream start position during the media loading
3391
+ * process. Can for example be called from the <code>manifestparsed</code>
3392
+ * event handler to update the start position based on information in the
3393
+ * manifest.
3394
+ * @param {number} startTime
3395
+ */
3396
+ updateStartTime(startTime) {}
3397
+ /**
3398
+ * Loads a new stream.
3399
+ * If another stream was already playing, first unloads that stream.
3400
+ * @param {string|shaka.media.PreloadManager} assetUriOrPreloader
3401
+ * @param {?number=} startTime
3402
+ * When <code>startTime</code> is <code>null</code> or
3403
+ * <code>undefined</code>, playback will start at the default start time (0
3404
+ * for VOD and liveEdge for LIVE).
3405
+ * @param {?string=} mimeType
3406
+ * @return {!Promise}
3407
+ */
3408
+ load(assetUriOrPreloader, startTime, mimeType) {}
3409
+ /**
3410
+ * Unloads the currently playing stream, if any, and returns a PreloadManager
3411
+ * that contains the loaded manifest of that asset, if any.
3412
+ * Allows for the asset to be re-loaded by this player faster, in the future.
3413
+ * When in src= mode, this unloads but does not make a PreloadManager.
3414
+ * @param {boolean=} initializeMediaSource
3415
+ * @param {boolean=} keepAdManager
3416
+ * @return {!Promise.<?shaka.media.PreloadManager>}
3417
+ */
3418
+ unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3419
+ /**
3420
+ * Detach the player from the current media element, if any, and returns a
3421
+ * PreloadManager that contains the loaded manifest of that asset, if any.
3422
+ * Allows for the asset to be re-loaded by this player faster, in the future.
3423
+ * When in src= mode, this detach but does not make a PreloadManager.
3424
+ * Leaves the player in a state where it cannot play media, until it has been
3425
+ * attached to something else.
3426
+ * @param {boolean=} keepAdManager
3427
+ * @return {!Promise.<?shaka.media.PreloadManager>}
3428
+ */
3429
+ detachAndSavePreload(keepAdManager) {}
3430
+ /**
3431
+ * Starts to preload a given asset, and returns a PreloadManager object that
3432
+ * represents that preloading process.
3433
+ * The PreloadManager will load the manifest for that asset, as well as the
3434
+ * initialization segment. It will not preload anything more than that;
3435
+ * this feature is intended for reducing start-time latency, not for fully
3436
+ * downloading assets before playing them (for that, use
3437
+ * |shaka.offline.Storage|).
3438
+ * You can pass that PreloadManager object in to the |load| method on this
3439
+ * Player instance to finish loading that particular asset, or you can call
3440
+ * the |destroy| method on the manager if the preload is no longer necessary.
3441
+ * If this returns null rather than a PreloadManager, that indicates that the
3442
+ * asset must be played with src=, which cannot be preloaded.
3443
+ * @param {string} assetUri
3444
+ * @param {?number=} startTime
3445
+ * When <code>startTime</code> is <code>null</code> or
3446
+ * <code>undefined</code>, playback will start at the default start time (0
3447
+ * for VOD and liveEdge for LIVE).
3448
+ * @param {?string=} mimeType
3449
+ * @return {!Promise.<?shaka.media.PreloadManager>}
3450
+ */
3451
+ preload(assetUri, startTime, mimeType) {}
3452
+ /**
3453
+ * Releases all of the mutexes of the player. Meant for use by the tests.
3454
+ */
3455
+ releaseAllMutexes() {}
3456
+ /**
3457
+ * Changes configuration settings on the Player. This checks the names of
3458
+ * keys and the types of values to avoid coding errors. If there are errors,
3459
+ * this logs them to the console and returns false. Correct fields are still
3460
+ * applied even if there are other errors. You can pass an explicit
3461
+ * <code>undefined</code> value to restore the default value. This has two
3462
+ * modes of operation:
3463
+ * <p>
3464
+ * First, this can be passed a single "plain" object. This object should
3465
+ * follow the {@link shaka.extern.PlayerConfiguration} object. Not all fields
3466
+ * need to be set; unset fields retain their old values.
3467
+ * <p>
3468
+ * Second, this can be passed two arguments. The first is the name of the key
3469
+ * to set. This should be a '.' separated path to the key. For example,
3470
+ * <code>'streaming.alwaysStreamText'</code>. The second argument is the
3471
+ * value to set.
3472
+ * @param {string|!Object} config This should either be a field name or an
3473
+ * object.
3474
+ * @param {*=} value In the second mode, this is the value to set.
3475
+ * @return {boolean} True if the passed config object was valid, false if
3476
+ * there were invalid entries.
3477
+ */
3478
+ configure(config, value) {}
3479
+ /**
3480
+ * Return a copy of the current configuration. Modifications of the returned
3481
+ * value will not affect the Player's active configuration. You must call
3482
+ * <code>player.configure()</code> to make changes.
3483
+ * @return {shaka.extern.PlayerConfiguration}
3484
+ */
3485
+ getConfiguration() {}
3486
+ /**
3487
+ * Return a copy of the current non default configuration. Modifications of
3488
+ * the returned value will not affect the Player's active configuration.
3489
+ * You must call <code>player.configure()</code> to make changes.
3490
+ * @return {!Object}
3491
+ */
3492
+ getNonDefaultConfiguration() {}
3493
+ /**
3494
+ * Returns the ratio of video length buffered compared to buffering Goal
3495
+ * @return {number}
3496
+ */
3497
+ getBufferFullness() {}
3498
+ /**
3499
+ * Reset configuration to default.
3500
+ */
3501
+ resetConfiguration() {}
3502
+ /**
3503
+ * Get the current load mode.
3504
+ * @return {shaka.Player.LoadMode}
3505
+ */
3506
+ getLoadMode() {}
3507
+ /**
3508
+ * Get the current manifest type.
3509
+ * @return {?string}
3510
+ */
3511
+ getManifestType() {}
3512
+ /**
3513
+ * Get the media element that the player is currently using to play loaded
3514
+ * content. If the player has not loaded content, this will return
3515
+ * <code>null</code>.
3516
+ * @return {HTMLMediaElement}
3517
+ */
3518
+ getMediaElement() {}
3519
+ /**
3520
+ * @return {shaka.net.NetworkingEngine} A reference to the Player's networking
3521
+ * engine. Applications may use this to make requests through Shaka's
3522
+ * networking plugins.
3523
+ */
3524
+ getNetworkingEngine() {}
3525
+ /**
3526
+ * Get the uri to the asset that the player has loaded. If the player has not
3527
+ * loaded content, this will return <code>null</code>.
3528
+ * @return {?string}
3529
+ */
3530
+ getAssetUri() {}
3531
+ /**
3532
+ * Returns a shaka.ads.AdManager instance, responsible for Dynamic
3533
+ * Ad Insertion functionality.
3534
+ * @return {shaka.extern.IAdManager}
3535
+ */
3536
+ getAdManager() {}
3537
+ /**
3538
+ * Get if the player is playing live content. If the player has not loaded
3539
+ * content, this will return <code>false</code>.
3540
+ * @return {boolean}
3541
+ */
3542
+ isLive() {}
3543
+ /**
3544
+ * Get if the player is playing in-progress content. If the player has not
3545
+ * loaded content, this will return <code>false</code>.
3546
+ * @return {boolean}
3547
+ */
3548
+ isInProgress() {}
3549
+ /**
3550
+ * Check if the manifest contains only audio-only content. If the player has
3551
+ * not loaded content, this will return <code>false</code>.
3552
+ * <p>
3553
+ * The player does not support content that contain more than one type of
3554
+ * variants (i.e. mixing audio-only, video-only, audio-video). Content will be
3555
+ * filtered to only contain one type of variant.
3556
+ * @return {boolean}
3557
+ */
3558
+ isAudioOnly() {}
3559
+ /**
3560
+ * Get the range of time (in seconds) that seeking is allowed. If the player
3561
+ * has not loaded content and the manifest is HLS, this will return a range
3562
+ * from 0 to 0.
3563
+ * @return {{start: number, end: number}}
3564
+ */
3565
+ seekRange() {}
3566
+ /**
3567
+ * Go to live in a live stream.
3568
+ */
3569
+ goToLive() {}
3570
+ /**
3571
+ * Get the key system currently used by EME. If EME is not being used, this
3572
+ * will return an empty string. If the player has not loaded content, this
3573
+ * will return an empty string.
3574
+ * @return {string}
3575
+ */
3576
+ keySystem() {}
3577
+ /**
3578
+ * Get the drm info used to initialize EME. If EME is not being used, this
3579
+ * will return <code>null</code>. If the player is idle or has not initialized
3580
+ * EME yet, this will return <code>null</code>.
3581
+ * @return {?shaka.extern.DrmInfo}
3582
+ */
3583
+ drmInfo() {}
3584
+ /**
3585
+ * Get the next known expiration time for any EME session. If the session
3586
+ * never expires, this will return <code>Infinity</code>. If there are no EME
3587
+ * sessions, this will return <code>Infinity</code>. If the player has not
3588
+ * loaded content, this will return <code>Infinity</code>.
3589
+ * @return {number}
3590
+ */
3591
+ getExpiration() {}
3592
+ /**
3593
+ * Returns the active sessions metadata
3594
+ * @return {!Array.<shaka.extern.DrmSessionMetadata>}
3595
+ */
3596
+ getActiveSessionsMetadata() {}
3597
+ /**
3598
+ * Gets a map of EME key ID to the current key status.
3599
+ * @return {!Object<string, string>}
3600
+ */
3601
+ getKeyStatuses() {}
3602
+ /**
3603
+ * Check if the player is currently in a buffering state (has too little
3604
+ * content to play smoothly). If the player has not loaded content, this will
3605
+ * return <code>false</code>.
3606
+ * @return {boolean}
3607
+ */
3608
+ isBuffering() {}
3609
+ /**
3610
+ * Get the playback rate of what is playing right now. If we are using trick
3611
+ * play, this will return the trick play rate.
3612
+ * If no content is playing, this will return 0.
3613
+ * If content is buffering, this will return the expected playback rate once
3614
+ * the video starts playing.
3615
+ * <p>
3616
+ * If the player has not loaded content, this will return a playback rate of
3617
+ * 0.
3618
+ * @return {number}
3619
+ */
3620
+ getPlaybackRate() {}
3621
+ /**
3622
+ * Enable trick play to skip through content without playing by repeatedly
3623
+ * seeking. For example, a rate of 2.5 would result in 2.5 seconds of content
3624
+ * being skipped every second. A negative rate will result in moving
3625
+ * backwards.
3626
+ * <p>
3627
+ * If the player has not loaded content or is still loading content this will
3628
+ * be a no-op. Wait until <code>load</code> has completed before calling.
3629
+ * <p>
3630
+ * Trick play will be canceled automatically if the playhead hits the
3631
+ * beginning or end of the seekable range for the content.
3632
+ * @param {number} rate
3633
+ */
3634
+ trickPlay(rate) {}
3635
+ /**
3636
+ * Cancel trick-play. If the player has not loaded content or is still loading
3637
+ * content this will be a no-op.
3638
+ */
3639
+ cancelTrickPlay() {}
3640
+ /**
3641
+ * Return a list of variant tracks that can be switched to.
3642
+ * <p>
3643
+ * If the player has not loaded content, this will return an empty list.
3644
+ * @return {!Array.<shaka.extern.Track>}
3645
+ */
3646
+ getVariantTracks() {}
3647
+ /**
3648
+ * Return a list of text tracks that can be switched to.
3649
+ * <p>
3650
+ * If the player has not loaded content, this will return an empty list.
3651
+ * @return {!Array.<shaka.extern.Track>}
3652
+ */
3653
+ getTextTracks() {}
3654
+ /**
3655
+ * Return a list of image tracks that can be switched to.
3656
+ * If the player has not loaded content, this will return an empty list.
3657
+ * @return {!Array.<shaka.extern.Track>}
3658
+ */
3659
+ getImageTracks() {}
3660
+ /**
3661
+ * Returns Thumbnail objects for each thumbnail for a given image track ID.
3662
+ * If the player has not loaded content, this will return a null.
3663
+ * @param {number} trackId
3664
+ * @return {!Promise.<?Array<!shaka.extern.Thumbnail>>}
3665
+ */
3666
+ getAllThumbnails(trackId) {}
3667
+ /**
3668
+ * Return a Thumbnail object from a image track Id and time.
3669
+ * If the player has not loaded content, this will return a null.
3670
+ * @param {number} trackId
3671
+ * @param {number} time
3672
+ * @return {!Promise.<?shaka.extern.Thumbnail>}
3673
+ */
3674
+ getThumbnails(trackId, time) {}
3675
+ /**
3676
+ * Select a specific text track. <code>track</code> should come from a call to
3677
+ * <code>getTextTracks</code>. If the track is not found, this will be a
3678
+ * no-op. If the player has not loaded content, this will be a no-op.
3679
+ * <p>
3680
+ * Note that <code>AdaptationEvents</code> are not fired for manual track
3681
+ * selections.
3682
+ * @param {shaka.extern.Track} track
3683
+ */
3684
+ selectTextTrack(track) {}
3685
+ /**
3686
+ * Select a specific variant track to play. <code>track</code> should come
3687
+ * from a call to <code>getVariantTracks</code>. If <code>track</code> cannot
3688
+ * be found, this will be a no-op. If the player has not loaded content, this
3689
+ * will be a no-op.
3690
+ * <p>
3691
+ * Changing variants will take effect once the currently buffered content has
3692
+ * been played. To force the change to happen sooner, use
3693
+ * <code>clearBuffer</code> with <code>safeMargin</code>. Setting
3694
+ * <code>clearBuffer</code> to <code>true</code> will clear all buffered
3695
+ * content after <code>safeMargin</code>, allowing the new variant to start
3696
+ * playing sooner.
3697
+ * <p>
3698
+ * Note that <code>AdaptationEvents</code> are not fired for manual track
3699
+ * selections.
3700
+ * @param {shaka.extern.Track} track
3701
+ * @param {boolean=} clearBuffer
3702
+ * @param {number=} safeMargin Optional amount of buffer (in seconds) to
3703
+ * retain when clearing the buffer. Useful for switching variant quickly
3704
+ * without causing a buffering event. Defaults to 0 if not provided. Ignored
3705
+ * if clearBuffer is false. Can cause hiccups on some browsers if chosen too
3706
+ * small, e.g. The amount of two segments is a fair minimum to consider as
3707
+ * safeMargin value.
3708
+ */
3709
+ selectVariantTrack(track, clearBuffer, safeMargin) {}
3710
+ /**
3711
+ * Return a list of audio language-role combinations available. If the
3712
+ * player has not loaded any content, this will return an empty list.
3713
+ * @return {!Array.<shaka.extern.LanguageRole>}
3714
+ */
3715
+ getAudioLanguagesAndRoles() {}
3716
+ /**
3717
+ * Return a list of text language-role combinations available. If the player
3718
+ * has not loaded any content, this will be return an empty list.
3719
+ * @return {!Array.<shaka.extern.LanguageRole>}
3720
+ */
3721
+ getTextLanguagesAndRoles() {}
3722
+ /**
3723
+ * Return a list of audio languages available. If the player has not loaded
3724
+ * any content, this will return an empty list.
3725
+ * @return {!Array.<string>}
3726
+ */
3727
+ getAudioLanguages() {}
3728
+ /**
3729
+ * Return a list of text languages available. If the player has not loaded
3730
+ * any content, this will return an empty list.
3731
+ * @return {!Array.<string>}
3732
+ */
3733
+ getTextLanguages() {}
3734
+ /**
3735
+ * Sets the current audio language and current variant role to the selected
3736
+ * language, role and channel count, and chooses a new variant if need be.
3737
+ * If the player has not loaded any content, this will be a no-op.
3738
+ * @param {string} language
3739
+ * @param {string=} role
3740
+ * @param {number=} channelsCount
3741
+ * @param {number=} safeMargin
3742
+ */
3743
+ selectAudioLanguage(language, role, channelsCount, safeMargin) {}
3744
+ /**
3745
+ * Sets the current text language and current text role to the selected
3746
+ * language and role, and chooses a new variant if need be. If the player has
3747
+ * not loaded any content, this will be a no-op.
3748
+ * @param {string} language
3749
+ * @param {string=} role
3750
+ * @param {boolean=} forced
3751
+ */
3752
+ selectTextLanguage(language, role, forced) {}
3753
+ /**
3754
+ * Select variant tracks that have a given label. This assumes the
3755
+ * label uniquely identifies an audio stream, so all the variants
3756
+ * are expected to have the same variant.audio.
3757
+ * @param {string} label
3758
+ * @param {boolean=} clearBuffer Optional clear buffer or not when
3759
+ * switch to new variant
3760
+ * Defaults to true if not provided
3761
+ * @param {number=} safeMargin Optional amount of buffer (in seconds) to
3762
+ * retain when clearing the buffer.
3763
+ * Defaults to 0 if not provided. Ignored if clearBuffer is false.
3764
+ */
3765
+ selectVariantsByLabel(label, clearBuffer, safeMargin) {}
3766
+ /**
3767
+ * Check if the text displayer is enabled.
3768
+ * @return {boolean}
3769
+ */
3770
+ isTextTrackVisible() {}
3771
+ /**
3772
+ * Return a list of chapters tracks.
3773
+ * @return {!Array.<shaka.extern.Track>}
3774
+ */
3775
+ getChaptersTracks() {}
3776
+ /**
3777
+ * This returns the list of chapters.
3778
+ * @param {string} language
3779
+ * @return {!Array.<shaka.extern.Chapter>}
3780
+ */
3781
+ getChapters(language) {}
3782
+ /**
3783
+ * Enable or disable the text displayer. If the player is in an unloaded
3784
+ * state, the request will be applied next time content is loaded.
3785
+ * @param {boolean} isVisible
3786
+ */
3787
+ setTextTrackVisibility(isVisible) {}
3788
+ /**
3789
+ * Get the current playhead position as a date.
3790
+ * @return {Date}
3791
+ */
3792
+ getPlayheadTimeAsDate() {}
3793
+ /**
3794
+ * Get the presentation start time as a date.
3795
+ * @return {Date}
3796
+ */
3797
+ getPresentationStartTimeAsDate() {}
3798
+ /**
3799
+ * Get the presentation segment availability duration. This should only be
3800
+ * called when the player has loaded a live stream. If the player has not
3801
+ * loaded a live stream, this will return <code>null</code>.
3802
+ * @return {?number}
3803
+ */
3804
+ getSegmentAvailabilityDuration() {}
3805
+ /**
3806
+ * Get information about what the player has buffered. If the player has not
3807
+ * loaded content or is currently loading content, the buffered content will
3808
+ * be empty.
3809
+ * @return {shaka.extern.BufferedInfo}
3810
+ */
3811
+ getBufferedInfo() {}
3812
+ /**
3813
+ * Get statistics for the current playback session. If the player is not
3814
+ * playing content, this will return an empty stats object.
3815
+ * @return {shaka.extern.Stats}
3816
+ */
3817
+ getStats() {}
3818
+ /**
3819
+ * Adds the given text track to the loaded manifest. <code>load()</code> must
3820
+ * resolve before calling. The presentation must have a duration.
3821
+ * This returns the created track, which can immediately be selected by the
3822
+ * application. The track will not be automatically selected.
3823
+ * @param {string} uri
3824
+ * @param {string} language
3825
+ * @param {string} kind
3826
+ * @param {string=} mimeType
3827
+ * @param {string=} codec
3828
+ * @param {string=} label
3829
+ * @param {boolean=} forced
3830
+ * @return {!Promise.<shaka.extern.Track>}
3831
+ */
3832
+ addTextTrackAsync(uri, language, kind, mimeType, codec, label, forced) {}
3833
+ /**
3834
+ * Adds the given thumbnails track to the loaded manifest.
3835
+ * <code>load()</code> must resolve before calling. The presentation must
3836
+ * have a duration.
3837
+ * This returns the created track, which can immediately be used by the
3838
+ * application.
3839
+ * @param {string} uri
3840
+ * @param {string=} mimeType
3841
+ * @return {!Promise.<shaka.extern.Track>}
3842
+ */
3843
+ addThumbnailsTrack(uri, mimeType) {}
3844
+ /**
3845
+ * Adds the given chapters track to the loaded manifest. <code>load()</code>
3846
+ * must resolve before calling. The presentation must have a duration.
3847
+ * This returns the created track.
3848
+ * @param {string} uri
3849
+ * @param {string} language
3850
+ * @param {string=} mimeType
3851
+ * @return {!Promise.<shaka.extern.Track>}
3852
+ */
3853
+ addChaptersTrack(uri, language, mimeType) {}
3854
+ /**
3855
+ * Set the maximum resolution that the platform's hardware can handle.
3856
+ * @param {number} width
3857
+ * @param {number} height
3858
+ */
3859
+ setMaxHardwareResolution(width, height) {}
3860
+ /**
3861
+ * Retry streaming after a streaming failure has occurred. When the player has
3862
+ * not loaded content or is loading content, this will be a no-op and will
3863
+ * return <code>false</code>.
3864
+ * <p>
3865
+ * If the player has loaded content, and streaming has not seen an error, this
3866
+ * will return <code>false</code>.
3867
+ * <p>
3868
+ * If the player has loaded content, and streaming seen an error, but the
3869
+ * could not resume streaming, this will return <code>false</code>.
3870
+ * @param {number=} retryDelaySeconds
3871
+ * @return {boolean}
3872
+ */
3873
+ retryStreaming(retryDelaySeconds) {}
3874
+ /**
3875
+ * Get the manifest that the player has loaded. If the player has not loaded
3876
+ * any content, this will return <code>null</code>.
3877
+ * NOTE: This structure is NOT covered by semantic versioning compatibility
3878
+ * guarantees. It may change at any time!
3879
+ * This is marked as deprecated to warn Closure Compiler users at compile-time
3880
+ * to avoid using this method.
3881
+ * @return {?shaka.extern.Manifest}
3882
+ * @deprecated
3883
+ */
3884
+ getManifest() {}
3885
+ /**
3886
+ * Get the type of manifest parser that the player is using. If the player has
3887
+ * not loaded any content, this will return <code>null</code>.
3888
+ * @return {?shaka.extern.ManifestParser.Factory}
3889
+ */
3890
+ getManifestParserFactory() {}
3891
+ /**
3892
+ * Set the videoContainer to construct UITextDisplayer.
3893
+ * @param {HTMLElement} videoContainer
3894
+ */
3895
+ setVideoContainer(videoContainer) {}
3896
+ /**
3897
+ * Indicate if the video has ended.
3898
+ * @return {boolean}
3899
+ */
3900
+ isEnded() {}
3901
+ };
3902
+ /**
3903
+ * In order to know what method of loading the player used for some content, we
3904
+ * have this enum. It lets us know if content has not been loaded, loaded with
3905
+ * media source, or loaded with src equals.
3906
+ * This enum has a low resolution, because it is only meant to express the
3907
+ * outer limits of the various states that the player is in. For example, when
3908
+ * someone calls a public method on player, it should not matter if they have
3909
+ * initialized drm engine, it should only matter if they finished loading
3910
+ * content.
3911
+ * @enum {number}
3912
+ */
3913
+ shaka.Player.LoadMode = {
3914
+ 'DESTROYED': 0,
3915
+ 'NOT_LOADED': 1,
3916
+ 'MEDIA_SOURCE': 2,
3917
+ 'SRC_EQUALS': 3
3918
+ };
3919
+ /**
3920
+ * @define {string} A version number taken from git at compile time.
3921
+ */
3922
+ shaka.Player.version;
3923
+ /**
3924
+ * @summary A one-stop installer for all polyfills.
3925
+ * @see http://enwp.org/polyfill
3926
+ */
3927
+ shaka.polyfill = class {
3928
+ /**
3929
+ * Install all polyfills.
3930
+ */
3931
+ static installAll() {}
3932
+ /**
3933
+ * Registers a new polyfill to be installed.
3934
+ * @param {function()} polyfill
3935
+ * @param {number=} priority An optional number priority. Higher priorities
3936
+ * will be executed before lower priority ones. Default is 0.
3937
+ */
3938
+ static register(polyfill, priority) {}
3939
+ };
3940
+ /**
3941
+ * @summary A polyfill for systems that do not implement AbortController.
3942
+ * This is used both with the fetch API for HTTP requests and inside the HLS
3943
+ * parser.
3944
+ * @extends AbortController
3945
+ */
3946
+ shaka.polyfill.AbortController = class {
3947
+ /**
3948
+ * Install the polyfill if needed.
3949
+ */
3950
+ static install() {}
3951
+ /** */
3952
+ constructor() {}
3953
+ };
3954
+ /**
3955
+ * @summary A polyfill to add support for EncryptionScheme queries in EME.
3956
+ * @see https://wicg.github.io/encrypted-media-encryption-scheme/
3957
+ * @see https://github.com/w3c/encrypted-media/pull/457
3958
+ * @see https://github.com/shaka-project/eme-encryption-scheme-polyfill
3959
+ */
3960
+ shaka.polyfill.EncryptionScheme = class {
3961
+ /**
3962
+ * Install the polyfill if needed.
3963
+ * @suppress {missingRequire}
3964
+ */
3965
+ static install() {}
3966
+ };
3967
+ /**
3968
+ * @summary A polyfill to provide navigator.mediaCapabilities on all browsers.
3969
+ * This is necessary for Tizen 3, Xbox One and possibly others we have yet to
3970
+ * discover.
3971
+ */
3972
+ shaka.polyfill.MediaCapabilities = class {
3973
+ /**
3974
+ * Install the polyfill if needed.
3975
+ * @suppress {const}
3976
+ */
3977
+ static install() {}
3978
+ };
3979
+ /**
3980
+ * A copy of the MediaCapabilities instance, to prevent Safari from
3981
+ * garbage-collecting the polyfilled method on it. We make it public and export
3982
+ * it to ensure that it is not stripped out by the compiler.
3983
+ * @type {MediaCapabilities}
3984
+ */
3985
+ shaka.polyfill.MediaCapabilities.originalMcap;
3986
+ /**
3987
+ * A cache that stores the canDisplayType result of calling
3988
+ * `cast.__platform__.canDisplayType`.
3989
+ * @type {(Object<(!string), (!boolean)>)}
3990
+ */
3991
+ shaka.polyfill.MediaCapabilities.memoizedCanDisplayTypeRequests_ = {
3992
+
3993
+ };
3994
+ /**
3995
+ * @summary A polyfill to patch MSE bugs.
3996
+ */
3997
+ shaka.polyfill.MediaSource = class {
3998
+ /**
3999
+ * Install the polyfill if needed.
4000
+ */
4001
+ static install() {}
4002
+ };
4003
+ /**
4004
+ * @summary A polyfill to implement modern, standardized EME on top of Apple's
4005
+ * prefixed EME in Safari.
4006
+ */
4007
+ shaka.polyfill.PatchedMediaKeysApple = class {
4008
+ /**
4009
+ * Installs the polyfill if needed.
4010
+ * @param {boolean=} enableUninstall enables uninstalling the polyfill
4011
+ */
4012
+ static install(enableUninstall) {}
4013
+ /**
4014
+ * Uninstalls the polyfill if needed and enabled.
4015
+ */
4016
+ static uninstall() {}
4017
+ };
4018
+ /**
4019
+ * @summary A polyfill to fix setServerCertificate implementation on
4020
+ * older platforms which claim to support modern EME.
4021
+ */
4022
+ shaka.polyfill.PatchedMediaKeysCert = class {
4023
+ /**
4024
+ * Installs the polyfill if needed.
4025
+ */
4026
+ static install() {}
4027
+ };
4028
+ /**
4029
+ * @summary A polyfill to stub out
4030
+ * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
4031
+ * EME.
4032
+ * All methods will fail.
4033
+ */
4034
+ shaka.polyfill.PatchedMediaKeysNop = class {
4035
+ /**
4036
+ * Installs the polyfill if needed.
4037
+ */
4038
+ static install() {}
4039
+ };
4040
+ /**
4041
+ * @summary A polyfill to implement
4042
+ * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of
4043
+ * webkit-prefixed {@link https://bit.ly/Eme01b EME v0.1b}.
4044
+ */
4045
+ shaka.polyfill.PatchedMediaKeysWebkit = class {
4046
+ /**
4047
+ * Installs the polyfill if needed.
4048
+ */
4049
+ static install() {}
4050
+ };
4051
+ /**
4052
+ * @summary A polyfill to provide window.crypto.randomUUID in all browsers.
4053
+ */
4054
+ shaka.polyfill.RandomUUID = class {
4055
+ /**
4056
+ * Install the polyfill if needed.
4057
+ */
4058
+ static install() {}
4059
+ };
4060
+ /**
4061
+ * @summary A polyfill to provide Symbol.prototype.description in all browsers.
4062
+ * See: https://caniuse.com/mdn-javascript_builtins_symbol_description
4063
+ */
4064
+ shaka.polyfill.Symbol = class {
4065
+ /**
4066
+ * Install the polyfill if needed.
4067
+ */
4068
+ static install() {}
4069
+ };
4070
+ /**
4071
+ * @summary A polyfill to silence the play() Promise in HTML5 video.
4072
+ */
4073
+ shaka.polyfill.VideoPlayPromise = class {
4074
+ /**
4075
+ * Install the polyfill if needed.
4076
+ */
4077
+ static install() {}
4078
+ };
4079
+ /**
4080
+ * @summary A polyfill to provide MSE VideoPlaybackQuality metrics.
4081
+ * Many browsers do not yet provide this API, and Chrome currently provides
4082
+ * similar data through individual prefixed attributes on HTMLVideoElement.
4083
+ */
4084
+ shaka.polyfill.VideoPlaybackQuality = class {
4085
+ /**
4086
+ * Install the polyfill if needed.
4087
+ */
4088
+ static install() {}
4089
+ };
4090
+ /**
4091
+ * @summary A polyfill to provide VTTCue.
4092
+ */
4093
+ shaka.polyfill.VTTCue = class {
4094
+ /**
4095
+ * Install the polyfill if needed.
4096
+ */
4097
+ static install() {}
4098
+ };
4099
+ /**
4100
+ * @implements {shaka.extern.TextParser}
4101
+ */
4102
+ shaka.text.TtmlTextParser = class {
4103
+ /**
4104
+ * @override
4105
+ */
4106
+ parseInit(data) {}
4107
+ /**
4108
+ * @override
4109
+ */
4110
+ setSequenceMode(sequenceMode) {}
4111
+ /**
4112
+ * @override
4113
+ */
4114
+ setManifestType(manifestType) {}
4115
+ /**
4116
+ * @override
4117
+ */
4118
+ parseMedia(data, time, uri) {}
4119
+ };
4120
+ /**
4121
+ * @implements {shaka.extern.TextParser}
4122
+ */
4123
+ shaka.text.Mp4TtmlParser = class {
4124
+ /** */
4125
+ constructor() {}
4126
+ /**
4127
+ * @override
4128
+ */
4129
+ parseInit(data) {}
4130
+ /**
4131
+ * @override
4132
+ */
4133
+ setSequenceMode(sequenceMode) {}
4134
+ /**
4135
+ * @override
4136
+ */
4137
+ setManifestType(manifestType) {}
4138
+ /**
4139
+ * @override
4140
+ */
4141
+ parseMedia(data, time, uri) {}
4142
+ };
4143
+ /**
4144
+ * @implements {shaka.extern.TextParser}
4145
+ */
4146
+ shaka.text.VttTextParser = class {
4147
+ /** Constructs a VTT parser. */
4148
+ constructor() {}
4149
+ /**
4150
+ * @override
4151
+ */
4152
+ parseInit(data) {}
4153
+ /**
4154
+ * @override
4155
+ */
4156
+ setSequenceMode(sequenceMode) {}
4157
+ /**
4158
+ * @override
4159
+ */
4160
+ setManifestType(manifestType) {}
4161
+ /**
4162
+ * @override
4163
+ */
4164
+ parseMedia(data, time) {}
4165
+ };
4166
+ /**
4167
+ * @implements {shaka.extern.TextParser}
4168
+ */
4169
+ shaka.text.Mp4VttParser = class {
4170
+ /** */
4171
+ constructor() {}
4172
+ /**
4173
+ * @override
4174
+ */
4175
+ parseInit(data) {}
4176
+ /**
4177
+ * @override
4178
+ */
4179
+ setSequenceMode(sequenceMode) {}
4180
+ /**
4181
+ * @override
4182
+ */
4183
+ setManifestType(manifestType) {}
4184
+ /**
4185
+ * @override
4186
+ */
4187
+ parseMedia(data, time) {}
4188
+ };