shaka-player 2.5.1 → 2.5.5

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 (166) hide show
  1. package/.csslintrc +13 -0
  2. package/AUTHORS +3 -0
  3. package/CHANGELOG.md +156 -0
  4. package/CONTRIBUTORS +3 -0
  5. package/README.md +3 -0
  6. package/build/README.md +5 -5
  7. package/build/apps.py +3 -1
  8. package/build/build.py +5 -2
  9. package/build/check.py +17 -0
  10. package/build/compiler.py +49 -0
  11. package/build/conformance.textproto +1 -0
  12. package/build/docs.py +0 -6
  13. package/build/generateExterns.js +72 -20
  14. package/build/install-linux-prereqs.sh +4 -4
  15. package/build/shakaBuildHelpers.py +7 -8
  16. package/build/test.py +21 -9
  17. package/build/types/core +1 -0
  18. package/build/types/ui +6 -1
  19. package/demo/asset_card.js +129 -41
  20. package/demo/cast_receiver/receiver_app.css +27 -13
  21. package/demo/close_button.js +10 -15
  22. package/demo/common/asset.js +6 -6
  23. package/demo/common/assets.js +72 -14
  24. package/demo/config.js +28 -25
  25. package/demo/custom.js +20 -16
  26. package/demo/demo.less +107 -16
  27. package/demo/demo_uncompiled.js +33 -0
  28. package/demo/demo_utils.js +4 -3
  29. package/demo/front.js +12 -8
  30. package/demo/index.html +14 -17
  31. package/demo/input.js +30 -23
  32. package/demo/input_container.js +15 -11
  33. package/demo/load.js +5 -7
  34. package/demo/main.js +138 -49
  35. package/demo/search.js +40 -36
  36. package/demo/service_worker.js +1 -1
  37. package/demo/tooltip.js +16 -24
  38. package/dist/.csslintstamp +0 -0
  39. package/dist/controls.css +1 -1
  40. package/dist/controls.css.map +1 -1
  41. package/dist/demo.compiled.debug.js +165 -152
  42. package/dist/demo.compiled.debug.map +4 -4
  43. package/dist/demo.compiled.js +165 -152
  44. package/dist/demo.compiled.map +4 -4
  45. package/dist/demo.css +1 -1
  46. package/dist/demo.css.map +1 -1
  47. package/dist/deps.js +28 -11
  48. package/dist/receiver.compiled.debug.js +11 -11
  49. package/dist/receiver.compiled.debug.map +3 -3
  50. package/dist/receiver.compiled.js +11 -11
  51. package/dist/receiver.compiled.map +3 -3
  52. package/dist/shaka-player.compiled.debug.externs.js +232 -102
  53. package/dist/shaka-player.compiled.debug.js +189 -165
  54. package/dist/shaka-player.compiled.debug.map +4 -4
  55. package/dist/shaka-player.compiled.externs.js +232 -102
  56. package/dist/shaka-player.compiled.js +567 -553
  57. package/dist/shaka-player.compiled.map +4 -4
  58. package/dist/shaka-player.ui.debug.externs.js +338 -113
  59. package/dist/shaka-player.ui.debug.js +296 -276
  60. package/dist/shaka-player.ui.debug.map +4 -4
  61. package/dist/shaka-player.ui.externs.js +338 -113
  62. package/dist/shaka-player.ui.js +685 -671
  63. package/dist/shaka-player.ui.map +4 -4
  64. package/docs/tutorials/drm-config.md +1 -0
  65. package/docs/tutorials/fairplay.md +77 -0
  66. package/docs/tutorials/index.json +1 -0
  67. package/docs/tutorials/manifest-parser.md +1 -1
  68. package/docs/tutorials/ui-customization.md +5 -2
  69. package/docs/tutorials/ui.md +10 -4
  70. package/docs/tutorials/welcome.md +2 -2
  71. package/externs/mediasession.js +16 -1
  72. package/externs/shaka/net.js +14 -4
  73. package/externs/shaka/player.js +136 -90
  74. package/externs/tippy.js +30 -0
  75. package/externs/webkitmediakeys.js +4 -0
  76. package/karma.conf.js +30 -24
  77. package/lib/cast/cast_proxy.js +94 -23
  78. package/lib/cast/cast_receiver.js +8 -1
  79. package/lib/dash/content_protection.js +33 -1
  80. package/lib/dash/dash_parser.js +13 -5
  81. package/lib/hls/hls_parser.js +20 -4
  82. package/lib/media/drm_engine.js +29 -2
  83. package/lib/media/media_source_engine.js +9 -6
  84. package/lib/media/play_rate_controller.js +14 -3
  85. package/lib/media/playhead.js +8 -3
  86. package/lib/media/streaming_engine.js +68 -20
  87. package/lib/media/transmuxer.js +2 -2
  88. package/lib/media/video_wrapper.js +8 -3
  89. package/lib/net/data_uri_plugin.js +5 -2
  90. package/lib/net/http_fetch_plugin.js +3 -3
  91. package/lib/net/http_plugin_utils.js +2 -4
  92. package/lib/net/http_xhr_plugin.js +2 -2
  93. package/lib/net/networking_engine.js +1 -0
  94. package/lib/offline/offline_scheme.js +7 -2
  95. package/lib/player.js +18 -8
  96. package/lib/polyfill/input_event.js +7 -11
  97. package/lib/polyfill/mediasource.js +1 -1
  98. package/lib/polyfill/patchedmediakeys_apple.js +2 -72
  99. package/lib/text/cue.js +1 -1
  100. package/lib/text/ttml_text_parser.js +1 -1
  101. package/lib/util/config_utils.js +1 -0
  102. package/lib/util/error.js +45 -11
  103. package/lib/util/event_manager.js +211 -100
  104. package/lib/util/fairplay_utils.js +122 -0
  105. package/lib/util/i_releasable.js +1 -0
  106. package/lib/util/player_configuration.js +7 -0
  107. package/lib/util/pssh.js +41 -0
  108. package/lib/util/string_utils.js +42 -6
  109. package/lib/util/timer.js +1 -1
  110. package/package.json +33 -33
  111. package/roadmap.md +96 -0
  112. package/shaka-player.uncompiled.js +5 -1
  113. package/test/dash/dash_parser_content_protection_unit.js +35 -1
  114. package/test/dash/dash_parser_manifest_unit.js +60 -0
  115. package/test/hls/hls_live_unit.js +7 -1
  116. package/test/hls/hls_parser_unit.js +50 -0
  117. package/test/media/drm_engine_unit.js +10 -4
  118. package/test/media/media_source_engine_integration.js +12 -0
  119. package/test/media/media_source_engine_unit.js +3 -1
  120. package/test/media/playhead_unit.js +7 -5
  121. package/test/media/streaming_engine_unit.js +46 -1
  122. package/test/media/transmuxer_integration.js +13 -0
  123. package/test/net/data_uri_plugin_unit.js +13 -2
  124. package/test/net/http_plugin_unit.js +17 -12
  125. package/test/net/networking_engine_unit.js +17 -8
  126. package/test/offline/offline_scheme_unit.js +18 -8
  127. package/test/player_external.js +3 -2
  128. package/test/player_integration.js +94 -3
  129. package/test/player_src_equals_integration.js +2 -2
  130. package/test/player_unit.js +21 -8
  131. package/test/test/boot.js +20 -5
  132. package/test/test/externs/jasmine.js +48 -0
  133. package/test/test/util/expect_async_polyfill.js +145 -0
  134. package/test/test/util/fake_networking_engine.js +1 -0
  135. package/test/test/util/manifest_generator.js +2 -1
  136. package/test/test/util/test_scheme.js +34 -2
  137. package/test/test/util/ui_utils.js +41 -0
  138. package/test/test/util/util.js +16 -8
  139. package/test/ui/ui_unit.js +130 -4
  140. package/ui/audio_language_selection.js +17 -96
  141. package/ui/big_play_button.js +61 -0
  142. package/ui/controls.js +226 -335
  143. package/ui/controls.less +3 -5
  144. package/ui/element.js +24 -6
  145. package/ui/externs/ui.js +62 -9
  146. package/ui/fullscreen_button.js +2 -52
  147. package/ui/less/buttons.less +10 -16
  148. package/ui/less/containers.less +75 -20
  149. package/ui/less/general.less +18 -2
  150. package/ui/less/other_elements.less +2 -1
  151. package/ui/less/overflow_menu.less +11 -10
  152. package/ui/less/range_elements.less +12 -10
  153. package/ui/less/spinner.less +2 -0
  154. package/ui/overflow_menu.js +1 -1
  155. package/ui/pip_button.js +1 -1
  156. package/ui/{play_pause_button.js → play_button.js} +17 -47
  157. package/ui/presentation_time.js +17 -12
  158. package/ui/range_element.js +176 -0
  159. package/ui/resolution_selection.js +43 -106
  160. package/ui/seek_bar.js +204 -0
  161. package/ui/settings_menu.js +113 -0
  162. package/ui/small_play_button.js +73 -0
  163. package/ui/text_displayer.js +17 -14
  164. package/ui/text_selection.js +42 -107
  165. package/ui/ui.js +17 -40
  166. package/ui/volume_bar.js +40 -68
@@ -216,7 +216,7 @@ shaka.util.Timer = class {
216
216
  */
217
217
  tickNow() {}
218
218
  /**
219
- * Have the timer call |onTick| after |seconds| has elasped unless |stop| is
219
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
220
220
  * called first.
221
221
  * @param {number} seconds
222
222
  * @return {!shaka.util.Timer}
@@ -373,6 +373,8 @@ shaka.util.Error.Code = {
373
373
  'NO_LICENSE_SERVER_GIVEN': 6012,
374
374
  'OFFLINE_SESSION_REMOVED': 6013,
375
375
  'EXPIRED': 6014,
376
+ 'SERVER_CERTIFICATE_REQUIRED': 6015,
377
+ 'INIT_DATA_TRANSFORM_ERROR': 6016,
376
378
  'LOAD_INTERRUPTED': 7000,
377
379
  'OPERATION_ABORTED': 7001,
378
380
  'NO_VIDEO_ELEMENT': 7002,
@@ -383,6 +385,7 @@ shaka.util.Error.Code = {
383
385
  'CAST_CANCELED_BY_USER': 8004,
384
386
  'CAST_CONNECTION_TIMED_OUT': 8005,
385
387
  'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
388
+ 'CAST_RECEIVER_APP_ID_MISSING': 8007,
386
389
  'STORAGE_NOT_SUPPORTED': 9000,
387
390
  'INDEXED_DB_ERROR': 9001,
388
391
  'DEPRECATED_OPERATION_ABORTED': 9002,
@@ -624,6 +627,99 @@ shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOp
624
627
  */
625
628
  constructor(promise,onAbort,numBytesRemainingObj) {}
626
629
  };
630
+ /**
631
+ * An interface to standardize how objects release internal references
632
+ * synchronously. If an object needs to asynchronously release references, then
633
+ * it should use 'shaka.util.IDestroyable'.
634
+ * @interface
635
+ */
636
+ shaka.util.IReleasable = class {
637
+ /**
638
+ * Request that this object release all internal references.
639
+ */
640
+ release() {}
641
+ };
642
+ /**
643
+ * @summary
644
+ * An EventManager maintains a collection of "event
645
+ * bindings" between event targets and event listeners.
646
+ * @implements {shaka.util.IReleasable}
647
+ */
648
+ shaka.util.EventManager = class {
649
+ constructor() {}
650
+ /**
651
+ * Detaches all event listeners.
652
+ * @override
653
+ */
654
+ release() {}
655
+ /**
656
+ * Attaches an event listener to an event target.
657
+ * @param {EventTarget} target The event target.
658
+ * @param {string} type The event type.
659
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
660
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
661
+ * specifies characteristics about the event listener.
662
+ * The passive option, if true, indicates that this function will never
663
+ * call preventDefault(), which improves scrolling performance.
664
+ */
665
+ listen(target,type,listener,options) {}
666
+ /**
667
+ * Attaches an event listener to an event target. The listener will be
668
+ * removed when the first instance of the event is fired.
669
+ * @param {EventTarget} target The event target.
670
+ * @param {string} type The event type.
671
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
672
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
673
+ * specifies characteristics about the event listener.
674
+ * The passive option, if true, indicates that this function will never
675
+ * call preventDefault(), which improves scrolling performance.
676
+ */
677
+ listenOnce(target,type,listener,options) {}
678
+ /**
679
+ * Detaches an event listener from an event target.
680
+ * @param {EventTarget} target The event target.
681
+ * @param {string} type The event type.
682
+ * @param {shaka.util.EventManager.ListenerType=} listener The event listener.
683
+ */
684
+ unlisten(target,type,listener) {}
685
+ /**
686
+ * Detaches all event listeners from all targets.
687
+ */
688
+ removeAll() {}
689
+ };
690
+ /**
691
+ * @typedef {function(!Event)}
692
+ */
693
+ shaka.util.EventManager.ListenerType;
694
+ /**
695
+ * @summary A set of FairPlay utility functions.
696
+ */
697
+ shaka.util.FairPlayUtils = class {
698
+ /**
699
+ * Using the default method, extract a content ID from the init data. This is
700
+ * based on the FairPlay example documentation.
701
+ * @param {!BufferSource} initData
702
+ * @return {string}
703
+ */
704
+ static defaultGetContentId(initData) {}
705
+ /**
706
+ * Transforms the init data buffer using the given data. The format is:
707
+ * <pre>
708
+ * [4 bytes] initDataSize
709
+ * [initDataSize bytes] initData
710
+ * [4 bytes] contentIdSize
711
+ * [contentIdSize bytes] contentId
712
+ * [4 bytes] certSize
713
+ * [certSize bytes] cert
714
+ * </pre>
715
+ * @param {!BufferSource} initData
716
+ * @param {!BufferSource|string} contentId
717
+ * @param {?BufferSource} cert The server certificate; this will throw if not
718
+ * provided.
719
+ * @return {!Uint8Array}
720
+ */
721
+ static initDataTransform(initData,contentId,cert) {}
722
+ };
627
723
  /**
628
724
  * Creates a string from the given buffer as UTF-8 encoding.
629
725
  * @param {?BufferSource} data
@@ -1110,6 +1206,10 @@ shaka.cast.CastProxy.prototype.setAppData = function(appData) {};
1110
1206
  * Show a dialog where user can choose to disconnect from the cast connection.
1111
1207
  */
1112
1208
  shaka.cast.CastProxy.prototype.suggestDisconnect = function() {};
1209
+ /**
1210
+ * @param {string} newAppId
1211
+ */
1212
+ shaka.cast.CastProxy.prototype.changeReceiverId = function(newAppId) {};
1113
1213
  /**
1114
1214
  * Force the receiver app to shut down by disconnecting.
1115
1215
  */
@@ -1123,7 +1223,10 @@ shaka.cast.CastProxy.prototype.forceDisconnect = function() {};
1123
1223
  * local Player instance.
1124
1224
  * @param {!shaka.Player} player A local Player instance.
1125
1225
  * @param {function(Object)=} appDataCallback A callback to handle
1126
- * application-specific data passed from the sender.
1226
+ * application-specific data passed from the sender. This can come either
1227
+ * from a Shaka-based sender through CastProxy.setAppData, or from a
1228
+ * sender using the customData field of the LOAD message of the standard
1229
+ * Cast message namespace. It can also be null if no such data is sent.
1127
1230
  * @param {function(string):string=} contentIdCallback A callback to
1128
1231
  * retrieve manifest URI from the provided content id.
1129
1232
  * @implements {shaka.util.IDestroyable}
@@ -1144,98 +1247,6 @@ shaka.cast.CastReceiver.prototype.isIdle = function() {};
1144
1247
  * @override
1145
1248
  */
1146
1249
  shaka.cast.CastReceiver.prototype.destroy = function() {};
1147
- /**
1148
- * Creates an InitSegmentReference, which provides the location to an
1149
- * initialization segment.
1150
- * @param {function():!Array.<string>} uris A function that creates the URIs of
1151
- * the resource containing the segment.
1152
- * @param {number} startByte The offset from the start of the resource to the
1153
- * start of the segment.
1154
- * @param {?number} endByte The offset from the start of the resource to the
1155
- * end of the segment, inclusive. A value of null indicates that the segment
1156
- * extends to the end of the resource.
1157
- * @constructor
1158
- * @struct
1159
- */
1160
- shaka.media.InitSegmentReference = function(uris, startByte, endByte) {};
1161
- /**
1162
- * Creates the URIs of the resource containing the segment.
1163
- * @return {!Array.<string>}
1164
- */
1165
- shaka.media.InitSegmentReference.prototype.createUris = function() {};
1166
- /**
1167
- * Returns the offset from the start of the resource to the
1168
- * start of the segment.
1169
- * @return {number}
1170
- */
1171
- shaka.media.InitSegmentReference.prototype.getStartByte = function() {};
1172
- /**
1173
- * Returns the offset from the start of the resource to the end of the segment,
1174
- * inclusive. A value of null indicates that the segment extends to the end of
1175
- * the resource.
1176
- * @return {?number}
1177
- */
1178
- shaka.media.InitSegmentReference.prototype.getEndByte = function() {};
1179
- /**
1180
- * Creates a SegmentReference, which provides the start time, end time, and
1181
- * location to a media segment.
1182
- * @param {number} position The segment's position within a particular Period.
1183
- * The following should hold true between any two SegmentReferences from the
1184
- * same Period, r1 and r2:
1185
- * IF r2.position > r1.position THEN
1186
- * [ (r2.startTime > r1.startTime) OR
1187
- * (r2.startTime == r1.startTime AND r2.endTime >= r1.endTime) ]
1188
- * @param {number} startTime The segment's start time in seconds, relative to
1189
- * the start of a particular Period.
1190
- * @param {number} endTime The segment's end time in seconds, relative to
1191
- * the start of a particular Period. The segment ends the instant before
1192
- * this time, so |endTime| must be strictly greater than |startTime|.
1193
- * @param {function():!Array.<string>} uris
1194
- * A function that creates the URIs of the resource containing the segment.
1195
- * @param {number} startByte The offset from the start of the resource to the
1196
- * start of the segment.
1197
- * @param {?number} endByte The offset from the start of the resource to the
1198
- * end of the segment, inclusive. A value of null indicates that the segment
1199
- * extends to the end of the resource.
1200
- * @constructor
1201
- * @struct
1202
- */
1203
- shaka.media.SegmentReference = function(position, startTime, endTime, uris, startByte, endByte) {};
1204
- /**
1205
- * Returns the segment's position within a particular Period.
1206
- * @return {number} The segment's position.
1207
- */
1208
- shaka.media.SegmentReference.prototype.getPosition = function() {};
1209
- /**
1210
- * Returns the segment's start time in seconds, relative to
1211
- * the start of a particular Period.
1212
- * @return {number}
1213
- */
1214
- shaka.media.SegmentReference.prototype.getStartTime = function() {};
1215
- /**
1216
- * Returns the segment's end time in seconds, relative to
1217
- * the start of a particular Period.
1218
- * @return {number}
1219
- */
1220
- shaka.media.SegmentReference.prototype.getEndTime = function() {};
1221
- /**
1222
- * Creates the URIs of the resource containing the segment.
1223
- * @return {!Array.<string>}
1224
- */
1225
- shaka.media.SegmentReference.prototype.createUris = function() {};
1226
- /**
1227
- * Returns the offset from the start of the resource to the
1228
- * start of the segment.
1229
- * @return {number}
1230
- */
1231
- shaka.media.SegmentReference.prototype.getStartByte = function() {};
1232
- /**
1233
- * Returns the offset from the start of the resource to the end of the segment,
1234
- * inclusive. A value of null indicates that the segment extends to the end of
1235
- * the resource.
1236
- * @return {?number}
1237
- */
1238
- shaka.media.SegmentReference.prototype.getEndByte = function() {};
1239
1250
  /**
1240
1251
  * Creates a DataViewReader, which abstracts a DataView object.
1241
1252
  * @param {!DataView} dataView The DataView.
@@ -1404,6 +1415,98 @@ shaka.util.Mp4Parser.allData = function(callback) {};
1404
1415
  * @return {string}
1405
1416
  */
1406
1417
  shaka.util.Mp4Parser.typeToString = function(type) {};
1418
+ /**
1419
+ * Creates an InitSegmentReference, which provides the location to an
1420
+ * initialization segment.
1421
+ * @param {function():!Array.<string>} uris A function that creates the URIs of
1422
+ * the resource containing the segment.
1423
+ * @param {number} startByte The offset from the start of the resource to the
1424
+ * start of the segment.
1425
+ * @param {?number} endByte The offset from the start of the resource to the
1426
+ * end of the segment, inclusive. A value of null indicates that the segment
1427
+ * extends to the end of the resource.
1428
+ * @constructor
1429
+ * @struct
1430
+ */
1431
+ shaka.media.InitSegmentReference = function(uris, startByte, endByte) {};
1432
+ /**
1433
+ * Creates the URIs of the resource containing the segment.
1434
+ * @return {!Array.<string>}
1435
+ */
1436
+ shaka.media.InitSegmentReference.prototype.createUris = function() {};
1437
+ /**
1438
+ * Returns the offset from the start of the resource to the
1439
+ * start of the segment.
1440
+ * @return {number}
1441
+ */
1442
+ shaka.media.InitSegmentReference.prototype.getStartByte = function() {};
1443
+ /**
1444
+ * Returns the offset from the start of the resource to the end of the segment,
1445
+ * inclusive. A value of null indicates that the segment extends to the end of
1446
+ * the resource.
1447
+ * @return {?number}
1448
+ */
1449
+ shaka.media.InitSegmentReference.prototype.getEndByte = function() {};
1450
+ /**
1451
+ * Creates a SegmentReference, which provides the start time, end time, and
1452
+ * location to a media segment.
1453
+ * @param {number} position The segment's position within a particular Period.
1454
+ * The following should hold true between any two SegmentReferences from the
1455
+ * same Period, r1 and r2:
1456
+ * IF r2.position > r1.position THEN
1457
+ * [ (r2.startTime > r1.startTime) OR
1458
+ * (r2.startTime == r1.startTime AND r2.endTime >= r1.endTime) ]
1459
+ * @param {number} startTime The segment's start time in seconds, relative to
1460
+ * the start of a particular Period.
1461
+ * @param {number} endTime The segment's end time in seconds, relative to
1462
+ * the start of a particular Period. The segment ends the instant before
1463
+ * this time, so |endTime| must be strictly greater than |startTime|.
1464
+ * @param {function():!Array.<string>} uris
1465
+ * A function that creates the URIs of the resource containing the segment.
1466
+ * @param {number} startByte The offset from the start of the resource to the
1467
+ * start of the segment.
1468
+ * @param {?number} endByte The offset from the start of the resource to the
1469
+ * end of the segment, inclusive. A value of null indicates that the segment
1470
+ * extends to the end of the resource.
1471
+ * @constructor
1472
+ * @struct
1473
+ */
1474
+ shaka.media.SegmentReference = function(position, startTime, endTime, uris, startByte, endByte) {};
1475
+ /**
1476
+ * Returns the segment's position within a particular Period.
1477
+ * @return {number} The segment's position.
1478
+ */
1479
+ shaka.media.SegmentReference.prototype.getPosition = function() {};
1480
+ /**
1481
+ * Returns the segment's start time in seconds, relative to
1482
+ * the start of a particular Period.
1483
+ * @return {number}
1484
+ */
1485
+ shaka.media.SegmentReference.prototype.getStartTime = function() {};
1486
+ /**
1487
+ * Returns the segment's end time in seconds, relative to
1488
+ * the start of a particular Period.
1489
+ * @return {number}
1490
+ */
1491
+ shaka.media.SegmentReference.prototype.getEndTime = function() {};
1492
+ /**
1493
+ * Creates the URIs of the resource containing the segment.
1494
+ * @return {!Array.<string>}
1495
+ */
1496
+ shaka.media.SegmentReference.prototype.createUris = function() {};
1497
+ /**
1498
+ * Returns the offset from the start of the resource to the
1499
+ * start of the segment.
1500
+ * @return {number}
1501
+ */
1502
+ shaka.media.SegmentReference.prototype.getStartByte = function() {};
1503
+ /**
1504
+ * Returns the offset from the start of the resource to the end of the segment,
1505
+ * inclusive. A value of null indicates that the segment extends to the end of
1506
+ * the resource.
1507
+ * @return {?number}
1508
+ */
1509
+ shaka.media.SegmentReference.prototype.getEndByte = function() {};
1407
1510
  /**
1408
1511
  * Creates a SegmentIndex.
1409
1512
  * @param {!Array.<!shaka.media.SegmentReference>} references The list of
@@ -1649,10 +1752,12 @@ shaka.dash.DashParser.prototype.onExpirationUpdated = function(sessionId, expira
1649
1752
  * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
1650
1753
  * @param {string} uri
1651
1754
  * @param {shaka.extern.Request} request
1652
- * @param {shaka.net.NetworkingEngine.RequestType=} requestType
1755
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
1756
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1757
+ * progress event happened.
1653
1758
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1654
1759
  */
1655
- shaka.net.DataUriPlugin = function(uri, request, requestType) {};
1760
+ shaka.net.DataUriPlugin = function(uri, request, requestType, progressUpdated) {};
1656
1761
  /**
1657
1762
  * Creates a new HLS parser.
1658
1763
  * @struct
@@ -1686,8 +1791,8 @@ shaka.hls.HlsParser.prototype.onExpirationUpdated = function(sessionId, expirati
1686
1791
  * @param {string} uri
1687
1792
  * @param {shaka.extern.Request} request
1688
1793
  * @param {shaka.net.NetworkingEngine.RequestType} requestType
1689
- * @param {shaka.extern.ProgressUpdated=} progressUpdated Called when a progress
1690
- * event happened.
1794
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a progress
1795
+ * event happened.
1691
1796
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1692
1797
  */
1693
1798
  shaka.net.HttpFetchPlugin = function(uri, request, requestType, progressUpdated) {};
@@ -1704,8 +1809,8 @@ shaka.net.HttpFetchPlugin.isSupported = function() {};
1704
1809
  * @param {string} uri
1705
1810
  * @param {shaka.extern.Request} request
1706
1811
  * @param {shaka.net.NetworkingEngine.RequestType} requestType
1707
- * @param {shaka.extern.ProgressUpdated=} progressUpdated Called when a
1708
- * progress event happened.
1812
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1813
+ * progress event happened.
1709
1814
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1710
1815
  */
1711
1816
  shaka.net.HttpXHRPlugin = function(uri, request, requestType, progressUpdated) {};
@@ -1714,10 +1819,12 @@ shaka.net.HttpXHRPlugin = function(uri, request, requestType, progressUpdated) {
1714
1819
  * @summary A plugin that handles requests for offline content.
1715
1820
  * @param {string} uri
1716
1821
  * @param {shaka.extern.Request} request
1717
- * @param {shaka.net.NetworkingEngine.RequestType=} requestType
1822
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
1823
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1824
+ * progress event happened.
1718
1825
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1719
1826
  */
1720
- shaka.offline.OfflineScheme = function(uri, request, requestType) {};
1827
+ shaka.offline.OfflineScheme = function(uri, request, requestType, progressUpdated) {};
1721
1828
  /**
1722
1829
  * <p>
1723
1830
  * This defines the default text displayer plugin. An instance of this
@@ -1765,6 +1872,29 @@ shaka.text.SimpleTextDisplayer.prototype.setTextVisibility = function(on) {};
1765
1872
  * @return {boolean}
1766
1873
  */
1767
1874
  shaka.util.ConfigUtils.mergeConfigObjects = function(destination, source, template, overrides, path) {};
1875
+ /**
1876
+ * Convert config from ('fieldName', value) format to a partial config object.
1877
+ * E. g. from ('manifest.retryParameters.maxAttempts', 1) to
1878
+ * { manifest: { retryParameters: { maxAttempts: 1 }}}.
1879
+ * @param {string} fieldName
1880
+ * @param {*} value
1881
+ * @return {!Object}
1882
+ */
1883
+ shaka.util.ConfigUtils.convertToConfigObject = function(fieldName, value) {};
1884
+ /**
1885
+ * @final
1886
+ */
1887
+ shaka.util.PlayerConfiguration = class {
1888
+ /**
1889
+ * Merges the given configuration changes into the given destination. This
1890
+ * uses the default Player configurations as the template.
1891
+ * @param {shaka.extern.PlayerConfiguration} destination
1892
+ * @param {!Object} updates
1893
+ * @param {shaka.extern.PlayerConfiguration=} template
1894
+ * @return {boolean}
1895
+ */
1896
+ static mergeConfigObjects(destination,updates,template) {}
1897
+ };
1768
1898
  /**
1769
1899
  * Construct a Player.
1770
1900
  * @param {HTMLMediaElement=} mediaElement
@@ -2334,6 +2464,48 @@ shaka.ui.Element = class {
2334
2464
  */
2335
2465
  destroy() {}
2336
2466
  };
2467
+ /**
2468
+ * @protected {HTMLElement}
2469
+ */
2470
+ shaka.ui.Element.prototype.parent;
2471
+ /**
2472
+ * @protected {shaka.ui.Controls}
2473
+ */
2474
+ shaka.ui.Element.prototype.controls;
2475
+ /**
2476
+ * @protected {shaka.util.EventManager}
2477
+ */
2478
+ shaka.ui.Element.prototype.eventManager;
2479
+ /**
2480
+ * @protected {shaka.ui.Localization}
2481
+ */
2482
+ shaka.ui.Element.prototype.localization;
2483
+ /**
2484
+ * @protected {shaka.Player}
2485
+ */
2486
+ shaka.ui.Element.prototype.player;
2487
+ /**
2488
+ * @protected {HTMLMediaElement}
2489
+ */
2490
+ shaka.ui.Element.prototype.video;
2491
+ /**
2492
+ * A range element, built to work across browsers.
2493
+ * In particular, getting styles to work right on IE requires a specific
2494
+ * structure.
2495
+ * This also handles the case where the range element is being manipulated and
2496
+ * updated at the same time. This can happen when seeking during playback or
2497
+ * when casting.
2498
+ * @extends {shaka.ui.Element}
2499
+ */
2500
+ shaka.ui.RangeElement = class extends shaka.ui.Element {
2501
+ /**
2502
+ * @param {!HTMLElement} parent
2503
+ * @param {!shaka.ui.Controls} controls
2504
+ * @param {!Array.<string>} containerClassNames
2505
+ * @param {!Array.<string>} barClassNames
2506
+ */
2507
+ constructor(parent,controls,containerClassNames,barClassNames) {}
2508
+ };
2337
2509
  /**
2338
2510
  * @param {!HTMLElement} element
2339
2511
  * @param {string} className
@@ -2352,6 +2524,17 @@ shaka.ui.Utils.setDisplay = function(element, display) {};
2352
2524
  * @param {!Element} element
2353
2525
  */
2354
2526
  shaka.ui.Utils.removeAllChildren = function(element) {};
2527
+ /**
2528
+ * @extends {shaka.ui.RangeElement}
2529
+ * @final
2530
+ */
2531
+ shaka.ui.SeekBar = class extends shaka.ui.RangeElement {
2532
+ /**
2533
+ * @param {!HTMLElement} parent
2534
+ * @param {!shaka.ui.Controls} controls
2535
+ */
2536
+ constructor(parent,controls) {}
2537
+ };
2355
2538
  /**
2356
2539
  * A container for custom video controls.
2357
2540
  * @param {!shaka.Player} player
@@ -2384,12 +2567,20 @@ shaka.ui.Controls.prototype.allowCast = function(allow) {};
2384
2567
  * is important for platforms like Android where autoplay is disabled.
2385
2568
  */
2386
2569
  shaka.ui.Controls.prototype.loadComplete = function() {};
2570
+ /**
2571
+ * @param {!shaka.extern.UIConfiguration} config
2572
+ */
2573
+ shaka.ui.Controls.prototype.configure = function(config) {};
2387
2574
  /**
2388
2575
  * Enable or disable the custom controls. Enabling disables native
2389
2576
  * browser controls.
2390
2577
  * @param {boolean} enabled
2391
2578
  */
2392
2579
  shaka.ui.Controls.prototype.setEnabledShakaControls = function(enabled) {};
2580
+ /**
2581
+ * @param {boolean} seeking
2582
+ */
2583
+ shaka.ui.Controls.prototype.setSeeking = function(seeking) {};
2393
2584
  /**
2394
2585
  * Enable or disable native browser controls. Enabling disables shaka
2395
2586
  * controls.
@@ -2404,6 +2595,8 @@ shaka.ui.Controls.prototype.getCastProxy = function() {};
2404
2595
  * @return {shaka.ui.Localization}
2405
2596
  */
2406
2597
  shaka.ui.Controls.prototype.getLocalization = function() {};
2598
+ /** */
2599
+ shaka.ui.Controls.prototype.toggleFullScreen = function() {};
2407
2600
  /**
2408
2601
  * @return {!HTMLElement}
2409
2602
  */
@@ -2482,9 +2675,41 @@ shaka.ui.OverflowMenu = class extends shaka.ui.Element {
2482
2675
  };
2483
2676
  /**
2484
2677
  * @extends {shaka.ui.Element}
2678
+ */
2679
+ shaka.ui.SettingsMenu = class extends shaka.ui.Element {
2680
+ /**
2681
+ * @param {!HTMLElement} parent
2682
+ * @param {!shaka.ui.Controls} controls
2683
+ * @param {string} iconText
2684
+ */
2685
+ constructor(parent,controls,iconText) {}
2686
+ };
2687
+ /**
2688
+ * @extends {shaka.ui.SettingsMenu}
2485
2689
  * @final
2486
2690
  */
2487
- shaka.ui.AudioLanguageSelection = class extends shaka.ui.Element {
2691
+ shaka.ui.AudioLanguageSelection = class extends shaka.ui.SettingsMenu {
2692
+ /**
2693
+ * @param {!HTMLElement} parent
2694
+ * @param {!shaka.ui.Controls} controls
2695
+ */
2696
+ constructor(parent,controls) {}
2697
+ };
2698
+ /**
2699
+ * @extends {shaka.ui.Element}
2700
+ */
2701
+ shaka.ui.PlayButton = class extends shaka.ui.Element {
2702
+ /**
2703
+ * @param {!HTMLElement} parent
2704
+ * @param {!shaka.ui.Controls} controls
2705
+ */
2706
+ constructor(parent,controls) {}
2707
+ };
2708
+ /**
2709
+ * @extends {shaka.ui.PlayButton}
2710
+ * @final
2711
+ */
2712
+ shaka.ui.BigPlayButton = class extends shaka.ui.PlayButton {
2488
2713
  /**
2489
2714
  * @param {!HTMLElement} parent
2490
2715
  * @param {!shaka.ui.Controls} controls
@@ -2550,7 +2775,7 @@ shaka.ui.PipButton = class extends shaka.ui.Element {
2550
2775
  * @extends {shaka.ui.Element}
2551
2776
  * @final
2552
2777
  */
2553
- shaka.ui.PlayPauseButton = class extends shaka.ui.Element {
2778
+ shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element {
2554
2779
  /**
2555
2780
  * @param {!HTMLElement} parent
2556
2781
  * @param {!shaka.ui.Controls} controls
@@ -2558,10 +2783,10 @@ shaka.ui.PlayPauseButton = class extends shaka.ui.Element {
2558
2783
  constructor(parent,controls) {}
2559
2784
  };
2560
2785
  /**
2561
- * @extends {shaka.ui.Element}
2786
+ * @extends {shaka.ui.SettingsMenu}
2562
2787
  * @final
2563
2788
  */
2564
- shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element {
2789
+ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
2565
2790
  /**
2566
2791
  * @param {!HTMLElement} parent
2567
2792
  * @param {!shaka.ui.Controls} controls
@@ -2572,7 +2797,7 @@ shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element {
2572
2797
  * @extends {shaka.ui.Element}
2573
2798
  * @final
2574
2799
  */
2575
- shaka.ui.ResolutionSelection = class extends shaka.ui.Element {
2800
+ shaka.ui.RewindButton = class extends shaka.ui.Element {
2576
2801
  /**
2577
2802
  * @param {!HTMLElement} parent
2578
2803
  * @param {!shaka.ui.Controls} controls
@@ -2580,10 +2805,10 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.Element {
2580
2805
  constructor(parent,controls) {}
2581
2806
  };
2582
2807
  /**
2583
- * @extends {shaka.ui.Element}
2808
+ * @extends {shaka.ui.PlayButton}
2584
2809
  * @final
2585
2810
  */
2586
- shaka.ui.RewindButton = class extends shaka.ui.Element {
2811
+ shaka.ui.SmallPlayButton = class extends shaka.ui.PlayButton {
2587
2812
  /**
2588
2813
  * @param {!HTMLElement} parent
2589
2814
  * @param {!shaka.ui.Controls} controls
@@ -2634,10 +2859,10 @@ shaka.ui.TextDisplayer = class {
2634
2859
  setTextVisibility(on) {}
2635
2860
  };
2636
2861
  /**
2637
- * @extends {shaka.ui.Element}
2862
+ * @extends {shaka.ui.SettingsMenu}
2638
2863
  * @final
2639
2864
  */
2640
- shaka.ui.TextSelection = class extends shaka.ui.Element {
2865
+ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
2641
2866
  /**
2642
2867
  * @param {!HTMLElement} parent
2643
2868
  * @param {!shaka.ui.Controls} controls
@@ -2689,10 +2914,10 @@ shaka.ui.Overlay.prototype.getControls = function() {};
2689
2914
  */
2690
2915
  shaka.ui.Overlay.prototype.setEnabled = function(enabled) {};
2691
2916
  /**
2692
- * @extends {shaka.ui.Element}
2917
+ * @extends {shaka.ui.RangeElement}
2693
2918
  * @final
2694
2919
  */
2695
- shaka.ui.VolumeBar = class extends shaka.ui.Element {
2920
+ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
2696
2921
  /**
2697
2922
  * @param {!HTMLElement} parent
2698
2923
  * @param {!shaka.ui.Controls} controls