shaka-player 3.3.4 → 4.0.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 (201) hide show
  1. package/.github/config.yml +1 -0
  2. package/.github/workflows/build-and-test.yaml +0 -1
  3. package/.github/workflows/demo-version-index.yaml +8 -0
  4. package/.github/workflows/release-please.yaml +19 -3
  5. package/.github/workflows/selenium-lab-tests.yaml +0 -1
  6. package/.github/workflows/sync-labels.yaml +33 -0
  7. package/.github/workflows/update-issues.yaml +29 -0
  8. package/.github/workflows/validate-pr-title.yaml +35 -0
  9. package/AUTHORS +1 -0
  10. package/CHANGELOG.md +209 -28
  11. package/CONTRIBUTORS +1 -0
  12. package/README.md +10 -7
  13. package/app-engine/demo-version-index/README.md +3 -3
  14. package/app-engine/demo-version-index/app.yaml +27 -1
  15. package/app-engine/demo-version-index/generate.py +164 -0
  16. package/app-engine/demo-version-index/main.py +4 -155
  17. package/app-engine/demo-version-index/requirements.txt +0 -1
  18. package/build/README.md +2 -2
  19. package/build/compiler.py +1 -1
  20. package/build/generateTsDefs.py +0 -2
  21. package/build/misspellings.txt +1 -0
  22. package/build/shaka-lab.yaml +0 -2
  23. package/build/test.py +7 -1
  24. package/build/types/core +0 -1
  25. package/build/types/polyfill +0 -3
  26. package/demo/common/asset.js +17 -1
  27. package/demo/common/assets.js +29 -0
  28. package/demo/common/message_ids.js +6 -3
  29. package/demo/config.js +10 -11
  30. package/demo/custom.js +39 -0
  31. package/demo/demo_utils.js +0 -1
  32. package/demo/locales/en.json +6 -3
  33. package/demo/locales/source.json +22 -10
  34. package/demo/main.js +9 -6
  35. package/demo/search.js +2 -1
  36. package/dist/controls.css +1 -1
  37. package/dist/demo.compiled.debug.js +71 -64
  38. package/dist/demo.compiled.debug.map +3 -3
  39. package/dist/demo.compiled.js +71 -64
  40. package/dist/demo.compiled.map +3 -3
  41. package/dist/demo.css +1 -1
  42. package/dist/demo.css.map +1 -1
  43. package/dist/deps.js +16 -20
  44. package/dist/locales.js +33 -31
  45. package/dist/receiver.compiled.debug.js +32 -28
  46. package/dist/receiver.compiled.debug.map +3 -3
  47. package/dist/receiver.compiled.js +32 -28
  48. package/dist/receiver.compiled.map +3 -3
  49. package/dist/shaka-player.compiled.d.ts +78 -82
  50. package/dist/shaka-player.compiled.debug.d.ts +78 -82
  51. package/dist/shaka-player.compiled.debug.externs.js +127 -126
  52. package/dist/shaka-player.compiled.debug.js +471 -523
  53. package/dist/shaka-player.compiled.debug.map +4 -4
  54. package/dist/shaka-player.compiled.externs.js +127 -126
  55. package/dist/shaka-player.compiled.js +844 -858
  56. package/dist/shaka-player.compiled.map +4 -4
  57. package/dist/shaka-player.ui.d.ts +80 -82
  58. package/dist/shaka-player.ui.debug.d.ts +80 -82
  59. package/dist/shaka-player.ui.debug.externs.js +135 -126
  60. package/dist/shaka-player.ui.debug.js +531 -581
  61. package/dist/shaka-player.ui.debug.map +4 -4
  62. package/dist/shaka-player.ui.externs.js +135 -126
  63. package/dist/shaka-player.ui.js +991 -1001
  64. package/dist/shaka-player.ui.map +4 -4
  65. package/docs/tutorials/config.md +0 -2
  66. package/docs/tutorials/drm-config.md +5 -0
  67. package/docs/tutorials/fairplay.md +7 -22
  68. package/docs/tutorials/faq.md +0 -11
  69. package/docs/tutorials/index.json +2 -8
  70. package/docs/tutorials/plugins.md +1 -3
  71. package/docs/tutorials/upgrade.md +85 -11
  72. package/externs/polyfill.js +15 -0
  73. package/externs/shaka/manifest.js +5 -1
  74. package/externs/shaka/net.js +12 -0
  75. package/externs/shaka/offline.js +5 -1
  76. package/externs/shaka/player.js +39 -21
  77. package/externs/shaka/text.js +12 -12
  78. package/externs/sourcebuffer.js +15 -0
  79. package/karma.conf.js +4 -0
  80. package/lib/ads/client_side_ad.js +13 -2
  81. package/lib/ads/client_side_ad_manager.js +22 -4
  82. package/lib/cast/cast_utils.js +0 -1
  83. package/lib/dash/content_protection.js +85 -5
  84. package/lib/dash/dash_parser.js +3 -3
  85. package/lib/hls/hls_parser.js +391 -747
  86. package/lib/hls/manifest_text_parser.js +2 -3
  87. package/lib/media/drm_engine.js +102 -37
  88. package/lib/media/gap_jumping_controller.js +10 -45
  89. package/lib/media/media_source_engine.js +157 -31
  90. package/lib/media/playhead.js +2 -5
  91. package/lib/media/presentation_timeline.js +1 -2
  92. package/lib/media/segment_index.js +13 -46
  93. package/lib/media/segment_reference.js +47 -1
  94. package/lib/media/streaming_engine.js +28 -11
  95. package/lib/media/time_ranges_utils.js +4 -9
  96. package/lib/net/networking_engine.js +3 -0
  97. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  98. package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
  99. package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
  100. package/lib/offline/manifest_converter.js +1 -0
  101. package/lib/offline/storage.js +100 -132
  102. package/lib/player.js +181 -307
  103. package/lib/polyfill/media_capabilities.js +12 -6
  104. package/lib/polyfill/mediasource.js +0 -28
  105. package/lib/polyfill/patchedmediakeys_nop.js +2 -0
  106. package/lib/polyfill/patchedmediakeys_webkit.js +2 -0
  107. package/lib/text/cue.js +0 -6
  108. package/lib/text/lrc_text_parser.js +8 -0
  109. package/lib/text/mp4_ttml_parser.js +8 -0
  110. package/lib/text/mp4_vtt_parser.js +8 -0
  111. package/lib/text/sbv_text_parser.js +8 -0
  112. package/lib/text/simple_text_displayer.js +1 -7
  113. package/lib/text/srt_text_parser.js +8 -0
  114. package/lib/text/ssa_text_parser.js +8 -0
  115. package/lib/text/text_engine.js +19 -3
  116. package/lib/text/ttml_text_parser.js +8 -0
  117. package/lib/text/ui_text_displayer.js +1 -7
  118. package/lib/text/vtt_text_parser.js +27 -5
  119. package/lib/text/web_vtt_generator.js +1 -7
  120. package/lib/util/config_utils.js +25 -0
  121. package/lib/util/error.js +16 -13
  122. package/lib/util/fairplay_utils.js +109 -0
  123. package/lib/util/functional.js +0 -42
  124. package/lib/util/manifest_parser_utils.js +1 -1
  125. package/lib/util/mime_utils.js +50 -1
  126. package/lib/util/periods.js +5 -4
  127. package/lib/util/platform.js +45 -0
  128. package/lib/util/player_configuration.js +26 -20
  129. package/lib/util/pssh.js +23 -4
  130. package/lib/util/stream_utils.js +96 -24
  131. package/lib/util/uint8array_utils.js +0 -16
  132. package/lib/util/xml_utils.js +1 -1
  133. package/package.json +4 -1
  134. package/roadmap.md +19 -19
  135. package/shaka-player.uncompiled.js +0 -3
  136. package/test/cast/cast_utils_unit.js +1 -0
  137. package/test/dash/dash_parser_content_protection_unit.js +44 -0
  138. package/test/dash/dash_parser_manifest_unit.js +0 -24
  139. package/test/dash/dash_parser_segment_template_unit.js +3 -4
  140. package/test/demo/demo_unit.js +2 -1
  141. package/test/hls/hls_live_unit.js +121 -220
  142. package/test/hls/hls_parser_unit.js +515 -432
  143. package/test/hls/manifest_text_parser_unit.js +19 -0
  144. package/test/media/drm_engine_unit.js +86 -120
  145. package/test/media/media_source_engine_integration.js +26 -3
  146. package/test/media/media_source_engine_unit.js +7 -6
  147. package/test/media/playhead_unit.js +27 -191
  148. package/test/media/segment_index_unit.js +15 -25
  149. package/test/media/streaming_engine_integration.js +4 -39
  150. package/test/media/streaming_engine_unit.js +3 -2
  151. package/test/media/time_ranges_utils_unit.js +0 -5
  152. package/test/offline/indexeddb_storage_unit.js +1 -1
  153. package/test/offline/manifest_convert_unit.js +34 -4
  154. package/test/offline/offline_manifest_parser_unit.js +1 -0
  155. package/test/offline/storage_compatibility_unit.js +1 -1
  156. package/test/offline/storage_integration.js +5 -4
  157. package/test/player_external.js +7 -7
  158. package/test/player_integration.js +22 -10
  159. package/test/player_src_equals_integration.js +81 -83
  160. package/test/player_unit.js +124 -1
  161. package/test/test/boot.js +9 -0
  162. package/test/test/externs/filters.js +4 -0
  163. package/test/test/util/fake_media_source_engine.js +11 -4
  164. package/test/test/util/manifest_generator.js +3 -1
  165. package/test/test/util/manifest_parser_util.js +4 -1
  166. package/test/test/util/offline_utils.js +1 -0
  167. package/test/test/util/simple_fakes.js +31 -2
  168. package/test/test/util/streaming_engine_util.js +1 -0
  169. package/test/test/util/test_scheme.js +24 -1
  170. package/test/test/util/util.js +4 -4
  171. package/test/text/cue_integration.js +2 -2
  172. package/test/text/lrc_text_parser_unit.js +6 -7
  173. package/test/text/mp4_ttml_parser_unit.js +6 -4
  174. package/test/text/mp4_vtt_parser_unit.js +6 -5
  175. package/test/text/sbv_text_parser_unit.js +5 -6
  176. package/test/text/srt_text_parser_unit.js +5 -6
  177. package/test/text/ssa_text_parser_unit.js +17 -29
  178. package/test/text/text_engine_unit.js +45 -5
  179. package/test/text/ttml_text_parser_unit.js +77 -77
  180. package/test/text/vtt_text_parser_unit.js +116 -59
  181. package/test/ui/ui_integration.js +0 -16
  182. package/test/ui/ui_unit.js +27 -0
  183. package/test/util/cmcd_manager_unit.js +3 -0
  184. package/test/util/mime_utils_unit.js +54 -0
  185. package/test/util/periods_unit.js +79 -0
  186. package/test/util/stream_utils_unit.js +23 -7
  187. package/ui/controls.js +65 -40
  188. package/ui/fullscreen_button.js +26 -6
  189. package/ui/less/containers.less +3 -3
  190. package/ui/locales/en.json +1 -0
  191. package/ui/locales/source.json +5 -0
  192. package/ui/resolution_selection.js +31 -33
  193. package/ui/ui.js +0 -17
  194. package/docs/tutorials/gsoc-ideas-list.md +0 -3
  195. package/docs/tutorials/upgrade-v2-5.md +0 -441
  196. package/docs/tutorials/upgrade-v3.md +0 -38
  197. package/lib/polyfill/mathround.js +0 -49
  198. package/lib/polyfill/patchedmediakeys_apple.js +0 -744
  199. package/lib/polyfill/patchedmediakeys_ms.js +0 -698
  200. package/lib/util/mutex.js +0 -52
  201. package/test/util/functional_unit.js +0 -82
@@ -186,10 +186,6 @@ shaka.text.Cue.prototype.isContainer;
186
186
  * @override
187
187
  */
188
188
  shaka.text.Cue.prototype.lineBreak;
189
- /**
190
- * @override
191
- */
192
- shaka.text.Cue.prototype.spacer;
193
189
  /**
194
190
  * @override
195
191
  */
@@ -550,6 +546,7 @@ shaka.util.Error.Code = {
550
546
  'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
551
547
  'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
552
548
  'MISSING_TEXT_PLUGIN': 2014,
549
+ 'CHAPTERS_TRACK_FAILED': 2015,
553
550
  'BUFFER_READ_OUT_OF_BOUNDS': 3000,
554
551
  'JS_INTEGER_OVERFLOW': 3001,
555
552
  'EBML_OVERFLOW': 3002,
@@ -587,14 +584,12 @@ shaka.util.Error.Code = {
587
584
  'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
588
585
  'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
589
586
  'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
590
- 'HLS_MASTER_PLAYLIST_NOT_PROVIDED': 4022,
591
587
  'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
592
588
  'HLS_REQUIRED_TAG_MISSING': 4024,
593
589
  'HLS_COULD_NOT_GUESS_CODECS': 4025,
594
590
  'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
595
591
  'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
596
592
  'DASH_XLINK_DEPTH_LIMIT': 4028,
597
- 'HLS_COULD_NOT_PARSE_SEGMENT_START_TIME': 4030,
598
593
  'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
599
594
  'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
600
595
  'HLS_AES_128_ENCRYPTION_NOT_SUPPORTED': 4034,
@@ -603,6 +598,7 @@ shaka.util.Error.Code = {
603
598
  'PERIOD_FLATTENING_FAILED': 4037,
604
599
  'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
605
600
  'HLS_VARIABLE_NOT_FOUND': 4039,
601
+ 'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
606
602
  'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
607
603
  'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
608
604
  'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
@@ -704,14 +700,6 @@ shaka.util.StringUtils = class {
704
700
  * @summary A set of Uint8Array utility functions.
705
701
  */
706
702
  shaka.util.Uint8ArrayUtils = class {
707
- /**
708
- * Compare two Uint8Arrays for equality.
709
- * @param {Uint8Array} arr1
710
- * @param {Uint8Array} arr2
711
- * @return {boolean}
712
- * @deprecated
713
- */
714
- static equal(arr1, arr2) {}
715
703
  /**
716
704
  * Convert a buffer to a base64 string. The output will be standard
717
705
  * alphabet as opposed to base64url safe alphabet.
@@ -754,6 +742,19 @@ shaka.util.Uint8ArrayUtils = class {
754
742
  */
755
743
  static concat(...varArgs) {}
756
744
  };
745
+ /**
746
+ * @summary A set of utility functions for dealing with MIME types.
747
+ */
748
+ shaka.util.MimeUtils = class {
749
+ /**
750
+ * Takes a MIME type and optional codecs string and produces the full MIME
751
+ * type.
752
+ * @param {string} mimeType
753
+ * @param {string=} codecs
754
+ * @return {string}
755
+ */
756
+ static getFullType(mimeType, codecs) {}
757
+ };
757
758
  /**
758
759
  * @summary Manages text parsers and cues.
759
760
  * @implements {shaka.util.IDestroyable}
@@ -1414,35 +1415,6 @@ shaka.util.EventManager = class {
1414
1415
  * @typedef {function(!Event)}
1415
1416
  */
1416
1417
  shaka.util.EventManager.ListenerType;
1417
- /**
1418
- * @summary A set of FairPlay utility functions.
1419
- */
1420
- shaka.util.FairPlayUtils = class {
1421
- /**
1422
- * Using the default method, extract a content ID from the init data. This is
1423
- * based on the FairPlay example documentation.
1424
- * @param {!BufferSource} initData
1425
- * @return {string}
1426
- */
1427
- static defaultGetContentId(initData) {}
1428
- /**
1429
- * Transforms the init data buffer using the given data. The format is:
1430
- * <pre>
1431
- * [4 bytes] initDataSize
1432
- * [initDataSize bytes] initData
1433
- * [4 bytes] contentIdSize
1434
- * [contentIdSize bytes] contentId
1435
- * [4 bytes] certSize
1436
- * [certSize bytes] cert
1437
- * </pre>
1438
- * @param {!BufferSource} initData
1439
- * @param {!BufferSource|string} contentId
1440
- * @param {?BufferSource} cert The server certificate; this will throw if not
1441
- * provided.
1442
- * @return {!Uint8Array}
1443
- */
1444
- static initDataTransform(initData, contentId, cert) {}
1445
- };
1446
1418
  /**
1447
1419
  * @summary An interface to register manifest parsers.
1448
1420
  */
@@ -1718,8 +1690,14 @@ shaka.media.SegmentReference = class {
1718
1690
  * The explicit duration of an individual tile within the tiles grid.
1719
1691
  * If not provided, the duration should be automatically calculated based on
1720
1692
  * the duration of the reference.
1693
+ * @param {?number=} syncTime
1694
+ * A time value, expressed in the same scale as the start and end time, which
1695
+ * is used to synchronize between streams.
1696
+ * @param {shaka.media.SegmentReference.Status=} status
1697
+ * The segment status is used to indicate that a segment does not exist or is
1698
+ * not available.
1721
1699
  */
1722
- constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
1700
+ constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status) {}
1723
1701
  /**
1724
1702
  * Creates and returns the URIs of the resource containing the segment.
1725
1703
  * @return {!Array.<string>}
@@ -1759,6 +1737,25 @@ shaka.media.SegmentReference = class {
1759
1737
  * @return {?number}
1760
1738
  */
1761
1739
  getTileDuration() {}
1740
+ /**
1741
+ * Returns the segment's status.
1742
+ * @return {shaka.media.SegmentReference.Status}
1743
+ */
1744
+ getStatus() {}
1745
+ /**
1746
+ * Mark the reference as unavailable.
1747
+ */
1748
+ markAsUnavailable() {}
1749
+ };
1750
+ /**
1751
+ * Rather than using booleans to communicate what the state of the reference,
1752
+ * we have this enum.
1753
+ * @enum {number}
1754
+ */
1755
+ shaka.media.SegmentReference.Status = {
1756
+ AVAILABLE: 0,
1757
+ UNAVAILABLE: 1,
1758
+ MISSING: 2
1762
1759
  };
1763
1760
  /**
1764
1761
  * PresentationTimeline.
@@ -1934,13 +1931,6 @@ shaka.media.SegmentIndex = class {
1934
1931
  * (ascending) and second by their end times (ascending).
1935
1932
  */
1936
1933
  constructor(references) {}
1937
- /**
1938
- * SegmentIndex used to be an IDestroyable. Now it is an IReleasable.
1939
- * This method is provided for backward compatibility.
1940
- * @deprecated
1941
- * @return {!Promise}
1942
- */
1943
- destroy() {}
1944
1934
  /**
1945
1935
  * @override
1946
1936
  */
@@ -1975,20 +1965,6 @@ shaka.media.SegmentIndex = class {
1975
1965
  * times.
1976
1966
  */
1977
1967
  offset(offset) {}
1978
- /**
1979
- * Merges the given SegmentReferences. Supports extending the original
1980
- * references only. Will replace old references with equivalent new ones, and
1981
- * keep any unique old ones.
1982
- * Used, for example, by the DASH and HLS parser, where manifests may not list
1983
- * all available references, so we must keep available references in memory to
1984
- * fill the availability window.
1985
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
1986
- * SegmentReferences, which must be sorted first by their start times
1987
- * (ascending) and second by their end times (ascending).
1988
- * @deprecated Not used directly by our own parsers, so will become private in
1989
- * v4. Use mergeAndEvict() instead.
1990
- */
1991
- merge(references) {}
1992
1968
  /**
1993
1969
  * Merges the given SegmentReferences and evicts the ones that end before the
1994
1970
  * given time. Supports extending the original references only.
@@ -2057,13 +2033,6 @@ shaka.media.SegmentIterator = class {
2057
2033
  * @param {number} partialSegmentIndex
2058
2034
  */
2059
2035
  constructor(segmentIndex, index, partialSegmentIndex) {}
2060
- /**
2061
- * Move the iterator to a given timestamp in the underlying SegmentIndex.
2062
- * @param {number} time
2063
- * @return {shaka.media.SegmentReference}
2064
- * @deprecated Use SegmentIndex.getIteratorForTime instead
2065
- */
2066
- seek(time) {}
2067
2036
  /**
2068
2037
  * @return {shaka.media.SegmentReference}
2069
2038
  */
@@ -2263,6 +2232,10 @@ shaka.util.ConfigUtils = class {
2263
2232
  * @final
2264
2233
  */
2265
2234
  shaka.util.PlayerConfiguration = class {
2235
+ /**
2236
+ * @return {shaka.extern.PlayerConfiguration}
2237
+ */
2238
+ static createDefault() {}
2266
2239
  /**
2267
2240
  * Merges the given configuration changes into the given destination. This
2268
2241
  * uses the default Player configurations as the template.
@@ -2725,21 +2698,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2725
2698
  * @return {shaka.extern.Stats}
2726
2699
  */
2727
2700
  getStats() {}
2728
- /**
2729
- * Adds the given text track to the loaded manifest. <code>load()</code> must
2730
- * resolve before calling. The presentation must have a duration.
2731
- * This returns the created track, which can immediately be selected by the
2732
- * application. The track will not be automatically selected.
2733
- * @param {string} uri
2734
- * @param {string} language
2735
- * @param {string} kind
2736
- * @param {string=} mimeType
2737
- * @param {string=} codec
2738
- * @param {string=} label
2739
- * @param {boolean=} forced
2740
- * @return {shaka.extern.Track}
2741
- */
2742
- addTextTrack(uri, language, kind, mimeType, codec, label, forced) {}
2743
2701
  /**
2744
2702
  * Adds the given text track to the loaded manifest. <code>load()</code> must
2745
2703
  * resolve before calling. The presentation must have a duration.
@@ -2837,8 +2795,9 @@ shaka.ads.ClientSideAd = class {
2837
2795
  /**
2838
2796
  * @param {!google.ima.Ad} imaAd
2839
2797
  * @param {!google.ima.AdsManager} imaAdManager
2798
+ * @param {HTMLMediaElement} video
2840
2799
  */
2841
- constructor(imaAd, imaAdManager) {}
2800
+ constructor(imaAd, imaAdManager, video) {}
2842
2801
  /**
2843
2802
  * @override
2844
2803
  */
@@ -3615,12 +3574,6 @@ shaka.offline.Storage = class {
3615
3574
  * AbortableOperation.
3616
3575
  */
3617
3576
  store(uri, appMetadata, mimeType) {}
3618
- /**
3619
- * Returns true if an asset is currently downloading.
3620
- * @return {boolean}
3621
- * @deprecated
3622
- */
3623
- getStoreInProgress() {}
3624
3577
  /**
3625
3578
  * Removes the given stored content. This will also attempt to release the
3626
3579
  * licenses, if any.
@@ -3708,16 +3661,6 @@ shaka.polyfill.Fullscreen = class {
3708
3661
  */
3709
3662
  static install() {}
3710
3663
  };
3711
- /**
3712
- * @summary A polyfill to patch math round bug on some browsers.
3713
- * @see https://stackoverflow.com/q/12830742
3714
- */
3715
- shaka.polyfill.MathRound = class {
3716
- /**
3717
- * Install the polyfill if needed.
3718
- */
3719
- static install() {}
3720
- };
3721
3664
  /**
3722
3665
  * @summary A polyfill to provide navigator.mediaCapabilities on all browsers.
3723
3666
  * This is necessary for Tizen 3, Xbox One and possibly others we have yet to
@@ -3757,28 +3700,6 @@ shaka.polyfill.Orientation = class {
3757
3700
  */
3758
3701
  static install() {}
3759
3702
  };
3760
- /**
3761
- * @summary A polyfill to implement modern, standardized EME on top of Apple's
3762
- * prefixed EME in Safari.
3763
- */
3764
- shaka.polyfill.PatchedMediaKeysApple = class {
3765
- /**
3766
- * Installs the polyfill if needed.
3767
- */
3768
- static install() {}
3769
- };
3770
- /**
3771
- * @summary A polyfill to implement
3772
- * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015}
3773
- * on top of ms-prefixed
3774
- * {@link https://www.w3.org/TR/2014/WD-encrypted-media-20140218/ EME v20140218}
3775
- */
3776
- shaka.polyfill.PatchedMediaKeysMs = class {
3777
- /**
3778
- * Installs the polyfill if needed.
3779
- */
3780
- static install() {}
3781
- };
3782
3703
  /**
3783
3704
  * @summary A polyfill to stub out
3784
3705
  * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
@@ -3880,6 +3801,10 @@ shaka.text.LrcTextParser = class {
3880
3801
  * @override
3881
3802
  */
3882
3803
  parseInit(data) {}
3804
+ /**
3805
+ * @override
3806
+ */
3807
+ setSequenceMode(sequenceMode) {}
3883
3808
  /**
3884
3809
  * @override
3885
3810
  */
@@ -3893,6 +3818,10 @@ shaka.text.TtmlTextParser = class {
3893
3818
  * @override
3894
3819
  */
3895
3820
  parseInit(data) {}
3821
+ /**
3822
+ * @override
3823
+ */
3824
+ setSequenceMode(sequenceMode) {}
3896
3825
  /**
3897
3826
  * @override
3898
3827
  */
@@ -3908,6 +3837,10 @@ shaka.text.Mp4TtmlParser = class {
3908
3837
  * @override
3909
3838
  */
3910
3839
  parseInit(data) {}
3840
+ /**
3841
+ * @override
3842
+ */
3843
+ setSequenceMode(sequenceMode) {}
3911
3844
  /**
3912
3845
  * @override
3913
3846
  */
@@ -3917,10 +3850,16 @@ shaka.text.Mp4TtmlParser = class {
3917
3850
  * @implements {shaka.extern.TextParser}
3918
3851
  */
3919
3852
  shaka.text.VttTextParser = class {
3853
+ /** Constructs a VTT parser. */
3854
+ constructor() {}
3920
3855
  /**
3921
3856
  * @override
3922
3857
  */
3923
3858
  parseInit(data) {}
3859
+ /**
3860
+ * @override
3861
+ */
3862
+ setSequenceMode(sequenceMode) {}
3924
3863
  /**
3925
3864
  * @override
3926
3865
  */
@@ -3936,6 +3875,10 @@ shaka.text.Mp4VttParser = class {
3936
3875
  * @override
3937
3876
  */
3938
3877
  parseInit(data) {}
3878
+ /**
3879
+ * @override
3880
+ */
3881
+ setSequenceMode(sequenceMode) {}
3939
3882
  /**
3940
3883
  * @override
3941
3884
  */
@@ -3949,6 +3892,10 @@ shaka.text.SbvTextParser = class {
3949
3892
  * @override
3950
3893
  */
3951
3894
  parseInit(data) {}
3895
+ /**
3896
+ * @override
3897
+ */
3898
+ setSequenceMode(sequenceMode) {}
3952
3899
  /**
3953
3900
  * @override
3954
3901
  */
@@ -3964,6 +3911,10 @@ shaka.text.SrtTextParser = class {
3964
3911
  * @override
3965
3912
  */
3966
3913
  parseInit(data) {}
3914
+ /**
3915
+ * @override
3916
+ */
3917
+ setSequenceMode(sequenceMode) {}
3967
3918
  /**
3968
3919
  * @override
3969
3920
  */
@@ -3985,8 +3936,58 @@ shaka.text.SsaTextParser = class {
3985
3936
  * @override
3986
3937
  */
3987
3938
  parseInit(data) {}
3939
+ /**
3940
+ * @override
3941
+ */
3942
+ setSequenceMode(sequenceMode) {}
3988
3943
  /**
3989
3944
  * @override
3990
3945
  */
3991
3946
  parseMedia(data, time) {}
3992
3947
  };
3948
+ /**
3949
+ * @summary A set of FairPlay utility functions.
3950
+ */
3951
+ shaka.util.FairPlayUtils = class {
3952
+ /**
3953
+ * Check if FairPlay is supported.
3954
+ * @return {!Promise.<boolean>}
3955
+ */
3956
+ static isFairPlaySupported() {}
3957
+ /**
3958
+ * Using the default method, extract a content ID from the init data. This is
3959
+ * based on the FairPlay example documentation.
3960
+ * @param {!BufferSource} initData
3961
+ * @return {string}
3962
+ */
3963
+ static defaultGetContentId(initData) {}
3964
+ /**
3965
+ * Transforms the init data buffer using the given data. The format is:
3966
+ * <pre>
3967
+ * [4 bytes] initDataSize
3968
+ * [initDataSize bytes] initData
3969
+ * [4 bytes] contentIdSize
3970
+ * [contentIdSize bytes] contentId
3971
+ * [4 bytes] certSize
3972
+ * [certSize bytes] cert
3973
+ * </pre>
3974
+ * @param {!BufferSource} initData
3975
+ * @param {!BufferSource|string} contentId
3976
+ * @param {?BufferSource} cert The server certificate; this will throw if not
3977
+ * provided.
3978
+ * @return {!Uint8Array}
3979
+ */
3980
+ static initDataTransform(initData, contentId, cert) {}
3981
+ /**
3982
+ * SPC FairPlay request.
3983
+ * @param {shaka.net.NetworkingEngine.RequestType} type
3984
+ * @param {shaka.extern.Request} request
3985
+ */
3986
+ static spcFairPlayRequest(type, request) {}
3987
+ /**
3988
+ * Common FairPlay response transform for some DRMs providers.
3989
+ * @param {shaka.net.NetworkingEngine.RequestType} type
3990
+ * @param {shaka.extern.Response} response
3991
+ */
3992
+ static commonFairPlayResponse(type, response) {}
3993
+ };