shaka-player 4.0.4 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +41 -34
  2. package/CONTRIBUTORS +1 -0
  3. package/demo/common/message_ids.js +1 -0
  4. package/demo/config.js +3 -1
  5. package/demo/locales/en.json +1 -0
  6. package/demo/locales/source.json +4 -0
  7. package/dist/demo.compiled.debug.js +4 -4
  8. package/dist/demo.compiled.debug.map +2 -2
  9. package/dist/demo.compiled.js +4 -4
  10. package/dist/demo.compiled.map +2 -2
  11. package/dist/deps.js +2 -2
  12. package/dist/locales.js +30 -30
  13. package/dist/receiver.compiled.debug.js +2 -2
  14. package/dist/receiver.compiled.debug.map +2 -2
  15. package/dist/receiver.compiled.js +2 -2
  16. package/dist/receiver.compiled.map +2 -2
  17. package/dist/shaka-player.compiled.d.ts +14 -8
  18. package/dist/shaka-player.compiled.debug.d.ts +14 -8
  19. package/dist/shaka-player.compiled.debug.externs.js +10 -2
  20. package/dist/shaka-player.compiled.debug.js +168 -160
  21. package/dist/shaka-player.compiled.debug.map +3 -3
  22. package/dist/shaka-player.compiled.externs.js +10 -2
  23. package/dist/shaka-player.compiled.js +767 -764
  24. package/dist/shaka-player.compiled.map +3 -3
  25. package/dist/shaka-player.ui.d.ts +15 -9
  26. package/dist/shaka-player.ui.debug.d.ts +15 -9
  27. package/dist/shaka-player.ui.debug.externs.js +10 -2
  28. package/dist/shaka-player.ui.debug.js +201 -189
  29. package/dist/shaka-player.ui.debug.map +3 -3
  30. package/dist/shaka-player.ui.externs.js +10 -2
  31. package/dist/shaka-player.ui.js +934 -931
  32. package/dist/shaka-player.ui.map +3 -3
  33. package/docs/design/chromecast.md +3 -1
  34. package/docs/tutorials/drm-config.md +16 -0
  35. package/docs/tutorials/ui.md +26 -0
  36. package/externs/chromecast.js +9 -2
  37. package/externs/shaka/manifest.js +7 -0
  38. package/externs/shaka/player.js +21 -2
  39. package/externs/shaka/text.js +7 -0
  40. package/lib/cast/cast_proxy.js +19 -8
  41. package/lib/cast/cast_receiver.js +3 -3
  42. package/lib/cast/cast_sender.js +12 -2
  43. package/lib/hls/hls_parser.js +12 -1
  44. package/lib/media/drm_engine.js +17 -8
  45. package/lib/media/gap_jumping_controller.js +23 -1
  46. package/lib/media/playhead.js +47 -4
  47. package/lib/media/stall_detector.js +19 -2
  48. package/lib/media/streaming_engine.js +8 -1
  49. package/lib/offline/manifest_converter.js +1 -0
  50. package/lib/player.js +175 -69
  51. package/lib/text/cue.js +6 -0
  52. package/lib/text/ui_text_displayer.js +1 -0
  53. package/lib/text/vtt_text_parser.js +4 -0
  54. package/lib/util/error.js +6 -0
  55. package/lib/util/fake_event.js +39 -0
  56. package/lib/util/player_configuration.js +2 -0
  57. package/lib/util/stats.js +28 -1
  58. package/lib/util/stream_utils.js +7 -0
  59. package/package.json +1 -1
  60. package/test/cast/cast_proxy_unit.js +3 -1
  61. package/test/cast/cast_sender_unit.js +21 -6
  62. package/test/demo/demo_unit.js +2 -1
  63. package/test/media/adaptation_set_unit.js +1 -0
  64. package/test/media/playhead_unit.js +114 -25
  65. package/test/media/stall_detector_unit.js +20 -2
  66. package/test/media/streaming_engine_integration.js +2 -1
  67. package/test/media/streaming_engine_unit.js +1 -0
  68. package/test/player_integration.js +3 -0
  69. package/test/player_unit.js +142 -1
  70. package/test/test/util/manifest_generator.js +2 -0
  71. package/test/test/util/simple_fakes.js +14 -0
  72. package/test/test/util/streaming_engine_util.js +1 -0
  73. package/test/text/vtt_text_parser_unit.js +4 -0
  74. package/test/ui/ui_unit.js +18 -5
  75. package/test/util/stream_utils_unit.js +108 -0
  76. package/ui/controls.js +12 -8
  77. package/ui/externs/ui.js +10 -1
  78. package/ui/statistics_button.js +10 -0
  79. 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
  */
@@ -3313,8 +3318,10 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
3313
3318
  * @param {string} receiverAppId The ID of the cast receiver application.
3314
3319
  * If blank, casting will not be available, but the proxy will still
3315
3320
  * function otherwise.
3321
+ * @param {boolean} androidReceiverCompatible Indicates if the app is
3322
+ * compatible with an Android Receiver.
3316
3323
  */
3317
- constructor(video, player, receiverAppId) {}
3324
+ constructor(video, player, receiverAppId, androidReceiverCompatible) {}
3318
3325
  /**
3319
3326
  * Destroys the proxy and the underlying local Player.
3320
3327
  * @param {boolean=} forceDisconnect If true, force the receiver app to shut
@@ -3369,8 +3376,9 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
3369
3376
  forceDisconnect() {}
3370
3377
  /**
3371
3378
  * @param {string} newAppId
3379
+ * @param {boolean=} newCastAndroidReceiver
3372
3380
  */
3373
- changeReceiverId(newAppId) {}
3381
+ changeReceiverId(newAppId, newCastAndroidReceiver) {}
3374
3382
  };
3375
3383
  /**
3376
3384
  * A receiver to communicate between the Chromecast-hosted player and the