shaka-player 4.0.2 → 4.1.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 (86) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +36 -16
  3. package/CONTRIBUTORS +2 -0
  4. package/build/test.py +1 -1
  5. package/demo/common/assets.js +1 -1
  6. package/demo/common/message_ids.js +1 -0
  7. package/demo/config.js +3 -1
  8. package/demo/locales/en.json +1 -0
  9. package/demo/locales/source.json +4 -0
  10. package/demo/main.js +3 -3
  11. package/dist/demo.compiled.debug.js +7 -7
  12. package/dist/demo.compiled.debug.map +2 -2
  13. package/dist/demo.compiled.js +7 -7
  14. package/dist/demo.compiled.map +2 -2
  15. package/dist/deps.js +2 -2
  16. package/dist/locales.js +30 -30
  17. package/dist/receiver.compiled.debug.js +3 -3
  18. package/dist/receiver.compiled.debug.map +2 -2
  19. package/dist/receiver.compiled.js +3 -3
  20. package/dist/receiver.compiled.map +2 -2
  21. package/dist/shaka-player.compiled.d.ts +14 -8
  22. package/dist/shaka-player.compiled.debug.d.ts +14 -8
  23. package/dist/shaka-player.compiled.debug.externs.js +13 -4
  24. package/dist/shaka-player.compiled.debug.js +296 -282
  25. package/dist/shaka-player.compiled.debug.map +4 -4
  26. package/dist/shaka-player.compiled.externs.js +13 -4
  27. package/dist/shaka-player.compiled.js +781 -773
  28. package/dist/shaka-player.compiled.map +4 -4
  29. package/dist/shaka-player.ui.d.ts +15 -9
  30. package/dist/shaka-player.ui.debug.d.ts +15 -9
  31. package/dist/shaka-player.ui.debug.externs.js +13 -4
  32. package/dist/shaka-player.ui.debug.js +345 -326
  33. package/dist/shaka-player.ui.debug.map +4 -4
  34. package/dist/shaka-player.ui.externs.js +13 -4
  35. package/dist/shaka-player.ui.js +955 -949
  36. package/dist/shaka-player.ui.map +4 -4
  37. package/docs/design/chromecast.md +3 -1
  38. package/docs/tutorials/drm-config.md +16 -0
  39. package/docs/tutorials/ui.md +26 -0
  40. package/externs/chromecast.js +9 -2
  41. package/externs/shaka/manifest.js +7 -0
  42. package/externs/shaka/player.js +25 -4
  43. package/externs/shaka/text.js +7 -0
  44. package/lib/cast/cast_proxy.js +19 -8
  45. package/lib/cast/cast_receiver.js +3 -3
  46. package/lib/cast/cast_sender.js +12 -2
  47. package/lib/hls/hls_parser.js +189 -69
  48. package/lib/media/drm_engine.js +17 -8
  49. package/lib/media/gap_jumping_controller.js +23 -1
  50. package/lib/media/playhead.js +47 -4
  51. package/lib/media/segment_index.js +26 -1
  52. package/lib/media/segment_reference.js +10 -3
  53. package/lib/media/stall_detector.js +19 -2
  54. package/lib/media/streaming_engine.js +9 -2
  55. package/lib/offline/manifest_converter.js +1 -0
  56. package/lib/player.js +175 -69
  57. package/lib/text/cue.js +6 -0
  58. package/lib/text/ui_text_displayer.js +1 -0
  59. package/lib/text/vtt_text_parser.js +4 -0
  60. package/lib/util/error.js +6 -0
  61. package/lib/util/fake_event.js +39 -0
  62. package/lib/util/player_configuration.js +2 -0
  63. package/lib/util/stats.js +28 -1
  64. package/lib/util/stream_utils.js +8 -0
  65. package/package.json +2 -2
  66. package/test/cast/cast_proxy_unit.js +3 -1
  67. package/test/cast/cast_sender_unit.js +21 -6
  68. package/test/demo/demo_unit.js +2 -1
  69. package/test/hls/hls_parser_unit.js +102 -8
  70. package/test/media/adaptation_set_unit.js +1 -0
  71. package/test/media/playhead_unit.js +114 -25
  72. package/test/media/stall_detector_unit.js +20 -2
  73. package/test/media/streaming_engine_integration.js +2 -1
  74. package/test/media/streaming_engine_unit.js +1 -0
  75. package/test/player_integration.js +3 -0
  76. package/test/player_unit.js +142 -1
  77. package/test/test/util/manifest_generator.js +2 -0
  78. package/test/test/util/simple_fakes.js +14 -0
  79. package/test/test/util/streaming_engine_util.js +1 -0
  80. package/test/text/vtt_text_parser_unit.js +4 -0
  81. package/test/ui/ui_unit.js +18 -5
  82. package/test/util/stream_utils_unit.js +108 -0
  83. package/ui/controls.js +12 -8
  84. package/ui/externs/ui.js +10 -1
  85. package/ui/statistics_button.js +10 -0
  86. package/ui/ui.js +12 -1
@@ -198,6 +198,7 @@ shaka.util.Error.Code = {
198
198
  'MALFORMED_TEST_URI': 1008,
199
199
  'UNEXPECTED_TEST_REQUEST': 1009,
200
200
  'ATTEMPTS_EXHAUSTED': 1010,
201
+ 'SEGMENT_MISSING': 1011,
201
202
  'INVALID_TEXT_HEADER': 2000,
202
203
  'INVALID_TEXT_CUE': 2001,
203
204
  'UNABLE_TO_DETECT_ENCODING': 2003,
@@ -651,6 +652,10 @@ shaka.text.Cue.prototype.backgroundImage;
651
652
  * @override
652
653
  */
653
654
  shaka.text.Cue.prototype.border;
655
+ /**
656
+ * @override
657
+ */
658
+ shaka.text.Cue.prototype.textShadow;
654
659
  /**
655
660
  * @override
656
661
  */
@@ -1798,8 +1803,9 @@ shaka.media.SegmentReference = class {
1798
1803
  * If not provided, the duration should be automatically calculated based on
1799
1804
  * the duration of the reference.
1800
1805
  * @param {?number=} syncTime
1801
- * A time value, expressed in the same scale as the start and end time, which
1802
- * is used to synchronize between streams.
1806
+ * A time value, expressed in seconds since 1970, which is used to
1807
+ * synchronize between streams. Both produced and consumed by the HLS
1808
+ * parser. Other components should not need this value.
1803
1809
  * @param {shaka.media.SegmentReference.Status=} status
1804
1810
  * The segment status is used to indicate that a segment does not exist or is
1805
1811
  * not available.
@@ -3301,8 +3307,10 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
3301
3307
  * @param {string} receiverAppId The ID of the cast receiver application.
3302
3308
  * If blank, casting will not be available, but the proxy will still
3303
3309
  * function otherwise.
3310
+ * @param {boolean} androidReceiverCompatible Indicates if the app is
3311
+ * compatible with an Android Receiver.
3304
3312
  */
3305
- constructor(video, player, receiverAppId) {}
3313
+ constructor(video, player, receiverAppId, androidReceiverCompatible) {}
3306
3314
  /**
3307
3315
  * Destroys the proxy and the underlying local Player.
3308
3316
  * @param {boolean=} forceDisconnect If true, force the receiver app to shut
@@ -3357,8 +3365,9 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
3357
3365
  forceDisconnect() {}
3358
3366
  /**
3359
3367
  * @param {string} newAppId
3368
+ * @param {boolean=} newCastAndroidReceiver
3360
3369
  */
3361
- changeReceiverId(newAppId) {}
3370
+ changeReceiverId(newAppId, newCastAndroidReceiver) {}
3362
3371
  };
3363
3372
  /**
3364
3373
  * A receiver to communicate between the Chromecast-hosted player and the