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
@@ -59,7 +59,7 @@ shaka.util.Timer = class {
59
59
  */
60
60
  tickNow() {}
61
61
  /**
62
- * Have the timer call |onTick| after |seconds| has elasped unless |stop| is
62
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
63
63
  * called first.
64
64
  * @param {number} seconds
65
65
  * @return {!shaka.util.Timer}
@@ -216,6 +216,8 @@ shaka.util.Error.Code = {
216
216
  'NO_LICENSE_SERVER_GIVEN': 6012,
217
217
  'OFFLINE_SESSION_REMOVED': 6013,
218
218
  'EXPIRED': 6014,
219
+ 'SERVER_CERTIFICATE_REQUIRED': 6015,
220
+ 'INIT_DATA_TRANSFORM_ERROR': 6016,
219
221
  'LOAD_INTERRUPTED': 7000,
220
222
  'OPERATION_ABORTED': 7001,
221
223
  'NO_VIDEO_ELEMENT': 7002,
@@ -226,6 +228,7 @@ shaka.util.Error.Code = {
226
228
  'CAST_CANCELED_BY_USER': 8004,
227
229
  'CAST_CONNECTION_TIMED_OUT': 8005,
228
230
  'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
231
+ 'CAST_RECEIVER_APP_ID_MISSING': 8007,
229
232
  'STORAGE_NOT_SUPPORTED': 9000,
230
233
  'INDEXED_DB_ERROR': 9001,
231
234
  'DEPRECATED_OPERATION_ABORTED': 9002,
@@ -506,6 +509,99 @@ shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOp
506
509
  */
507
510
  constructor(promise,onAbort,numBytesRemainingObj) {}
508
511
  };
512
+ /**
513
+ * An interface to standardize how objects release internal references
514
+ * synchronously. If an object needs to asynchronously release references, then
515
+ * it should use 'shaka.util.IDestroyable'.
516
+ * @interface
517
+ */
518
+ shaka.util.IReleasable = class {
519
+ /**
520
+ * Request that this object release all internal references.
521
+ */
522
+ release() {}
523
+ };
524
+ /**
525
+ * @summary
526
+ * An EventManager maintains a collection of "event
527
+ * bindings" between event targets and event listeners.
528
+ * @implements {shaka.util.IReleasable}
529
+ */
530
+ shaka.util.EventManager = class {
531
+ constructor() {}
532
+ /**
533
+ * Detaches all event listeners.
534
+ * @override
535
+ */
536
+ release() {}
537
+ /**
538
+ * Attaches an event listener to an event target.
539
+ * @param {EventTarget} target The event target.
540
+ * @param {string} type The event type.
541
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
542
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
543
+ * specifies characteristics about the event listener.
544
+ * The passive option, if true, indicates that this function will never
545
+ * call preventDefault(), which improves scrolling performance.
546
+ */
547
+ listen(target,type,listener,options) {}
548
+ /**
549
+ * Attaches an event listener to an event target. The listener will be
550
+ * removed when the first instance of the event is fired.
551
+ * @param {EventTarget} target The event target.
552
+ * @param {string} type The event type.
553
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
554
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
555
+ * specifies characteristics about the event listener.
556
+ * The passive option, if true, indicates that this function will never
557
+ * call preventDefault(), which improves scrolling performance.
558
+ */
559
+ listenOnce(target,type,listener,options) {}
560
+ /**
561
+ * Detaches an event listener from an event target.
562
+ * @param {EventTarget} target The event target.
563
+ * @param {string} type The event type.
564
+ * @param {shaka.util.EventManager.ListenerType=} listener The event listener.
565
+ */
566
+ unlisten(target,type,listener) {}
567
+ /**
568
+ * Detaches all event listeners from all targets.
569
+ */
570
+ removeAll() {}
571
+ };
572
+ /**
573
+ * @typedef {function(!Event)}
574
+ */
575
+ shaka.util.EventManager.ListenerType;
576
+ /**
577
+ * @summary A set of FairPlay utility functions.
578
+ */
579
+ shaka.util.FairPlayUtils = class {
580
+ /**
581
+ * Using the default method, extract a content ID from the init data. This is
582
+ * based on the FairPlay example documentation.
583
+ * @param {!BufferSource} initData
584
+ * @return {string}
585
+ */
586
+ static defaultGetContentId(initData) {}
587
+ /**
588
+ * Transforms the init data buffer using the given data. The format is:
589
+ * <pre>
590
+ * [4 bytes] initDataSize
591
+ * [initDataSize bytes] initData
592
+ * [4 bytes] contentIdSize
593
+ * [contentIdSize bytes] contentId
594
+ * [4 bytes] certSize
595
+ * [certSize bytes] cert
596
+ * </pre>
597
+ * @param {!BufferSource} initData
598
+ * @param {!BufferSource|string} contentId
599
+ * @param {?BufferSource} cert The server certificate; this will throw if not
600
+ * provided.
601
+ * @return {!Uint8Array}
602
+ */
603
+ static initDataTransform(initData,contentId,cert) {}
604
+ };
509
605
  /**
510
606
  * Creates a string from the given buffer as UTF-8 encoding.
511
607
  * @param {?BufferSource} data
@@ -992,6 +1088,10 @@ shaka.cast.CastProxy.prototype.setAppData = function(appData) {};
992
1088
  * Show a dialog where user can choose to disconnect from the cast connection.
993
1089
  */
994
1090
  shaka.cast.CastProxy.prototype.suggestDisconnect = function() {};
1091
+ /**
1092
+ * @param {string} newAppId
1093
+ */
1094
+ shaka.cast.CastProxy.prototype.changeReceiverId = function(newAppId) {};
995
1095
  /**
996
1096
  * Force the receiver app to shut down by disconnecting.
997
1097
  */
@@ -1005,7 +1105,10 @@ shaka.cast.CastProxy.prototype.forceDisconnect = function() {};
1005
1105
  * local Player instance.
1006
1106
  * @param {!shaka.Player} player A local Player instance.
1007
1107
  * @param {function(Object)=} appDataCallback A callback to handle
1008
- * application-specific data passed from the sender.
1108
+ * application-specific data passed from the sender. This can come either
1109
+ * from a Shaka-based sender through CastProxy.setAppData, or from a
1110
+ * sender using the customData field of the LOAD message of the standard
1111
+ * Cast message namespace. It can also be null if no such data is sent.
1009
1112
  * @param {function(string):string=} contentIdCallback A callback to
1010
1113
  * retrieve manifest URI from the provided content id.
1011
1114
  * @implements {shaka.util.IDestroyable}
@@ -1026,98 +1129,6 @@ shaka.cast.CastReceiver.prototype.isIdle = function() {};
1026
1129
  * @override
1027
1130
  */
1028
1131
  shaka.cast.CastReceiver.prototype.destroy = function() {};
1029
- /**
1030
- * Creates an InitSegmentReference, which provides the location to an
1031
- * initialization segment.
1032
- * @param {function():!Array.<string>} uris A function that creates the URIs of
1033
- * the resource containing the segment.
1034
- * @param {number} startByte The offset from the start of the resource to the
1035
- * start of the segment.
1036
- * @param {?number} endByte The offset from the start of the resource to the
1037
- * end of the segment, inclusive. A value of null indicates that the segment
1038
- * extends to the end of the resource.
1039
- * @constructor
1040
- * @struct
1041
- */
1042
- shaka.media.InitSegmentReference = function(uris, startByte, endByte) {};
1043
- /**
1044
- * Creates the URIs of the resource containing the segment.
1045
- * @return {!Array.<string>}
1046
- */
1047
- shaka.media.InitSegmentReference.prototype.createUris = function() {};
1048
- /**
1049
- * Returns the offset from the start of the resource to the
1050
- * start of the segment.
1051
- * @return {number}
1052
- */
1053
- shaka.media.InitSegmentReference.prototype.getStartByte = function() {};
1054
- /**
1055
- * Returns the offset from the start of the resource to the end of the segment,
1056
- * inclusive. A value of null indicates that the segment extends to the end of
1057
- * the resource.
1058
- * @return {?number}
1059
- */
1060
- shaka.media.InitSegmentReference.prototype.getEndByte = function() {};
1061
- /**
1062
- * Creates a SegmentReference, which provides the start time, end time, and
1063
- * location to a media segment.
1064
- * @param {number} position The segment's position within a particular Period.
1065
- * The following should hold true between any two SegmentReferences from the
1066
- * same Period, r1 and r2:
1067
- * IF r2.position > r1.position THEN
1068
- * [ (r2.startTime > r1.startTime) OR
1069
- * (r2.startTime == r1.startTime AND r2.endTime >= r1.endTime) ]
1070
- * @param {number} startTime The segment's start time in seconds, relative to
1071
- * the start of a particular Period.
1072
- * @param {number} endTime The segment's end time in seconds, relative to
1073
- * the start of a particular Period. The segment ends the instant before
1074
- * this time, so |endTime| must be strictly greater than |startTime|.
1075
- * @param {function():!Array.<string>} uris
1076
- * A function that creates the URIs of the resource containing the segment.
1077
- * @param {number} startByte The offset from the start of the resource to the
1078
- * start of the segment.
1079
- * @param {?number} endByte The offset from the start of the resource to the
1080
- * end of the segment, inclusive. A value of null indicates that the segment
1081
- * extends to the end of the resource.
1082
- * @constructor
1083
- * @struct
1084
- */
1085
- shaka.media.SegmentReference = function(position, startTime, endTime, uris, startByte, endByte) {};
1086
- /**
1087
- * Returns the segment's position within a particular Period.
1088
- * @return {number} The segment's position.
1089
- */
1090
- shaka.media.SegmentReference.prototype.getPosition = function() {};
1091
- /**
1092
- * Returns the segment's start time in seconds, relative to
1093
- * the start of a particular Period.
1094
- * @return {number}
1095
- */
1096
- shaka.media.SegmentReference.prototype.getStartTime = function() {};
1097
- /**
1098
- * Returns the segment's end time in seconds, relative to
1099
- * the start of a particular Period.
1100
- * @return {number}
1101
- */
1102
- shaka.media.SegmentReference.prototype.getEndTime = function() {};
1103
- /**
1104
- * Creates the URIs of the resource containing the segment.
1105
- * @return {!Array.<string>}
1106
- */
1107
- shaka.media.SegmentReference.prototype.createUris = function() {};
1108
- /**
1109
- * Returns the offset from the start of the resource to the
1110
- * start of the segment.
1111
- * @return {number}
1112
- */
1113
- shaka.media.SegmentReference.prototype.getStartByte = function() {};
1114
- /**
1115
- * Returns the offset from the start of the resource to the end of the segment,
1116
- * inclusive. A value of null indicates that the segment extends to the end of
1117
- * the resource.
1118
- * @return {?number}
1119
- */
1120
- shaka.media.SegmentReference.prototype.getEndByte = function() {};
1121
1132
  /**
1122
1133
  * Creates a DataViewReader, which abstracts a DataView object.
1123
1134
  * @param {!DataView} dataView The DataView.
@@ -1286,6 +1297,98 @@ shaka.util.Mp4Parser.allData = function(callback) {};
1286
1297
  * @return {string}
1287
1298
  */
1288
1299
  shaka.util.Mp4Parser.typeToString = function(type) {};
1300
+ /**
1301
+ * Creates an InitSegmentReference, which provides the location to an
1302
+ * initialization segment.
1303
+ * @param {function():!Array.<string>} uris A function that creates the URIs of
1304
+ * the resource containing the segment.
1305
+ * @param {number} startByte The offset from the start of the resource to the
1306
+ * start of the segment.
1307
+ * @param {?number} endByte The offset from the start of the resource to the
1308
+ * end of the segment, inclusive. A value of null indicates that the segment
1309
+ * extends to the end of the resource.
1310
+ * @constructor
1311
+ * @struct
1312
+ */
1313
+ shaka.media.InitSegmentReference = function(uris, startByte, endByte) {};
1314
+ /**
1315
+ * Creates the URIs of the resource containing the segment.
1316
+ * @return {!Array.<string>}
1317
+ */
1318
+ shaka.media.InitSegmentReference.prototype.createUris = function() {};
1319
+ /**
1320
+ * Returns the offset from the start of the resource to the
1321
+ * start of the segment.
1322
+ * @return {number}
1323
+ */
1324
+ shaka.media.InitSegmentReference.prototype.getStartByte = function() {};
1325
+ /**
1326
+ * Returns the offset from the start of the resource to the end of the segment,
1327
+ * inclusive. A value of null indicates that the segment extends to the end of
1328
+ * the resource.
1329
+ * @return {?number}
1330
+ */
1331
+ shaka.media.InitSegmentReference.prototype.getEndByte = function() {};
1332
+ /**
1333
+ * Creates a SegmentReference, which provides the start time, end time, and
1334
+ * location to a media segment.
1335
+ * @param {number} position The segment's position within a particular Period.
1336
+ * The following should hold true between any two SegmentReferences from the
1337
+ * same Period, r1 and r2:
1338
+ * IF r2.position > r1.position THEN
1339
+ * [ (r2.startTime > r1.startTime) OR
1340
+ * (r2.startTime == r1.startTime AND r2.endTime >= r1.endTime) ]
1341
+ * @param {number} startTime The segment's start time in seconds, relative to
1342
+ * the start of a particular Period.
1343
+ * @param {number} endTime The segment's end time in seconds, relative to
1344
+ * the start of a particular Period. The segment ends the instant before
1345
+ * this time, so |endTime| must be strictly greater than |startTime|.
1346
+ * @param {function():!Array.<string>} uris
1347
+ * A function that creates the URIs of the resource containing the segment.
1348
+ * @param {number} startByte The offset from the start of the resource to the
1349
+ * start of the segment.
1350
+ * @param {?number} endByte The offset from the start of the resource to the
1351
+ * end of the segment, inclusive. A value of null indicates that the segment
1352
+ * extends to the end of the resource.
1353
+ * @constructor
1354
+ * @struct
1355
+ */
1356
+ shaka.media.SegmentReference = function(position, startTime, endTime, uris, startByte, endByte) {};
1357
+ /**
1358
+ * Returns the segment's position within a particular Period.
1359
+ * @return {number} The segment's position.
1360
+ */
1361
+ shaka.media.SegmentReference.prototype.getPosition = function() {};
1362
+ /**
1363
+ * Returns the segment's start time in seconds, relative to
1364
+ * the start of a particular Period.
1365
+ * @return {number}
1366
+ */
1367
+ shaka.media.SegmentReference.prototype.getStartTime = function() {};
1368
+ /**
1369
+ * Returns the segment's end time in seconds, relative to
1370
+ * the start of a particular Period.
1371
+ * @return {number}
1372
+ */
1373
+ shaka.media.SegmentReference.prototype.getEndTime = function() {};
1374
+ /**
1375
+ * Creates the URIs of the resource containing the segment.
1376
+ * @return {!Array.<string>}
1377
+ */
1378
+ shaka.media.SegmentReference.prototype.createUris = function() {};
1379
+ /**
1380
+ * Returns the offset from the start of the resource to the
1381
+ * start of the segment.
1382
+ * @return {number}
1383
+ */
1384
+ shaka.media.SegmentReference.prototype.getStartByte = function() {};
1385
+ /**
1386
+ * Returns the offset from the start of the resource to the end of the segment,
1387
+ * inclusive. A value of null indicates that the segment extends to the end of
1388
+ * the resource.
1389
+ * @return {?number}
1390
+ */
1391
+ shaka.media.SegmentReference.prototype.getEndByte = function() {};
1289
1392
  /**
1290
1393
  * Creates a SegmentIndex.
1291
1394
  * @param {!Array.<!shaka.media.SegmentReference>} references The list of
@@ -1531,10 +1634,12 @@ shaka.dash.DashParser.prototype.onExpirationUpdated = function(sessionId, expira
1531
1634
  * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
1532
1635
  * @param {string} uri
1533
1636
  * @param {shaka.extern.Request} request
1534
- * @param {shaka.net.NetworkingEngine.RequestType=} requestType
1637
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
1638
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1639
+ * progress event happened.
1535
1640
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1536
1641
  */
1537
- shaka.net.DataUriPlugin = function(uri, request, requestType) {};
1642
+ shaka.net.DataUriPlugin = function(uri, request, requestType, progressUpdated) {};
1538
1643
  /**
1539
1644
  * Creates a new HLS parser.
1540
1645
  * @struct
@@ -1568,8 +1673,8 @@ shaka.hls.HlsParser.prototype.onExpirationUpdated = function(sessionId, expirati
1568
1673
  * @param {string} uri
1569
1674
  * @param {shaka.extern.Request} request
1570
1675
  * @param {shaka.net.NetworkingEngine.RequestType} requestType
1571
- * @param {shaka.extern.ProgressUpdated=} progressUpdated Called when a progress
1572
- * event happened.
1676
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a progress
1677
+ * event happened.
1573
1678
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1574
1679
  */
1575
1680
  shaka.net.HttpFetchPlugin = function(uri, request, requestType, progressUpdated) {};
@@ -1586,8 +1691,8 @@ shaka.net.HttpFetchPlugin.isSupported = function() {};
1586
1691
  * @param {string} uri
1587
1692
  * @param {shaka.extern.Request} request
1588
1693
  * @param {shaka.net.NetworkingEngine.RequestType} requestType
1589
- * @param {shaka.extern.ProgressUpdated=} progressUpdated Called when a
1590
- * progress event happened.
1694
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1695
+ * progress event happened.
1591
1696
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1592
1697
  */
1593
1698
  shaka.net.HttpXHRPlugin = function(uri, request, requestType, progressUpdated) {};
@@ -1596,10 +1701,12 @@ shaka.net.HttpXHRPlugin = function(uri, request, requestType, progressUpdated) {
1596
1701
  * @summary A plugin that handles requests for offline content.
1597
1702
  * @param {string} uri
1598
1703
  * @param {shaka.extern.Request} request
1599
- * @param {shaka.net.NetworkingEngine.RequestType=} requestType
1704
+ * @param {shaka.net.NetworkingEngine.RequestType} requestType
1705
+ * @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
1706
+ * progress event happened.
1600
1707
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
1601
1708
  */
1602
- shaka.offline.OfflineScheme = function(uri, request, requestType) {};
1709
+ shaka.offline.OfflineScheme = function(uri, request, requestType, progressUpdated) {};
1603
1710
  /**
1604
1711
  * <p>
1605
1712
  * This defines the default text displayer plugin. An instance of this
@@ -1647,6 +1754,29 @@ shaka.text.SimpleTextDisplayer.prototype.setTextVisibility = function(on) {};
1647
1754
  * @return {boolean}
1648
1755
  */
1649
1756
  shaka.util.ConfigUtils.mergeConfigObjects = function(destination, source, template, overrides, path) {};
1757
+ /**
1758
+ * Convert config from ('fieldName', value) format to a partial config object.
1759
+ * E. g. from ('manifest.retryParameters.maxAttempts', 1) to
1760
+ * { manifest: { retryParameters: { maxAttempts: 1 }}}.
1761
+ * @param {string} fieldName
1762
+ * @param {*} value
1763
+ * @return {!Object}
1764
+ */
1765
+ shaka.util.ConfigUtils.convertToConfigObject = function(fieldName, value) {};
1766
+ /**
1767
+ * @final
1768
+ */
1769
+ shaka.util.PlayerConfiguration = class {
1770
+ /**
1771
+ * Merges the given configuration changes into the given destination. This
1772
+ * uses the default Player configurations as the template.
1773
+ * @param {shaka.extern.PlayerConfiguration} destination
1774
+ * @param {!Object} updates
1775
+ * @param {shaka.extern.PlayerConfiguration=} template
1776
+ * @return {boolean}
1777
+ */
1778
+ static mergeConfigObjects(destination,updates,template) {}
1779
+ };
1650
1780
  /**
1651
1781
  * Construct a Player.
1652
1782
  * @param {HTMLMediaElement=} mediaElement