shaka-player 4.9.0 → 4.9.1

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 (33) hide show
  1. package/dist/locales.js +34 -34
  2. package/dist/shaka-player.compiled.d.ts +0 -1
  3. package/dist/shaka-player.compiled.debug.d.ts +0 -1
  4. package/dist/shaka-player.compiled.debug.externs.js +0 -1
  5. package/dist/shaka-player.compiled.debug.js +184 -183
  6. package/dist/shaka-player.compiled.debug.map +2 -2
  7. package/dist/shaka-player.compiled.externs.js +0 -1
  8. package/dist/shaka-player.compiled.js +287 -286
  9. package/dist/shaka-player.compiled.map +2 -2
  10. package/dist/shaka-player.ui.d.ts +0 -1
  11. package/dist/shaka-player.ui.debug.d.ts +0 -1
  12. package/dist/shaka-player.ui.debug.externs.js +0 -1
  13. package/dist/shaka-player.ui.debug.js +94 -92
  14. package/dist/shaka-player.ui.debug.map +3 -3
  15. package/dist/shaka-player.ui.externs.js +0 -1
  16. package/dist/shaka-player.ui.js +552 -551
  17. package/dist/shaka-player.ui.map +3 -3
  18. package/lib/media/content_workarounds.js +4 -2
  19. package/lib/media/media_source_engine.js +66 -31
  20. package/lib/player.js +5 -5
  21. package/lib/transmuxer/aac_transmuxer.js +4 -2
  22. package/lib/transmuxer/ac3_transmuxer.js +2 -1
  23. package/lib/transmuxer/ec3_transmuxer.js +2 -1
  24. package/lib/transmuxer/mp3_transmuxer.js +4 -2
  25. package/lib/transmuxer/mpeg_ts_transmuxer.js +2 -1
  26. package/lib/transmuxer/mss_transmuxer.js +4 -2
  27. package/lib/transmuxer/ts_transmuxer.js +44 -24
  28. package/lib/util/error.js +10 -8
  29. package/lib/util/object_utils.js +1 -2
  30. package/package.json +1 -1
  31. package/ui/audio_language_selection.js +4 -0
  32. package/ui/resolution_selection.js +4 -0
  33. package/ui/text_selection.js +4 -0
package/lib/util/error.js CHANGED
@@ -456,6 +456,7 @@ shaka.util.Error.Code = {
456
456
  /**
457
457
  * A MediaSource operation failed.
458
458
  * <br> error.data[0] is a MediaError code from the video element.
459
+ * <br> error.data[1] is the segment URI that triggered the error, if any.
459
460
  */
460
461
  'MEDIA_SOURCE_OPERATION_FAILED': 3014,
461
462
 
@@ -463,6 +464,7 @@ shaka.util.Error.Code = {
463
464
  * A MediaSource operation threw an exception.
464
465
  * <br> error.data[0] is the exception that was thrown.
465
466
  * <br> error.data[1] is the error object from the video element.
467
+ * <br> error.data[2] is the segment URI that triggered the error, if any.
466
468
  */
467
469
  'MEDIA_SOURCE_OPERATION_THREW': 3015,
468
470
 
@@ -485,37 +487,37 @@ shaka.util.Error.Code = {
485
487
  'QUOTA_EXCEEDED_ERROR': 3017,
486
488
 
487
489
  /**
488
- * Mux.js did not invoke the callback signifying successful transmuxing.
490
+ * Transmuxing with our internal transmuxer failed.
491
+ * <br> error.data[0] is the segment URI that triggered the error, if any.
489
492
  */
490
493
  'TRANSMUXING_FAILED': 3018,
491
494
 
492
495
  /**
493
496
  * Content transformations required by the platform could not be performed for
494
497
  * some reason (unsupported container, etc.)
495
- *
496
- * @see https://github.com/shaka-project/shaka-player/issues/2759
498
+ * <br> @see https://github.com/shaka-project/shaka-player/issues/2759
499
+ * <br> error.data[0] is the segment URI that triggered the error, if any.
497
500
  */
498
501
  'CONTENT_TRANSFORMATION_FAILED': 3019,
499
502
 
500
503
  /**
501
504
  * Important data is missing to be able to do the transmuxing of MSS.
505
+ * <br> error.data[0] is the segment URI that triggered the error, if any.
502
506
  */
503
507
  'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
504
508
 
505
- /**
506
- * MSS transmuing failed for unknown codec.
507
- * <br> error.data[0] is a unknown codec.
508
- */
509
- 'MSS_TRANSMUXING_CODEC_UNKNOWN': 3021,
509
+ // RETIRED: 'MSS_TRANSMUXING_CODEC_UNKNOWN': 3021,
510
510
 
511
511
  /**
512
512
  * MSS transmuing failed for unknown reason.
513
+ * <br> error.data[0] is the segment URI that triggered the error, if any.
513
514
  */
514
515
  'MSS_TRANSMUXING_FAILED': 3022,
515
516
 
516
517
  /**
517
518
  * An internal error which indicates that transmuxing operation has no video
518
519
  * data. This should not be seen by applications.
520
+ * <br> error.data[0] is the segment URI that triggered the error, if any.
519
521
  */
520
522
  'TRANSMUXING_NO_VIDEO_DATA': 3023,
521
523
 
@@ -41,8 +41,7 @@ shaka.util.ObjectUtils = class {
41
41
 
42
42
  // This covers Uint8Array and friends, even without a TypedArray
43
43
  // base-class constructor.
44
- const isTypedArray =
45
- val.buffer && val.buffer.constructor == ArrayBuffer;
44
+ const isTypedArray = val.buffer instanceof ArrayBuffer;
46
45
  if (isTypedArray) {
47
46
  return val;
48
47
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shaka-player",
3
3
  "description": "DASH/EME video player library",
4
- "version": "4.9.0",
4
+ "version": "4.9.1",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -46,6 +46,10 @@ shaka.ui.AudioLanguageSelection = class extends shaka.ui.SettingsMenu {
46
46
  });
47
47
 
48
48
 
49
+ this.eventManager.listen(this.player, 'loading', () => {
50
+ this.onTracksChanged_();
51
+ });
52
+
49
53
  this.eventManager.listen(this.player, 'trackschanged', () => {
50
54
  this.onTracksChanged_();
51
55
  });
@@ -50,6 +50,10 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
50
50
  });
51
51
 
52
52
 
53
+ this.eventManager.listen(this.player, 'loading', () => {
54
+ this.updateResolutionSelection_();
55
+ });
56
+
53
57
  this.eventManager.listen(this.player, 'variantchanged', () => {
54
58
  this.updateResolutionSelection_();
55
59
  });
@@ -64,6 +64,10 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
64
64
  this.updateTextLanguages_();
65
65
  });
66
66
 
67
+ this.eventManager.listen(this.player, 'loading', () => {
68
+ this.onTracksChanged_();
69
+ });
70
+
67
71
  this.eventManager.listen(this.player, 'texttrackvisibility', () => {
68
72
  this.onCaptionStateChange_();
69
73
  this.updateTextLanguages_();