shaka-player 3.0.11 → 3.0.15

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 (142) hide show
  1. package/AUTHORS +5 -0
  2. package/CHANGELOG.md +132 -0
  3. package/CONTRIBUTORS +5 -0
  4. package/README.md +3 -0
  5. package/build/apps.py +2 -2
  6. package/build/check.py +2 -2
  7. package/build/conformance.textproto +0 -9
  8. package/build/generateExterns.js +1 -1
  9. package/build/shakaBuildHelpers.py +6 -5
  10. package/build/subprocessWindowsPatch.py +103 -0
  11. package/demo/common/assets.js +1 -1
  12. package/demo/common/message_ids.js +1 -0
  13. package/demo/config.js +2 -1
  14. package/demo/demo.less +4 -0
  15. package/demo/demo_utils.js +1 -0
  16. package/demo/input_container.js +2 -1
  17. package/demo/locales/en.json +1 -0
  18. package/demo/locales/source.json +4 -0
  19. package/dist/controls.css +2 -2
  20. package/dist/controls.css.map +1 -1
  21. package/dist/demo.compiled.debug.js +63 -60
  22. package/dist/demo.compiled.debug.map +3 -3
  23. package/dist/demo.compiled.js +63 -60
  24. package/dist/demo.compiled.map +3 -3
  25. package/dist/demo.css +1 -1
  26. package/dist/demo.css.map +1 -1
  27. package/dist/deps.js +9 -9
  28. package/dist/locales.js +35 -33
  29. package/dist/receiver.compiled.debug.js +59 -56
  30. package/dist/receiver.compiled.debug.map +3 -3
  31. package/dist/receiver.compiled.js +59 -56
  32. package/dist/receiver.compiled.map +3 -3
  33. package/dist/shaka-player.compiled.d.ts +131 -5
  34. package/dist/shaka-player.compiled.debug.d.ts +131 -5
  35. package/dist/shaka-player.compiled.debug.externs.js +142 -8
  36. package/dist/shaka-player.compiled.debug.js +330 -312
  37. package/dist/shaka-player.compiled.debug.map +4 -4
  38. package/dist/shaka-player.compiled.externs.js +142 -8
  39. package/dist/shaka-player.compiled.js +707 -702
  40. package/dist/shaka-player.compiled.map +4 -4
  41. package/dist/shaka-player.ui.d.ts +131 -5
  42. package/dist/shaka-player.ui.debug.d.ts +131 -5
  43. package/dist/shaka-player.ui.debug.externs.js +144 -10
  44. package/dist/shaka-player.ui.debug.js +354 -333
  45. package/dist/shaka-player.ui.debug.map +4 -4
  46. package/dist/shaka-player.ui.externs.js +144 -10
  47. package/dist/shaka-player.ui.js +860 -855
  48. package/dist/shaka-player.ui.map +4 -4
  49. package/docs/tutorials/fairplay.md +1 -1
  50. package/docs/tutorials/faq.md +25 -0
  51. package/externs/aria.js +18 -0
  52. package/externs/ima.js +4 -0
  53. package/externs/shaka/ads.js +2 -0
  54. package/karma.conf.js +1 -0
  55. package/lib/ads/ad_manager.js +29 -11
  56. package/lib/ads/client_side_ad_manager.js +76 -86
  57. package/lib/ads/server_side_ad_manager.js +26 -11
  58. package/lib/cast/cast_proxy.js +3 -2
  59. package/lib/cast/cast_receiver.js +6 -2
  60. package/lib/cast/cast_sender.js +2 -2
  61. package/lib/dash/dash_parser.js +63 -1
  62. package/lib/dash/segment_list.js +1 -1
  63. package/lib/dash/segment_template.js +41 -14
  64. package/lib/hls/hls_parser.js +41 -11
  65. package/lib/media/content_workarounds.js +18 -0
  66. package/lib/media/drm_engine.js +8 -0
  67. package/lib/media/gap_jumping_controller.js +8 -4
  68. package/lib/media/media_source_engine.js +7 -0
  69. package/lib/media/playhead.js +1 -1
  70. package/lib/media/presentation_timeline.js +3 -2
  71. package/lib/media/segment_index.js +41 -11
  72. package/lib/media/streaming_engine.js +34 -21
  73. package/lib/net/networking_engine.js +2 -1
  74. package/lib/offline/download_manager.js +1 -2
  75. package/lib/player.js +99 -44
  76. package/lib/polyfill/encryption_scheme.js +2 -0
  77. package/lib/polyfill/fullscreen.js +2 -0
  78. package/lib/polyfill/mathround.js +2 -0
  79. package/lib/polyfill/mediasource.js +2 -0
  80. package/lib/polyfill/patchedmediakeys_apple.js +6 -4
  81. package/lib/polyfill/patchedmediakeys_ms.js +6 -4
  82. package/lib/polyfill/patchedmediakeys_nop.js +2 -0
  83. package/lib/polyfill/patchedmediakeys_webkit.js +6 -4
  84. package/lib/polyfill/pip_webkit.js +2 -0
  85. package/lib/polyfill/video_play_promise.js +2 -0
  86. package/lib/polyfill/videoplaybackquality.js +2 -0
  87. package/lib/polyfill/vttcue.js +2 -0
  88. package/lib/text/mp4_ttml_parser.js +3 -0
  89. package/lib/text/ttml_text_parser.js +5 -0
  90. package/lib/text/ui_text_displayer.js +37 -3
  91. package/lib/util/error.js +1 -4
  92. package/lib/util/fake_event.js +53 -7
  93. package/lib/util/mime_utils.js +33 -0
  94. package/lib/util/periods.js +25 -3
  95. package/lib/util/stream_utils.js +11 -0
  96. package/package.json +3 -3
  97. package/test/cast/cast_proxy_unit.js +12 -6
  98. package/test/cast/cast_receiver_integration.js +1 -1
  99. package/test/cast/cast_utils_unit.js +1 -1
  100. package/test/dash/dash_parser_manifest_unit.js +73 -0
  101. package/test/demo/demo_unit.js +0 -1
  102. package/test/hls/hls_parser_unit.js +45 -1
  103. package/test/media/drm_engine_unit.js +56 -0
  104. package/test/media/playhead_unit.js +27 -1
  105. package/test/media/presentation_timeline_unit.js +19 -0
  106. package/test/media/segment_index_unit.js +79 -6
  107. package/test/media/streaming_engine_unit.js +3 -3
  108. package/test/player_integration.js +38 -0
  109. package/test/player_unit.js +19 -1
  110. package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
  111. package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
  112. package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
  113. package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
  114. package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
  115. package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
  116. package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
  117. package/test/test/assets/3675/dash_0.mpd +30 -0
  118. package/test/test/assets/3675/dash_1.mpd +30 -0
  119. package/test/test/assets/3675/dash_2.mpd +30 -0
  120. package/test/test/assets/3675/dash_3.mpd +30 -0
  121. package/test/test/assets/3675/dash_4.mpd +30 -0
  122. package/test/test/assets/3675/dash_5.mpd +26 -0
  123. package/test/test/assets/3675/init-stream0.m4s +0 -0
  124. package/test/test/util/fake_ad_manager.js +4 -1
  125. package/test/test/util/fake_media_source_engine.js +4 -0
  126. package/test/test/util/simple_fakes.js +5 -3
  127. package/test/test/util/waiter.js +36 -2
  128. package/test/text/ttml_text_parser_unit.js +9 -0
  129. package/test/text/ui_text_displayer_unit.js +19 -3
  130. package/test/ui/localization_unit.js +15 -14
  131. package/test/ui/ui_unit.js +4 -0
  132. package/ui/big_play_button.js +10 -0
  133. package/ui/cast_button.js +2 -3
  134. package/ui/controls.js +9 -7
  135. package/ui/less/containers.less +3 -0
  136. package/ui/locales/en.json +1 -0
  137. package/ui/locales/ru.json +6 -6
  138. package/ui/locales/source.json +4 -0
  139. package/ui/localization.js +28 -51
  140. package/ui/pip_button.js +2 -3
  141. package/ui/play_button.js +10 -10
  142. package/ui/small_play_button.js +12 -0
@@ -432,7 +432,7 @@ declare namespace shaka.ads {
432
432
  /**
433
433
  * A class responsible for ad-related interactions.
434
434
  */
435
- class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager {
435
+ class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager , shaka.util.IReleasable {
436
436
  private noStructuralTyping_shaka_ads_AdManager : any;
437
437
  getStats ( ) : shaka.extern.AdsStats ;
438
438
  initClientSide (adContainer : any , video : any ) : any ;
@@ -441,6 +441,7 @@ declare namespace shaka.ads {
441
441
  onCueMetadataChange (value : any ) : any ;
442
442
  onDashTimedMetadata (region : any ) : any ;
443
443
  onHlsTimedMetadata (metadata : any , timestamp : any ) : any ;
444
+ release ( ) : any ;
444
445
  replaceServerSideAdTagParameters (adTagParameters : any ) : any ;
445
446
  requestClientSideAds (imaRequest : any ) : any ;
446
447
  requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
@@ -968,9 +969,10 @@ declare namespace shaka.media {
968
969
  /**
969
970
  * Returns a new iterator that initially points to the segment that contains
970
971
  * the given time. Like the normal iterator, next() must be called first to
971
- * get to the first element.
972
+ * get to the first element. Returns null if we do not find a segment at the
973
+ * requested time.
972
974
  */
973
- getIteratorForTime (time : number ) : shaka.media.SegmentIterator ;
975
+ getIteratorForTime (time : number ) : shaka.media.SegmentIterator | null ;
974
976
  /**
975
977
  * Marks the index as immutable. Segments cannot be added or removed after
976
978
  * this point. This doesn't affect the references themselves. This also
@@ -980,7 +982,8 @@ declare namespace shaka.media {
980
982
  markImmutable ( ) : any ;
981
983
  /**
982
984
  * Merges the given SegmentReferences. Supports extending the original
983
- * references only. Will not replace old references or interleave new ones.
985
+ * references only. Will replace old references with equivalent new ones, and
986
+ * keep any unique old ones.
984
987
  * Used, for example, by the DASH and HLS parser, where manifests may not list
985
988
  * all available references, so we must keep available references in memory to
986
989
  * fill the availability window.
@@ -1358,6 +1361,126 @@ declare namespace shaka {
1358
1361
  }
1359
1362
  }
1360
1363
  // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1364
+ declare namespace shaka.polyfill {
1365
+ class EncryptionScheme {
1366
+ private noStructuralTyping_shaka_polyfill_EncryptionScheme : any;
1367
+ /**
1368
+ * Install the polyfill if needed.
1369
+ */
1370
+ static install ( ) : any ;
1371
+ }
1372
+ }
1373
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1374
+ declare namespace shaka.polyfill {
1375
+ class Fullscreen {
1376
+ private noStructuralTyping_shaka_polyfill_Fullscreen : any;
1377
+ /**
1378
+ * Install the polyfill if needed.
1379
+ */
1380
+ static install ( ) : any ;
1381
+ }
1382
+ }
1383
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1384
+ declare namespace shaka.polyfill {
1385
+ class MathRound {
1386
+ private noStructuralTyping_shaka_polyfill_MathRound : any;
1387
+ /**
1388
+ * Install the polyfill if needed.
1389
+ */
1390
+ static install ( ) : any ;
1391
+ }
1392
+ }
1393
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1394
+ declare namespace shaka.polyfill {
1395
+ class MediaSource {
1396
+ private noStructuralTyping_shaka_polyfill_MediaSource : any;
1397
+ /**
1398
+ * Install the polyfill if needed.
1399
+ */
1400
+ static install ( ) : any ;
1401
+ }
1402
+ }
1403
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1404
+ declare namespace shaka.polyfill {
1405
+ class PatchedMediaKeysApple {
1406
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysApple : any;
1407
+ /**
1408
+ * Installs the polyfill if needed.
1409
+ */
1410
+ static install ( ) : any ;
1411
+ }
1412
+ }
1413
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1414
+ declare namespace shaka.polyfill {
1415
+ class PatchedMediaKeysMs {
1416
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysMs : any;
1417
+ /**
1418
+ * Installs the polyfill if needed.
1419
+ */
1420
+ static install ( ) : any ;
1421
+ }
1422
+ }
1423
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1424
+ declare namespace shaka.polyfill {
1425
+ class PatchedMediaKeysNop {
1426
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysNop : any;
1427
+ /**
1428
+ * Installs the polyfill if needed.
1429
+ */
1430
+ static install ( ) : any ;
1431
+ }
1432
+ }
1433
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1434
+ declare namespace shaka.polyfill {
1435
+ class PatchedMediaKeysWebkit {
1436
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysWebkit : any;
1437
+ /**
1438
+ * Installs the polyfill if needed.
1439
+ */
1440
+ static install ( ) : any ;
1441
+ }
1442
+ }
1443
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1444
+ declare namespace shaka.polyfill {
1445
+ class PiPWebkit {
1446
+ private noStructuralTyping_shaka_polyfill_PiPWebkit : any;
1447
+ /**
1448
+ * Install the polyfill if needed.
1449
+ */
1450
+ static install ( ) : any ;
1451
+ }
1452
+ }
1453
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1454
+ declare namespace shaka.polyfill {
1455
+ class VTTCue {
1456
+ private noStructuralTyping_shaka_polyfill_VTTCue : any;
1457
+ /**
1458
+ * Install the polyfill if needed.
1459
+ */
1460
+ static install ( ) : any ;
1461
+ }
1462
+ }
1463
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1464
+ declare namespace shaka.polyfill {
1465
+ class VideoPlayPromise {
1466
+ private noStructuralTyping_shaka_polyfill_VideoPlayPromise : any;
1467
+ /**
1468
+ * Install the polyfill if needed.
1469
+ */
1470
+ static install ( ) : any ;
1471
+ }
1472
+ }
1473
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1474
+ declare namespace shaka.polyfill {
1475
+ class VideoPlaybackQuality {
1476
+ private noStructuralTyping_shaka_polyfill_VideoPlaybackQuality : any;
1477
+ /**
1478
+ * Install the polyfill if needed.
1479
+ */
1480
+ static install ( ) : any ;
1481
+ }
1482
+ }
1483
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
1361
1484
  declare namespace shaka.text {
1362
1485
  class Cue implements shaka.extern.Cue {
1363
1486
  private noStructuralTyping_shaka_text_Cue : any;
@@ -1974,7 +2097,7 @@ declare namespace shaka.util {
1974
2097
  declare namespace shaka.util {
1975
2098
  class FakeEvent extends Event {
1976
2099
  private noStructuralTyping_shaka_util_FakeEvent : any;
1977
- constructor (type : string , dict ? : object | null ) ;
2100
+ constructor (type : string , dict ? : Map < string , object | null > | null ) ;
1978
2101
  }
1979
2102
  }
1980
2103
  // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
@@ -2385,6 +2508,7 @@ declare namespace google.ima {
2385
2508
  constructor (container : google.ima.AdDisplayContainer ) ;
2386
2509
  addEventListener ( ) : any ;
2387
2510
  contentComplete ( ) : any ;
2511
+ destroy ( ) : any ;
2388
2512
  dispatchEvent ( ) : any ;
2389
2513
  getSettings ( ) : google.ima.ImaSdkSettings | null ;
2390
2514
  removeEventListener ( ) : any ;
@@ -2396,6 +2520,7 @@ declare namespace google.ima {
2396
2520
  class AdsManager implements EventTarget {
2397
2521
  private noStructuralTyping_google_ima_AdsManager : any;
2398
2522
  addEventListener ( ) : any ;
2523
+ destroy ( ) : any ;
2399
2524
  dispatchEvent ( ) : any ;
2400
2525
  getAdSkippableState ( ) : boolean ;
2401
2526
  getCuePoints ( ) : number [] ;
@@ -2815,6 +2940,7 @@ declare namespace shaka.extern {
2815
2940
  onCueMetadataChange (value : shaka.extern.ID3Metadata ) : any ;
2816
2941
  onDashTimedMetadata (region : shaka.extern.TimelineRegionInfo ) : any ;
2817
2942
  onHlsTimedMetadata (metadata : shaka.extern.ID3Metadata , timestampOffset : number ) : any ;
2943
+ release ( ) : any ;
2818
2944
  replaceServerSideAdTagParameters (adTagParameters : object | null ) : any ;
2819
2945
  requestClientSideAds (imaRequest : google.ima.AdsRequest ) : any ;
2820
2946
  requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
@@ -432,7 +432,7 @@ declare namespace shaka.ads {
432
432
  /**
433
433
  * A class responsible for ad-related interactions.
434
434
  */
435
- class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager {
435
+ class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager , shaka.util.IReleasable {
436
436
  private noStructuralTyping_shaka_ads_AdManager : any;
437
437
  getStats ( ) : shaka.extern.AdsStats ;
438
438
  initClientSide (adContainer : any , video : any ) : any ;
@@ -441,6 +441,7 @@ declare namespace shaka.ads {
441
441
  onCueMetadataChange (value : any ) : any ;
442
442
  onDashTimedMetadata (region : any ) : any ;
443
443
  onHlsTimedMetadata (metadata : any , timestamp : any ) : any ;
444
+ release ( ) : any ;
444
445
  replaceServerSideAdTagParameters (adTagParameters : any ) : any ;
445
446
  requestClientSideAds (imaRequest : any ) : any ;
446
447
  requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
@@ -968,9 +969,10 @@ declare namespace shaka.media {
968
969
  /**
969
970
  * Returns a new iterator that initially points to the segment that contains
970
971
  * the given time. Like the normal iterator, next() must be called first to
971
- * get to the first element.
972
+ * get to the first element. Returns null if we do not find a segment at the
973
+ * requested time.
972
974
  */
973
- getIteratorForTime (time : number ) : shaka.media.SegmentIterator ;
975
+ getIteratorForTime (time : number ) : shaka.media.SegmentIterator | null ;
974
976
  /**
975
977
  * Marks the index as immutable. Segments cannot be added or removed after
976
978
  * this point. This doesn't affect the references themselves. This also
@@ -980,7 +982,8 @@ declare namespace shaka.media {
980
982
  markImmutable ( ) : any ;
981
983
  /**
982
984
  * Merges the given SegmentReferences. Supports extending the original
983
- * references only. Will not replace old references or interleave new ones.
985
+ * references only. Will replace old references with equivalent new ones, and
986
+ * keep any unique old ones.
984
987
  * Used, for example, by the DASH and HLS parser, where manifests may not list
985
988
  * all available references, so we must keep available references in memory to
986
989
  * fill the availability window.
@@ -1358,6 +1361,126 @@ declare namespace shaka {
1358
1361
  }
1359
1362
  }
1360
1363
  // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1364
+ declare namespace shaka.polyfill {
1365
+ class EncryptionScheme {
1366
+ private noStructuralTyping_shaka_polyfill_EncryptionScheme : any;
1367
+ /**
1368
+ * Install the polyfill if needed.
1369
+ */
1370
+ static install ( ) : any ;
1371
+ }
1372
+ }
1373
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1374
+ declare namespace shaka.polyfill {
1375
+ class Fullscreen {
1376
+ private noStructuralTyping_shaka_polyfill_Fullscreen : any;
1377
+ /**
1378
+ * Install the polyfill if needed.
1379
+ */
1380
+ static install ( ) : any ;
1381
+ }
1382
+ }
1383
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1384
+ declare namespace shaka.polyfill {
1385
+ class MathRound {
1386
+ private noStructuralTyping_shaka_polyfill_MathRound : any;
1387
+ /**
1388
+ * Install the polyfill if needed.
1389
+ */
1390
+ static install ( ) : any ;
1391
+ }
1392
+ }
1393
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1394
+ declare namespace shaka.polyfill {
1395
+ class MediaSource {
1396
+ private noStructuralTyping_shaka_polyfill_MediaSource : any;
1397
+ /**
1398
+ * Install the polyfill if needed.
1399
+ */
1400
+ static install ( ) : any ;
1401
+ }
1402
+ }
1403
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1404
+ declare namespace shaka.polyfill {
1405
+ class PatchedMediaKeysApple {
1406
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysApple : any;
1407
+ /**
1408
+ * Installs the polyfill if needed.
1409
+ */
1410
+ static install ( ) : any ;
1411
+ }
1412
+ }
1413
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1414
+ declare namespace shaka.polyfill {
1415
+ class PatchedMediaKeysMs {
1416
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysMs : any;
1417
+ /**
1418
+ * Installs the polyfill if needed.
1419
+ */
1420
+ static install ( ) : any ;
1421
+ }
1422
+ }
1423
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1424
+ declare namespace shaka.polyfill {
1425
+ class PatchedMediaKeysNop {
1426
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysNop : any;
1427
+ /**
1428
+ * Installs the polyfill if needed.
1429
+ */
1430
+ static install ( ) : any ;
1431
+ }
1432
+ }
1433
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1434
+ declare namespace shaka.polyfill {
1435
+ class PatchedMediaKeysWebkit {
1436
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysWebkit : any;
1437
+ /**
1438
+ * Installs the polyfill if needed.
1439
+ */
1440
+ static install ( ) : any ;
1441
+ }
1442
+ }
1443
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1444
+ declare namespace shaka.polyfill {
1445
+ class PiPWebkit {
1446
+ private noStructuralTyping_shaka_polyfill_PiPWebkit : any;
1447
+ /**
1448
+ * Install the polyfill if needed.
1449
+ */
1450
+ static install ( ) : any ;
1451
+ }
1452
+ }
1453
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1454
+ declare namespace shaka.polyfill {
1455
+ class VTTCue {
1456
+ private noStructuralTyping_shaka_polyfill_VTTCue : any;
1457
+ /**
1458
+ * Install the polyfill if needed.
1459
+ */
1460
+ static install ( ) : any ;
1461
+ }
1462
+ }
1463
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1464
+ declare namespace shaka.polyfill {
1465
+ class VideoPlayPromise {
1466
+ private noStructuralTyping_shaka_polyfill_VideoPlayPromise : any;
1467
+ /**
1468
+ * Install the polyfill if needed.
1469
+ */
1470
+ static install ( ) : any ;
1471
+ }
1472
+ }
1473
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1474
+ declare namespace shaka.polyfill {
1475
+ class VideoPlaybackQuality {
1476
+ private noStructuralTyping_shaka_polyfill_VideoPlaybackQuality : any;
1477
+ /**
1478
+ * Install the polyfill if needed.
1479
+ */
1480
+ static install ( ) : any ;
1481
+ }
1482
+ }
1483
+ // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
1361
1484
  declare namespace shaka.text {
1362
1485
  class Cue implements shaka.extern.Cue {
1363
1486
  private noStructuralTyping_shaka_text_Cue : any;
@@ -1974,7 +2097,7 @@ declare namespace shaka.util {
1974
2097
  declare namespace shaka.util {
1975
2098
  class FakeEvent extends Event {
1976
2099
  private noStructuralTyping_shaka_util_FakeEvent : any;
1977
- constructor (type : string , dict ? : object | null ) ;
2100
+ constructor (type : string , dict ? : Map < string , object | null > | null ) ;
1978
2101
  }
1979
2102
  }
1980
2103
  // Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
@@ -2385,6 +2508,7 @@ declare namespace google.ima {
2385
2508
  constructor (container : google.ima.AdDisplayContainer ) ;
2386
2509
  addEventListener ( ) : any ;
2387
2510
  contentComplete ( ) : any ;
2511
+ destroy ( ) : any ;
2388
2512
  dispatchEvent ( ) : any ;
2389
2513
  getSettings ( ) : google.ima.ImaSdkSettings | null ;
2390
2514
  removeEventListener ( ) : any ;
@@ -2396,6 +2520,7 @@ declare namespace google.ima {
2396
2520
  class AdsManager implements EventTarget {
2397
2521
  private noStructuralTyping_google_ima_AdsManager : any;
2398
2522
  addEventListener ( ) : any ;
2523
+ destroy ( ) : any ;
2399
2524
  dispatchEvent ( ) : any ;
2400
2525
  getAdSkippableState ( ) : boolean ;
2401
2526
  getCuePoints ( ) : number [] ;
@@ -2815,6 +2940,7 @@ declare namespace shaka.extern {
2815
2940
  onCueMetadataChange (value : shaka.extern.ID3Metadata ) : any ;
2816
2941
  onDashTimedMetadata (region : shaka.extern.TimelineRegionInfo ) : any ;
2817
2942
  onHlsTimedMetadata (metadata : shaka.extern.ID3Metadata , timestampOffset : number ) : any ;
2943
+ release ( ) : any ;
2818
2944
  replaceServerSideAdTagParameters (adTagParameters : object | null ) : any ;
2819
2945
  requestClientSideAds (imaRequest : google.ima.AdsRequest ) : any ;
2820
2946
  requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
@@ -89,10 +89,7 @@ shaka.util.BufferUtils = class {
89
89
  * <ul>
90
90
  * <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
91
91
  * <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
92
- * <li>
93
- * <a href="https://docs.microsoft.com/en-us/windows/win32/wmdm/error-codes">PlayReady errors</a>
94
- * or
95
- * <a href="https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/Windows.Media.Protection.PlayReadyErrors.h">more PlayReady errors</a>
92
+ * <li><a href="https://hresult.info">Edge/PlayReady errors</a>
96
93
  * </ul>
97
94
  * @implements {shaka.extern.Error}
98
95
  * @extends {Error}
@@ -513,7 +510,7 @@ shaka.util.AbortableOperation.prototype.promise;
513
510
  shaka.util.FakeEvent = class {
514
511
  /**
515
512
  * @param {string} type
516
- * @param {Object=} dict
513
+ * @param {Map.<string, Object>=} dict
517
514
  */
518
515
  constructor(type, dict) {}
519
516
  };
@@ -1671,13 +1668,16 @@ shaka.media.SegmentIndex = class {
1671
1668
  offset(offset) {}
1672
1669
  /**
1673
1670
  * Merges the given SegmentReferences. Supports extending the original
1674
- * references only. Will not replace old references or interleave new ones.
1671
+ * references only. Will replace old references with equivalent new ones, and
1672
+ * keep any unique old ones.
1675
1673
  * Used, for example, by the DASH and HLS parser, where manifests may not list
1676
1674
  * all available references, so we must keep available references in memory to
1677
1675
  * fill the availability window.
1678
1676
  * @param {!Array.<!shaka.media.SegmentReference>} references The list of
1679
1677
  * SegmentReferences, which must be sorted first by their start times
1680
1678
  * (ascending) and second by their end times (ascending).
1679
+ * @deprecated Not used directly by our own parsers, so will become private in
1680
+ * v4. Use mergeAndEvict() instead.
1681
1681
  */
1682
1682
  merge(references) {}
1683
1683
  /**
@@ -1721,9 +1721,10 @@ shaka.media.SegmentIndex = class {
1721
1721
  /**
1722
1722
  * Returns a new iterator that initially points to the segment that contains
1723
1723
  * the given time. Like the normal iterator, next() must be called first to
1724
- * get to the first element.
1724
+ * get to the first element. Returns null if we do not find a segment at the
1725
+ * requested time.
1725
1726
  * @param {number} time
1726
- * @return {!shaka.media.SegmentIterator}
1727
+ * @return {?shaka.media.SegmentIterator}
1727
1728
  */
1728
1729
  getIteratorForTime(time) {}
1729
1730
  /**
@@ -2569,6 +2570,7 @@ shaka.ads.ServerSideAd = class {
2569
2570
  /**
2570
2571
  * A class responsible for ad-related interactions.
2571
2572
  * @implements {shaka.extern.IAdManager}
2573
+ * @implements {shaka.util.IReleasable}
2572
2574
  */
2573
2575
  shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
2574
2576
  /** */
@@ -2581,6 +2583,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
2581
2583
  * @override
2582
2584
  */
2583
2585
  initClientSide(adContainer, video) {}
2586
+ /**
2587
+ * @override
2588
+ */
2589
+ release() {}
2584
2590
  /**
2585
2591
  * @override
2586
2592
  */
@@ -3219,6 +3225,134 @@ shaka.polyfill = class {
3219
3225
  */
3220
3226
  static register(polyfill, priority) {}
3221
3227
  };
3228
+ /**
3229
+ * @summary A polyfill to add support for EncryptionScheme queries in EME.
3230
+ * @see https://wicg.github.io/encrypted-media-encryption-scheme/
3231
+ * @see https://github.com/w3c/encrypted-media/pull/457
3232
+ * @see https://github.com/google/eme-encryption-scheme-polyfill
3233
+ */
3234
+ shaka.polyfill.EncryptionScheme = class {
3235
+ /**
3236
+ * Install the polyfill if needed.
3237
+ * @suppress {missingRequire}
3238
+ */
3239
+ static install() {}
3240
+ };
3241
+ /**
3242
+ * @summary A polyfill to unify fullscreen APIs across browsers.
3243
+ * Many browsers have prefixed fullscreen methods on Element and document.
3244
+ * See {@link https://mzl.la/2K0xcHo Using fullscreen mode} on MDN for more
3245
+ * information.
3246
+ */
3247
+ shaka.polyfill.Fullscreen = class {
3248
+ /**
3249
+ * Install the polyfill if needed.
3250
+ */
3251
+ static install() {}
3252
+ };
3253
+ /**
3254
+ * @summary A polyfill to patch math round bug on some browsers.
3255
+ * @see https://stackoverflow.com/q/12830742
3256
+ */
3257
+ shaka.polyfill.MathRound = class {
3258
+ /**
3259
+ * Install the polyfill if needed.
3260
+ */
3261
+ static install() {}
3262
+ };
3263
+ /**
3264
+ * @summary A polyfill to patch MSE bugs.
3265
+ */
3266
+ shaka.polyfill.MediaSource = class {
3267
+ /**
3268
+ * Install the polyfill if needed.
3269
+ */
3270
+ static install() {}
3271
+ };
3272
+ /**
3273
+ * @summary A polyfill to implement modern, standardized EME on top of Apple's
3274
+ * prefixed EME in Safari.
3275
+ */
3276
+ shaka.polyfill.PatchedMediaKeysApple = class {
3277
+ /**
3278
+ * Installs the polyfill if needed.
3279
+ */
3280
+ static install() {}
3281
+ };
3282
+ /**
3283
+ * @summary A polyfill to implement
3284
+ * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015}
3285
+ * on top of ms-prefixed
3286
+ * {@link https://www.w3.org/TR/2014/WD-encrypted-media-20140218/ EME v20140218}
3287
+ */
3288
+ shaka.polyfill.PatchedMediaKeysMs = class {
3289
+ /**
3290
+ * Installs the polyfill if needed.
3291
+ */
3292
+ static install() {}
3293
+ };
3294
+ /**
3295
+ * @summary A polyfill to stub out
3296
+ * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
3297
+ * EME.
3298
+ * All methods will fail.
3299
+ */
3300
+ shaka.polyfill.PatchedMediaKeysNop = class {
3301
+ /**
3302
+ * Installs the polyfill if needed.
3303
+ */
3304
+ static install() {}
3305
+ };
3306
+ /**
3307
+ * @summary A polyfill to implement
3308
+ * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of
3309
+ * webkit-prefixed {@link https://bit.ly/Eme01b EME v0.1b}.
3310
+ */
3311
+ shaka.polyfill.PatchedMediaKeysWebkit = class {
3312
+ /**
3313
+ * Installs the polyfill if needed.
3314
+ */
3315
+ static install() {}
3316
+ };
3317
+ /**
3318
+ * @summary A polyfill to provide PiP support in Safari.
3319
+ * Note that Safari only supports PiP on video elements, not audio.
3320
+ */
3321
+ shaka.polyfill.PiPWebkit = class {
3322
+ /**
3323
+ * Install the polyfill if needed.
3324
+ */
3325
+ static install() {}
3326
+ };
3327
+ /**
3328
+ * @summary A polyfill to silence the play() Promise in HTML5 video.
3329
+ */
3330
+ shaka.polyfill.VideoPlayPromise = class {
3331
+ /**
3332
+ * Install the polyfill if needed.
3333
+ */
3334
+ static install() {}
3335
+ };
3336
+ /**
3337
+ * @summary A polyfill to provide MSE VideoPlaybackQuality metrics.
3338
+ * Many browsers do not yet provide this API, and Chrome currently provides
3339
+ * similar data through individual prefixed attributes on HTMLVideoElement.
3340
+ */
3341
+ shaka.polyfill.VideoPlaybackQuality = class {
3342
+ /**
3343
+ * Install the polyfill if needed.
3344
+ */
3345
+ static install() {}
3346
+ };
3347
+ /**
3348
+ * @summary A polyfill to provide VTTCue.
3349
+ */
3350
+ shaka.polyfill.VTTCue = class {
3351
+ /**
3352
+ * Install the polyfill if needed.
3353
+ */
3354
+ static install() {}
3355
+ };
3222
3356
  /**
3223
3357
  * @implements {shaka.extern.TextParser}
3224
3358
  */