shaka-player 4.4.2 → 4.4.3

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 (57) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/demo/common/asset.js +5 -0
  3. package/demo/common/assets.js +20 -5
  4. package/demo/common/message_ids.js +1 -1
  5. package/demo/locales/en.json +2 -1
  6. package/demo/locales/source.json +5 -1
  7. package/demo/main.js +1 -1
  8. package/demo/search.js +3 -3
  9. package/dist/demo.compiled.debug.js +72 -70
  10. package/dist/demo.compiled.debug.map +3 -3
  11. package/dist/demo.compiled.js +72 -70
  12. package/dist/demo.compiled.map +3 -3
  13. package/dist/locales.js +30 -30
  14. package/dist/receiver.compiled.debug.js +38 -36
  15. package/dist/receiver.compiled.debug.map +3 -3
  16. package/dist/receiver.compiled.js +38 -36
  17. package/dist/receiver.compiled.map +3 -3
  18. package/dist/shaka-player.compiled.d.ts +222 -1
  19. package/dist/shaka-player.compiled.debug.d.ts +222 -1
  20. package/dist/shaka-player.compiled.debug.externs.js +271 -1
  21. package/dist/shaka-player.compiled.debug.js +233 -228
  22. package/dist/shaka-player.compiled.debug.map +3 -3
  23. package/dist/shaka-player.compiled.externs.js +271 -1
  24. package/dist/shaka-player.compiled.js +1035 -1028
  25. package/dist/shaka-player.compiled.map +3 -3
  26. package/dist/shaka-player.ui.d.ts +222 -1
  27. package/dist/shaka-player.ui.debug.d.ts +222 -1
  28. package/dist/shaka-player.ui.debug.externs.js +271 -1
  29. package/dist/shaka-player.ui.debug.js +256 -251
  30. package/dist/shaka-player.ui.debug.map +3 -3
  31. package/dist/shaka-player.ui.externs.js +271 -1
  32. package/dist/shaka-player.ui.js +1162 -1155
  33. package/dist/shaka-player.ui.map +3 -3
  34. package/docs/tutorials/offline.md +1 -1
  35. package/lib/dash/dash_parser.js +4 -1
  36. package/lib/hls/hls_parser.js +60 -24
  37. package/lib/media/segment_index.js +4 -4
  38. package/lib/media/segment_reference.js +6 -1
  39. package/lib/media/streaming_engine.js +14 -24
  40. package/lib/player.js +1 -1
  41. package/lib/text/cue.js +47 -47
  42. package/lib/text/vtt_text_parser.js +2 -2
  43. package/lib/util/cmcd_manager.js +6 -1
  44. package/lib/util/manifest_parser_utils.js +10 -4
  45. package/lib/util/platform.js +14 -0
  46. package/lib/util/ts_parser.js +3 -3
  47. package/package.json +1 -1
  48. package/test/dash/dash_parser_manifest_unit.js +5 -0
  49. package/test/dash/dash_parser_segment_base_unit.js +5 -0
  50. package/test/dash/dash_parser_segment_list_unit.js +21 -17
  51. package/test/dash/dash_parser_segment_template_unit.js +47 -0
  52. package/test/hls/hls_live_unit.js +33 -0
  53. package/test/hls/hls_parser_unit.js +2 -57
  54. package/test/test/util/dash_parser_util.js +16 -7
  55. package/test/text/vtt_text_parser_unit.js +2 -17
  56. package/test/transmuxer/transmuxer_integration.js +4 -4
  57. package/test/util/ts_parser_unit.js +1 -1
@@ -173,6 +173,212 @@ shaka.text.Cue = class {
173
173
  */
174
174
  static equal(cue1, cue2) {}
175
175
  };
176
+ /**
177
+ * The start time of the cue in seconds, relative to the start of the
178
+ * presentation.
179
+ * @type {number}
180
+ */
181
+ shaka.text.Cue.prototype.startTime;
182
+ /**
183
+ * The end time of the cue in seconds, relative to the start of the
184
+ * presentation.
185
+ * @type {number}
186
+ */
187
+ shaka.text.Cue.prototype.endTime;
188
+ /**
189
+ * The text payload of the cue. If nestedCues is non-empty, this should be
190
+ * empty. Top-level block containers should have no payload of their own.
191
+ * @type {string}
192
+ */
193
+ shaka.text.Cue.prototype.payload;
194
+ /**
195
+ * The region to render the cue into. Only supported on top-level cues,
196
+ * because nested cues are inline elements.
197
+ * @type {shaka.text.CueRegion}
198
+ */
199
+ shaka.text.Cue.prototype.region;
200
+ /**
201
+ * The indent (in percent) of the cue box in the direction defined by the
202
+ * writing direction.
203
+ * @type {?number}
204
+ */
205
+ shaka.text.Cue.prototype.position;
206
+ /**
207
+ * Position alignment of the cue.
208
+ * @type {shaka.text.Cue.positionAlign}
209
+ */
210
+ shaka.text.Cue.prototype.positionAlign;
211
+ /**
212
+ * Size of the cue box (in percents), where 0 means "auto".
213
+ * @type {number}
214
+ */
215
+ shaka.text.Cue.prototype.size;
216
+ /**
217
+ * Alignment of the text inside the cue box.
218
+ * @type {shaka.text.Cue.textAlign}
219
+ */
220
+ shaka.text.Cue.prototype.textAlign;
221
+ /**
222
+ * Text direction of the cue.
223
+ * @type {shaka.text.Cue.direction}
224
+ */
225
+ shaka.text.Cue.prototype.direction;
226
+ /**
227
+ * Text writing mode of the cue.
228
+ * @type {shaka.text.Cue.writingMode}
229
+ */
230
+ shaka.text.Cue.prototype.writingMode;
231
+ /**
232
+ * The way to interpret line field. (Either as an integer line number or
233
+ * percentage from the display box).
234
+ * @type {shaka.text.Cue.lineInterpretation}
235
+ */
236
+ shaka.text.Cue.prototype.lineInterpretation;
237
+ /**
238
+ * The offset from the display box in either number of lines or
239
+ * percentage depending on the value of lineInterpretation.
240
+ * @type {?number}
241
+ */
242
+ shaka.text.Cue.prototype.line;
243
+ /**
244
+ * Separation between line areas inside the cue box in px or em
245
+ * (e.g. '100px'/'100em'). If not specified, this should be no less than
246
+ * the largest font size applied to the text in the cue.
247
+ * @type {string}.
248
+ */
249
+ shaka.text.Cue.prototype.lineHeight;
250
+ /**
251
+ * Line alignment of the cue box.
252
+ * Start alignment means the cue box’s top side (for horizontal cues), left
253
+ * side (for vertical growing right), or right side (for vertical growing
254
+ * left) is aligned at the line.
255
+ * Center alignment means the cue box is centered at the line.
256
+ * End alignment The cue box’s bottom side (for horizontal cues), right side
257
+ * (for vertical growing right), or left side (for vertical growing left) is
258
+ * aligned at the line.
259
+ * @type {shaka.text.Cue.lineAlign}
260
+ */
261
+ shaka.text.Cue.prototype.lineAlign;
262
+ /**
263
+ * Vertical alignments of the cues within their extents.
264
+ * 'BEFORE' means displaying the captions at the top of the text display
265
+ * container box, 'CENTER' means in the middle, 'AFTER' means at the bottom.
266
+ * @type {shaka.text.Cue.displayAlign}
267
+ */
268
+ shaka.text.Cue.prototype.displayAlign;
269
+ /**
270
+ * Text color as a CSS color, e.g. "#FFFFFF" or "white".
271
+ * @type {string}
272
+ */
273
+ shaka.text.Cue.prototype.color;
274
+ /**
275
+ * Text background color as a CSS color, e.g. "#FFFFFF" or "white".
276
+ * @type {string}
277
+ */
278
+ shaka.text.Cue.prototype.backgroundColor;
279
+ /**
280
+ * The URL of the background image, e.g. "data:[mime type];base64,[data]".
281
+ * @type {string}
282
+ */
283
+ shaka.text.Cue.prototype.backgroundImage;
284
+ /**
285
+ * The border around this cue as a CSS border.
286
+ * @type {string}
287
+ */
288
+ shaka.text.Cue.prototype.border;
289
+ /**
290
+ * Text font size in px or em (e.g. '100px'/'100em').
291
+ * @type {string}
292
+ */
293
+ shaka.text.Cue.prototype.fontSize;
294
+ /**
295
+ * Text font weight. Either normal or bold.
296
+ * @type {shaka.text.Cue.fontWeight}
297
+ */
298
+ shaka.text.Cue.prototype.fontWeight;
299
+ /**
300
+ * Text font style. Normal, italic or oblique.
301
+ * @type {shaka.text.Cue.fontStyle}
302
+ */
303
+ shaka.text.Cue.prototype.fontStyle;
304
+ /**
305
+ * Text font family.
306
+ * @type {string}
307
+ */
308
+ shaka.text.Cue.prototype.fontFamily;
309
+ /**
310
+ * Text letter spacing as a CSS letter-spacing value.
311
+ * @type {string}
312
+ */
313
+ shaka.text.Cue.prototype.letterSpacing;
314
+ /**
315
+ * Text line padding as a CSS line-padding value.
316
+ * @type {string}
317
+ */
318
+ shaka.text.Cue.prototype.linePadding;
319
+ /**
320
+ * Opacity of the cue element, from 0-1.
321
+ * @type {number}
322
+ */
323
+ shaka.text.Cue.prototype.opacity;
324
+ /**
325
+ * Text decoration. A combination of underline, overline
326
+ * and line through. Empty array means no decoration.
327
+ * @type {!Array.<!shaka.text.Cue.textDecoration>}
328
+ */
329
+ shaka.text.Cue.prototype.textDecoration;
330
+ /**
331
+ * Text shadow color as a CSS text-shadow value.
332
+ * @type {string}
333
+ */
334
+ shaka.text.Cue.prototype.textShadow;
335
+ /**
336
+ * Text stroke color as a CSS color, e.g. "#FFFFFF" or "white".
337
+ * @type {string}
338
+ */
339
+ shaka.text.Cue.prototype.textStrokeColor;
340
+ /**
341
+ * Text stroke width as a CSS stroke-width value.
342
+ * @type {string}
343
+ */
344
+ shaka.text.Cue.prototype.textStrokeWidth;
345
+ /**
346
+ * Whether or not line wrapping should be applied to the cue.
347
+ * @type {boolean}
348
+ */
349
+ shaka.text.Cue.prototype.wrapLine;
350
+ /**
351
+ * Id of the cue.
352
+ * @type {string}
353
+ */
354
+ shaka.text.Cue.prototype.id;
355
+ /**
356
+ * Nested cues, which should be laid out horizontally in one block.
357
+ * Top-level cues are blocks, and nested cues are inline elements.
358
+ * Cues can be nested arbitrarily deeply.
359
+ * @type {!Array.<!shaka.text.Cue>}
360
+ */
361
+ shaka.text.Cue.prototype.nestedCues;
362
+ /**
363
+ * If true, this represents a container element that is "above" the main
364
+ * cues. For example, the <body> and <div> tags that contain the <p> tags
365
+ * in a TTML file. This controls the flow of the final cues; any nested cues
366
+ * within an "isContainer" cue will be laid out as separate lines.
367
+ * @type {boolean}
368
+ */
369
+ shaka.text.Cue.prototype.isContainer;
370
+ /**
371
+ * Whether or not the cue only acts as a line break between two nested cues.
372
+ * Should only appear in nested cues.
373
+ * @type {boolean}
374
+ */
375
+ shaka.text.Cue.prototype.lineBreak;
376
+ /**
377
+ * The number of horizontal and vertical cells into which the Root Container
378
+ * Region area is divided.
379
+ * @type {{ columns: number, rows: number }}
380
+ */
381
+ shaka.text.Cue.prototype.cellResolution;
176
382
  /**
177
383
  * @enum {string}
178
384
  */
@@ -294,6 +500,68 @@ shaka.text.CueRegion = class {
294
500
  /** */
295
501
  constructor() {}
296
502
  };
503
+ /**
504
+ * Region identifier.
505
+ * @type {string}
506
+ */
507
+ shaka.text.CueRegion.prototype.id;
508
+ /**
509
+ * The X offset to start the rendering area in viewportAnchorUnits of the
510
+ * video width.
511
+ * @type {number}
512
+ */
513
+ shaka.text.CueRegion.prototype.viewportAnchorX;
514
+ /**
515
+ * The X offset to start the rendering area in viewportAnchorUnits of the
516
+ * video height.
517
+ * @type {number}
518
+ */
519
+ shaka.text.CueRegion.prototype.viewportAnchorY;
520
+ /**
521
+ * The X offset to start the rendering area in percentage (0-100) of this
522
+ * region width.
523
+ * @type {number}
524
+ */
525
+ shaka.text.CueRegion.prototype.regionAnchorX;
526
+ /**
527
+ * The Y offset to start the rendering area in percentage (0-100) of the
528
+ * region height.
529
+ * @type {number}
530
+ */
531
+ shaka.text.CueRegion.prototype.regionAnchorY;
532
+ /**
533
+ * The width of the rendering area in widthUnits.
534
+ * @type {number}
535
+ */
536
+ shaka.text.CueRegion.prototype.width;
537
+ /**
538
+ * The width of the rendering area in heightUnits.
539
+ * @type {number}
540
+ */
541
+ shaka.text.CueRegion.prototype.height;
542
+ /**
543
+ * The units (percentage, pixels or lines) the region height is in.
544
+ * @type {shaka.text.CueRegion.units}
545
+ */
546
+ shaka.text.CueRegion.prototype.heightUnits;
547
+ /**
548
+ * The units (percentage or pixels) the region width is in.
549
+ * @type {shaka.text.CueRegion.units}
550
+ */
551
+ shaka.text.CueRegion.prototype.widthUnits;
552
+ /**
553
+ * The units (percentage or pixels) the region viewportAnchors are in.
554
+ * @type {shaka.text.CueRegion.units}
555
+ */
556
+ shaka.text.CueRegion.prototype.viewportAnchorUnits;
557
+ /**
558
+ * If scroll=UP, it means that cues in the region will be added to the
559
+ * bottom of the region and will push any already displayed cues in the
560
+ * region up. Otherwise (scroll=NONE) cues will stay fixed at the location
561
+ * they were first painted in.
562
+ * @type {shaka.text.CueRegion.scrollMode}
563
+ */
564
+ shaka.text.CueRegion.prototype.scroll;
297
565
  /**
298
566
  * @enum {number}
299
567
  */
@@ -1625,8 +1893,10 @@ shaka.media.InitSegmentReference = class {
1625
1893
  * the quality of the media associated with this init segment.
1626
1894
  * @param {(null|number)=} timescale
1627
1895
  * @param {(null|BufferSource)=} segmentData
1896
+ * @param {?shaka.extern.HlsAes128Key=} aes128Key
1897
+ * The segment's AES-128-CBC full segment encryption key and iv.
1628
1898
  */
1629
- constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData) {}
1899
+ constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData, aes128Key) {}
1630
1900
  /**
1631
1901
  * Returns the offset from the start of the resource to the
1632
1902
  * start of the segment.