shaka-player 3.2.0 → 3.2.4
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.
- package/.github/workflows/build_and_test.yaml +73 -0
- package/.github/workflows/release.yaml +53 -0
- package/AUTHORS +3 -0
- package/CHANGELOG.md +182 -1
- package/CONTRIBUTORS +3 -0
- package/README.md +4 -4
- package/build/checkversion.py +1 -1
- package/build/generateExterns.js +1 -1
- package/build/misspellings.txt +1 -0
- package/build/shakaBuildHelpers.py +6 -5
- package/build/subprocessWindowsPatch.py +103 -0
- package/build/test.py +6 -0
- package/demo/common/assets.js +1 -1
- package/demo/index.html +1 -1
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +1 -1
- package/dist/demo.compiled.js +1 -1
- package/dist/deps.js +8 -8
- package/dist/locales.js +37 -37
- package/dist/receiver.compiled.debug.js +1 -1
- package/dist/receiver.compiled.js +1 -1
- package/dist/shaka-player.compiled.d.ts +195 -5
- package/dist/shaka-player.compiled.debug.d.ts +195 -5
- package/dist/shaka-player.compiled.debug.externs.js +226 -14
- package/dist/shaka-player.compiled.debug.js +424 -399
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +226 -14
- package/dist/shaka-player.compiled.js +826 -812
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +197 -16
- package/dist/shaka-player.ui.debug.d.ts +197 -16
- package/dist/shaka-player.ui.debug.externs.js +230 -27
- package/dist/shaka-player.ui.debug.js +466 -442
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +230 -27
- package/dist/shaka-player.ui.js +946 -932
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +1 -1
- package/docs/tutorials/faq.md +14 -0
- package/docs/tutorials/ui.md +5 -5
- package/externs/ima.js +4 -0
- package/externs/shaka/ads.js +25 -0
- package/externs/shaka/player.js +8 -0
- package/externs/shaka/text.js +10 -0
- package/karma.conf.js +20 -15
- package/lib/ads/ad_manager.js +46 -26
- package/lib/ads/client_side_ad_manager.js +82 -88
- package/lib/ads/server_side_ad_manager.js +45 -13
- package/lib/cast/cast_proxy.js +6 -2
- package/lib/cast/cast_receiver.js +5 -1
- package/lib/cast/cast_sender.js +2 -2
- package/lib/cea/sei_processor.js +24 -17
- package/lib/dash/dash_parser.js +131 -24
- package/lib/dash/segment_list.js +1 -1
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +74 -17
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/closed_caption_parser.js +3 -1
- package/lib/media/content_workarounds.js +12 -0
- package/lib/media/drm_engine.js +20 -1
- package/lib/media/gap_jumping_controller.js +8 -4
- package/lib/media/media_source_engine.js +1 -2
- package/lib/media/playhead.js +1 -1
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/segment_index.js +2 -1
- package/lib/media/segment_reference.js +19 -1
- package/lib/media/streaming_engine.js +8 -4
- package/lib/net/networking_engine.js +6 -1
- package/lib/offline/download_manager.js +1 -2
- package/lib/offline/storage.js +8 -9
- package/lib/player.js +129 -59
- package/lib/polyfill/aria.js +12 -2
- package/lib/polyfill/encryption_scheme.js +2 -0
- package/lib/polyfill/fullscreen.js +2 -0
- package/lib/polyfill/mathround.js +2 -0
- package/lib/polyfill/media_capabilities.js +73 -21
- package/lib/polyfill/mediasource.js +8 -0
- package/lib/polyfill/orientation.js +3 -1
- package/lib/polyfill/patchedmediakeys_apple.js +6 -4
- package/lib/polyfill/patchedmediakeys_ms.js +6 -4
- package/lib/polyfill/patchedmediakeys_nop.js +2 -0
- package/lib/polyfill/patchedmediakeys_webkit.js +6 -4
- package/lib/polyfill/pip_webkit.js +2 -0
- package/lib/polyfill/storage_estimate.js +2 -0
- package/lib/polyfill/video_play_promise.js +2 -0
- package/lib/polyfill/videoplaybackquality.js +2 -0
- package/lib/polyfill/vttcue.js +2 -0
- package/lib/text/cue.js +6 -0
- package/lib/text/mp4_ttml_parser.js +3 -0
- package/lib/text/text_engine.js +14 -2
- package/lib/text/ttml_text_parser.js +135 -87
- package/lib/text/ui_text_displayer.js +213 -80
- package/lib/text/vtt_text_parser.js +4 -2
- package/lib/text/web_vtt_generator.js +21 -12
- package/lib/util/fake_event.js +53 -7
- package/lib/util/fake_event_target.js +21 -1
- package/lib/util/mp4_box_parsers.js +1 -1
- package/lib/util/periods.js +4 -1
- package/lib/util/platform.js +13 -1
- package/lib/util/stream_utils.js +105 -13
- package/lib/util/xml_utils.js +50 -12
- package/package.json +3 -6
- package/roadmap.md +24 -22
- package/test/cast/cast_proxy_unit.js +12 -6
- package/test/cast/cast_receiver_integration.js +1 -1
- package/test/cast/cast_utils_unit.js +1 -1
- package/test/cea/mp4_cea_parser_unit.js +26 -0
- package/test/dash/dash_parser_live_unit.js +43 -0
- package/test/dash/dash_parser_manifest_unit.js +222 -3
- package/test/hls/hls_parser_unit.js +79 -1
- package/test/media/closed_caption_parser_unit.js +20 -0
- package/test/media/drm_engine_integration.js +86 -2
- package/test/media/drm_engine_unit.js +57 -0
- package/test/media/playhead_unit.js +27 -1
- package/test/media/region_observer_unit.js +40 -5
- package/test/media/region_timeline_unit.js +40 -22
- package/test/media/streaming_engine_integration.js +2 -1
- package/test/media/streaming_engine_unit.js +145 -0
- package/test/player_integration.js +79 -8
- package/test/player_src_equals_integration.js +41 -8
- package/test/player_unit.js +14 -4
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +30 -0
- package/test/test/assets/3675/dash_1.mpd +30 -0
- package/test/test/assets/3675/dash_2.mpd +30 -0
- package/test/test/assets/3675/dash_3.mpd +30 -0
- package/test/test/assets/3675/dash_4.mpd +30 -0
- package/test/test/assets/3675/dash_5.mpd +26 -0
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/assets/chapters.vtt +2 -2
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/assets/empty_caption_video_init.mp4 +0 -0
- package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
- package/test/test/util/fake_ad_manager.js +11 -1
- package/test/test/util/ttml_utils.js +81 -0
- package/test/test/util/util.js +10 -7
- package/test/text/mp4_ttml_parser_unit.js +11 -18
- package/test/text/ttml_text_parser_unit.js +542 -220
- package/test/text/ui_text_displayer_unit.js +93 -20
- package/test/text/vtt_text_parser_unit.js +17 -1
- package/test/text/web_vtt_generator_unit.js +58 -3
- package/test/ui/localization_unit.js +15 -14
- package/test/ui/text_displayer_layout_unit.js +21 -8
- package/test/util/mp4_box_parsers_unit.js +28 -0
- package/test/util/stream_utils_unit.js +60 -3
- package/ui/cast_button.js +2 -3
- package/ui/controls.js +11 -6
- package/ui/less/buttons.less +0 -4
- package/ui/less/containers.less +6 -7
- package/ui/locales/ru.json +6 -6
- package/ui/localization.js +40 -87
- package/ui/pip_button.js +2 -3
- package/ui/seek_bar.js +1 -2
- package/ui/text_selection.js +1 -0
|
@@ -473,8 +473,9 @@ declare namespace shaka.ads {
|
|
|
473
473
|
/**
|
|
474
474
|
* A class responsible for ad-related interactions.
|
|
475
475
|
*/
|
|
476
|
-
class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager {
|
|
476
|
+
class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager , shaka.util.IReleasable {
|
|
477
477
|
private noStructuralTyping_shaka_ads_AdManager : any;
|
|
478
|
+
getServerSideCuePoints ( ) : shaka.extern.AdCuePoint [] ;
|
|
478
479
|
getStats ( ) : shaka.extern.AdsStats ;
|
|
479
480
|
initClientSide (adContainer : any , video : any ) : any ;
|
|
480
481
|
initServerSide (adContainer : any , video : any ) : any ;
|
|
@@ -482,6 +483,7 @@ declare namespace shaka.ads {
|
|
|
482
483
|
onCueMetadataChange (value : any ) : any ;
|
|
483
484
|
onDashTimedMetadata (region : any ) : any ;
|
|
484
485
|
onHlsTimedMetadata (metadata : any , timestamp : any ) : any ;
|
|
486
|
+
release ( ) : any ;
|
|
485
487
|
replaceServerSideAdTagParameters (adTagParameters : any ) : any ;
|
|
486
488
|
requestClientSideAds (imaRequest : any ) : any ;
|
|
487
489
|
requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
|
|
@@ -1117,7 +1119,7 @@ declare namespace shaka.media {
|
|
|
1117
1119
|
*/
|
|
1118
1120
|
class SegmentReference {
|
|
1119
1121
|
private noStructuralTyping_shaka_media_SegmentReference : any;
|
|
1120
|
-
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null ) ;
|
|
1122
|
+
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null , tileDuration ? : number | null ) ;
|
|
1121
1123
|
/**
|
|
1122
1124
|
* Returns the offset from the start of the resource to the end of the
|
|
1123
1125
|
* segment, inclusive. A value of null indicates that the segment extends to
|
|
@@ -1137,6 +1139,11 @@ declare namespace shaka.media {
|
|
|
1137
1139
|
* Returns the segment's start time in seconds.
|
|
1138
1140
|
*/
|
|
1139
1141
|
getStartTime ( ) : number ;
|
|
1142
|
+
/**
|
|
1143
|
+
* Returns the segment's explicit tile duration.
|
|
1144
|
+
* Only defined in image segments.
|
|
1145
|
+
*/
|
|
1146
|
+
getTileDuration ( ) : number | null ;
|
|
1140
1147
|
/**
|
|
1141
1148
|
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1142
1149
|
*/
|
|
@@ -1437,6 +1444,172 @@ declare namespace shaka {
|
|
|
1437
1444
|
}
|
|
1438
1445
|
}
|
|
1439
1446
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1447
|
+
declare namespace shaka.polyfill {
|
|
1448
|
+
class Aria {
|
|
1449
|
+
private noStructuralTyping_shaka_polyfill_Aria : any;
|
|
1450
|
+
/**
|
|
1451
|
+
* Install the polyfill if needed.
|
|
1452
|
+
*/
|
|
1453
|
+
static install ( ) : any ;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1457
|
+
declare namespace shaka.polyfill {
|
|
1458
|
+
class EncryptionScheme {
|
|
1459
|
+
private noStructuralTyping_shaka_polyfill_EncryptionScheme : any;
|
|
1460
|
+
/**
|
|
1461
|
+
* Install the polyfill if needed.
|
|
1462
|
+
*/
|
|
1463
|
+
static install ( ) : any ;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1467
|
+
declare namespace shaka.polyfill {
|
|
1468
|
+
class Fullscreen {
|
|
1469
|
+
private noStructuralTyping_shaka_polyfill_Fullscreen : any;
|
|
1470
|
+
/**
|
|
1471
|
+
* Install the polyfill if needed.
|
|
1472
|
+
*/
|
|
1473
|
+
static install ( ) : any ;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1477
|
+
declare namespace shaka.polyfill {
|
|
1478
|
+
class MathRound {
|
|
1479
|
+
private noStructuralTyping_shaka_polyfill_MathRound : any;
|
|
1480
|
+
/**
|
|
1481
|
+
* Install the polyfill if needed.
|
|
1482
|
+
*/
|
|
1483
|
+
static install ( ) : any ;
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1487
|
+
declare namespace shaka.polyfill {
|
|
1488
|
+
class MediaCapabilities {
|
|
1489
|
+
private noStructuralTyping_shaka_polyfill_MediaCapabilities : any;
|
|
1490
|
+
/**
|
|
1491
|
+
* Install the polyfill if needed.
|
|
1492
|
+
*/
|
|
1493
|
+
static install ( ) : any ;
|
|
1494
|
+
/**
|
|
1495
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
1496
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
1497
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
1498
|
+
*/
|
|
1499
|
+
static originalMcap : any | null ;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1503
|
+
declare namespace shaka.polyfill {
|
|
1504
|
+
class MediaSource {
|
|
1505
|
+
private noStructuralTyping_shaka_polyfill_MediaSource : any;
|
|
1506
|
+
/**
|
|
1507
|
+
* Install the polyfill if needed.
|
|
1508
|
+
*/
|
|
1509
|
+
static install ( ) : any ;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1513
|
+
declare namespace shaka.polyfill {
|
|
1514
|
+
class Orientation {
|
|
1515
|
+
private noStructuralTyping_shaka_polyfill_Orientation : any;
|
|
1516
|
+
/**
|
|
1517
|
+
* Install the polyfill if needed.
|
|
1518
|
+
*/
|
|
1519
|
+
static install ( ) : any ;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1523
|
+
declare namespace shaka.polyfill {
|
|
1524
|
+
class PatchedMediaKeysApple {
|
|
1525
|
+
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysApple : any;
|
|
1526
|
+
/**
|
|
1527
|
+
* Installs the polyfill if needed.
|
|
1528
|
+
*/
|
|
1529
|
+
static install ( ) : any ;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1533
|
+
declare namespace shaka.polyfill {
|
|
1534
|
+
class PatchedMediaKeysMs {
|
|
1535
|
+
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysMs : any;
|
|
1536
|
+
/**
|
|
1537
|
+
* Installs the polyfill if needed.
|
|
1538
|
+
*/
|
|
1539
|
+
static install ( ) : any ;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1543
|
+
declare namespace shaka.polyfill {
|
|
1544
|
+
class PatchedMediaKeysNop {
|
|
1545
|
+
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysNop : any;
|
|
1546
|
+
/**
|
|
1547
|
+
* Installs the polyfill if needed.
|
|
1548
|
+
*/
|
|
1549
|
+
static install ( ) : any ;
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1553
|
+
declare namespace shaka.polyfill {
|
|
1554
|
+
class PatchedMediaKeysWebkit {
|
|
1555
|
+
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysWebkit : any;
|
|
1556
|
+
/**
|
|
1557
|
+
* Installs the polyfill if needed.
|
|
1558
|
+
*/
|
|
1559
|
+
static install ( ) : any ;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1563
|
+
declare namespace shaka.polyfill {
|
|
1564
|
+
class PiPWebkit {
|
|
1565
|
+
private noStructuralTyping_shaka_polyfill_PiPWebkit : any;
|
|
1566
|
+
/**
|
|
1567
|
+
* Install the polyfill if needed.
|
|
1568
|
+
*/
|
|
1569
|
+
static install ( ) : any ;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1573
|
+
declare namespace shaka.polyfill {
|
|
1574
|
+
class StorageEstimate {
|
|
1575
|
+
private noStructuralTyping_shaka_polyfill_StorageEstimate : any;
|
|
1576
|
+
/**
|
|
1577
|
+
* Install the polyfill if needed.
|
|
1578
|
+
*/
|
|
1579
|
+
static install ( ) : any ;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1583
|
+
declare namespace shaka.polyfill {
|
|
1584
|
+
class VTTCue {
|
|
1585
|
+
private noStructuralTyping_shaka_polyfill_VTTCue : any;
|
|
1586
|
+
/**
|
|
1587
|
+
* Install the polyfill if needed.
|
|
1588
|
+
*/
|
|
1589
|
+
static install ( ) : any ;
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1593
|
+
declare namespace shaka.polyfill {
|
|
1594
|
+
class VideoPlayPromise {
|
|
1595
|
+
private noStructuralTyping_shaka_polyfill_VideoPlayPromise : any;
|
|
1596
|
+
/**
|
|
1597
|
+
* Install the polyfill if needed.
|
|
1598
|
+
*/
|
|
1599
|
+
static install ( ) : any ;
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1603
|
+
declare namespace shaka.polyfill {
|
|
1604
|
+
class VideoPlaybackQuality {
|
|
1605
|
+
private noStructuralTyping_shaka_polyfill_VideoPlaybackQuality : any;
|
|
1606
|
+
/**
|
|
1607
|
+
* Install the polyfill if needed.
|
|
1608
|
+
*/
|
|
1609
|
+
static install ( ) : any ;
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
1440
1613
|
declare namespace shaka.text {
|
|
1441
1614
|
class Cue implements shaka.extern.Cue {
|
|
1442
1615
|
private noStructuralTyping_shaka_text_Cue : any;
|
|
@@ -1457,6 +1630,7 @@ declare namespace shaka.text {
|
|
|
1457
1630
|
fontStyle : any ;
|
|
1458
1631
|
fontWeight : any ;
|
|
1459
1632
|
id : any ;
|
|
1633
|
+
isContainer : any ;
|
|
1460
1634
|
letterSpacing : any ;
|
|
1461
1635
|
line : any ;
|
|
1462
1636
|
/**
|
|
@@ -2169,12 +2343,12 @@ declare namespace shaka.util {
|
|
|
2169
2343
|
declare namespace shaka.util {
|
|
2170
2344
|
class FakeEvent extends Event {
|
|
2171
2345
|
private noStructuralTyping_shaka_util_FakeEvent : any;
|
|
2172
|
-
constructor (type : string , dict ? : object | null ) ;
|
|
2346
|
+
constructor (type : string , dict ? : Map < string , object | null > | null ) ;
|
|
2173
2347
|
}
|
|
2174
2348
|
}
|
|
2175
2349
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
2176
2350
|
declare namespace shaka.util {
|
|
2177
|
-
class FakeEventTarget implements EventTarget {
|
|
2351
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2178
2352
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2179
2353
|
/**
|
|
2180
2354
|
* Add an event listener to this object.
|
|
@@ -2194,6 +2368,7 @@ declare namespace shaka.util {
|
|
|
2194
2368
|
* @param listener The callback or listener object to invoke.
|
|
2195
2369
|
*/
|
|
2196
2370
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2371
|
+
release ( ) : any ;
|
|
2197
2372
|
/**
|
|
2198
2373
|
* Remove an event listener from this object.
|
|
2199
2374
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -2596,6 +2771,7 @@ declare namespace google.ima {
|
|
|
2596
2771
|
constructor (container : google.ima.AdDisplayContainer ) ;
|
|
2597
2772
|
addEventListener ( ) : any ;
|
|
2598
2773
|
contentComplete ( ) : any ;
|
|
2774
|
+
destroy ( ) : any ;
|
|
2599
2775
|
dispatchEvent ( ) : any ;
|
|
2600
2776
|
getSettings ( ) : google.ima.ImaSdkSettings | null ;
|
|
2601
2777
|
removeEventListener ( ) : any ;
|
|
@@ -2607,6 +2783,7 @@ declare namespace google.ima {
|
|
|
2607
2783
|
class AdsManager implements EventTarget {
|
|
2608
2784
|
private noStructuralTyping_google_ima_AdsManager : any;
|
|
2609
2785
|
addEventListener ( ) : any ;
|
|
2786
|
+
destroy ( ) : any ;
|
|
2610
2787
|
dispatchEvent ( ) : any ;
|
|
2611
2788
|
getAdSkippableState ( ) : boolean ;
|
|
2612
2789
|
getCuePoints ( ) : number [] ;
|
|
@@ -2976,6 +3153,10 @@ declare namespace shaka.extern.AbrManager {
|
|
|
2976
3153
|
type SwitchCallback = (a : shaka.extern.Variant , b ? : boolean , c ? : number ) => any ;
|
|
2977
3154
|
}
|
|
2978
3155
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/ads.js
|
|
3156
|
+
declare namespace shaka.extern {
|
|
3157
|
+
type AdCuePoint = { end : number | null , start : number } ;
|
|
3158
|
+
}
|
|
3159
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/ads.js
|
|
2979
3160
|
declare namespace shaka.extern {
|
|
2980
3161
|
type AdsStats = { loadTimes : number [] , playedCompletely : number , skipped : number , started : number } ;
|
|
2981
3162
|
}
|
|
@@ -3015,6 +3196,7 @@ declare namespace shaka.extern {
|
|
|
3015
3196
|
* in the player.
|
|
3016
3197
|
*/
|
|
3017
3198
|
interface IAdManager extends EventTarget {
|
|
3199
|
+
getServerSideCuePoints ( ) : shaka.extern.AdCuePoint [] ;
|
|
3018
3200
|
/**
|
|
3019
3201
|
* Get statistics for the current playback session. If the player is not
|
|
3020
3202
|
* playing content, this will return an empty stats object.
|
|
@@ -3026,6 +3208,7 @@ declare namespace shaka.extern {
|
|
|
3026
3208
|
onCueMetadataChange (value : shaka.extern.ID3Metadata ) : any ;
|
|
3027
3209
|
onDashTimedMetadata (region : shaka.extern.TimelineRegionInfo ) : any ;
|
|
3028
3210
|
onHlsTimedMetadata (metadata : shaka.extern.ID3Metadata , timestampOffset : number ) : any ;
|
|
3211
|
+
release ( ) : any ;
|
|
3029
3212
|
replaceServerSideAdTagParameters (adTagParameters : object | null ) : any ;
|
|
3030
3213
|
requestClientSideAds (imaRequest : google.ima.AdsRequest ) : any ;
|
|
3031
3214
|
requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
|
|
@@ -3491,7 +3674,7 @@ declare namespace shaka.extern {
|
|
|
3491
3674
|
}
|
|
3492
3675
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3493
3676
|
declare namespace shaka.extern {
|
|
3494
|
-
type Thumbnail = { duration : number , height : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3677
|
+
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3495
3678
|
}
|
|
3496
3679
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3497
3680
|
declare namespace shaka.extern {
|
|
@@ -3568,6 +3751,13 @@ declare namespace shaka.extern {
|
|
|
3568
3751
|
* Id of the cue.
|
|
3569
3752
|
*/
|
|
3570
3753
|
id : string ;
|
|
3754
|
+
/**
|
|
3755
|
+
* If true, this represents a container element that is "above" the main
|
|
3756
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
3757
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
3758
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
3759
|
+
*/
|
|
3760
|
+
isContainer : boolean ;
|
|
3571
3761
|
/**
|
|
3572
3762
|
* Text letter spacing as a CSS letter-spacing value.
|
|
3573
3763
|
*/
|
|
@@ -168,6 +168,10 @@ shaka.text.Cue.prototype.id;
|
|
|
168
168
|
* @override
|
|
169
169
|
*/
|
|
170
170
|
shaka.text.Cue.prototype.nestedCues;
|
|
171
|
+
/**
|
|
172
|
+
* @override
|
|
173
|
+
*/
|
|
174
|
+
shaka.text.Cue.prototype.isContainer;
|
|
171
175
|
/**
|
|
172
176
|
* @override
|
|
173
177
|
*/
|
|
@@ -958,15 +962,28 @@ shaka.util.AbortableOperation.prototype.promise;
|
|
|
958
962
|
shaka.util.FakeEvent = class {
|
|
959
963
|
/**
|
|
960
964
|
* @param {string} type
|
|
961
|
-
* @param {Object
|
|
965
|
+
* @param {Map.<string, Object>=} dict
|
|
962
966
|
*/
|
|
963
967
|
constructor(type, dict) {}
|
|
964
968
|
};
|
|
969
|
+
/**
|
|
970
|
+
* An interface to standardize how objects release internal references
|
|
971
|
+
* synchronously. If an object needs to asynchronously release references, then
|
|
972
|
+
* it should use 'shaka.util.IDestroyable'.
|
|
973
|
+
* @interface
|
|
974
|
+
*/
|
|
975
|
+
shaka.util.IReleasable = class {
|
|
976
|
+
/**
|
|
977
|
+
* Request that this object release all internal references.
|
|
978
|
+
*/
|
|
979
|
+
release() {}
|
|
980
|
+
};
|
|
965
981
|
/**
|
|
966
982
|
* @summary A work-alike for EventTarget. Only DOM elements may be true
|
|
967
983
|
* EventTargets, but this can be used as a base class to provide event dispatch
|
|
968
984
|
* to non-DOM classes. Only FakeEvents should be dispatched.
|
|
969
985
|
* @implements {EventTarget}
|
|
986
|
+
* @implements {shaka.util.IReleasable}
|
|
970
987
|
*/
|
|
971
988
|
shaka.util.FakeEventTarget = class {
|
|
972
989
|
/** */
|
|
@@ -1004,6 +1021,10 @@ shaka.util.FakeEventTarget = class {
|
|
|
1004
1021
|
* @override
|
|
1005
1022
|
*/
|
|
1006
1023
|
dispatchEvent(event) {}
|
|
1024
|
+
/**
|
|
1025
|
+
* @override
|
|
1026
|
+
*/
|
|
1027
|
+
release() {}
|
|
1007
1028
|
};
|
|
1008
1029
|
/**
|
|
1009
1030
|
* These are the listener types defined in the closure extern for EventTarget.
|
|
@@ -1161,18 +1182,6 @@ shaka.net.NetworkingEngine.PluginPriority = {
|
|
|
1161
1182
|
'PREFERRED': 2,
|
|
1162
1183
|
'APPLICATION': 3
|
|
1163
1184
|
};
|
|
1164
|
-
/**
|
|
1165
|
-
* An interface to standardize how objects release internal references
|
|
1166
|
-
* synchronously. If an object needs to asynchronously release references, then
|
|
1167
|
-
* it should use 'shaka.util.IDestroyable'.
|
|
1168
|
-
* @interface
|
|
1169
|
-
*/
|
|
1170
|
-
shaka.util.IReleasable = class {
|
|
1171
|
-
/**
|
|
1172
|
-
* Request that this object release all internal references.
|
|
1173
|
-
*/
|
|
1174
|
-
release() {}
|
|
1175
|
-
};
|
|
1176
1185
|
/**
|
|
1177
1186
|
* @summary
|
|
1178
1187
|
* An EventManager maintains a collection of "event
|
|
@@ -1524,8 +1533,12 @@ shaka.media.SegmentReference = class {
|
|
|
1524
1533
|
* The value is a grid-item-dimension consisting of two positive decimal
|
|
1525
1534
|
* integers in the format: column-x-row ('4x3'). It describes the
|
|
1526
1535
|
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
|
|
1536
|
+
* @param {?number=} tileDuration
|
|
1537
|
+
* The explicit duration of an individual tile within the tiles grid.
|
|
1538
|
+
* If not provided, the duration should be automatically calculated based on
|
|
1539
|
+
* the duration of the reference.
|
|
1527
1540
|
*/
|
|
1528
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout) {}
|
|
1541
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
|
|
1529
1542
|
/**
|
|
1530
1543
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1531
1544
|
* @return {!Array.<string>}
|
|
@@ -1559,6 +1572,12 @@ shaka.media.SegmentReference = class {
|
|
|
1559
1572
|
* @return {?string}
|
|
1560
1573
|
*/
|
|
1561
1574
|
getTilesLayout() {}
|
|
1575
|
+
/**
|
|
1576
|
+
* Returns the segment's explicit tile duration.
|
|
1577
|
+
* Only defined in image segments.
|
|
1578
|
+
* @return {?number}
|
|
1579
|
+
*/
|
|
1580
|
+
getTileDuration() {}
|
|
1562
1581
|
};
|
|
1563
1582
|
/**
|
|
1564
1583
|
* PresentationTimeline.
|
|
@@ -2748,6 +2767,7 @@ shaka.ads.ServerSideAd = class {
|
|
|
2748
2767
|
/**
|
|
2749
2768
|
* A class responsible for ad-related interactions.
|
|
2750
2769
|
* @implements {shaka.extern.IAdManager}
|
|
2770
|
+
* @implements {shaka.util.IReleasable}
|
|
2751
2771
|
*/
|
|
2752
2772
|
shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
2753
2773
|
/** */
|
|
@@ -2760,6 +2780,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
2760
2780
|
* @override
|
|
2761
2781
|
*/
|
|
2762
2782
|
initClientSide(adContainer, video) {}
|
|
2783
|
+
/**
|
|
2784
|
+
* @override
|
|
2785
|
+
*/
|
|
2786
|
+
release() {}
|
|
2763
2787
|
/**
|
|
2764
2788
|
* @override
|
|
2765
2789
|
*/
|
|
@@ -2783,6 +2807,11 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
2783
2807
|
* @override
|
|
2784
2808
|
*/
|
|
2785
2809
|
replaceServerSideAdTagParameters(adTagParameters) {}
|
|
2810
|
+
/**
|
|
2811
|
+
* @return {!Array.<!shaka.extern.AdCuePoint>}
|
|
2812
|
+
* @override
|
|
2813
|
+
*/
|
|
2814
|
+
getServerSideCuePoints() {}
|
|
2786
2815
|
/**
|
|
2787
2816
|
* @return {shaka.extern.AdsStats}
|
|
2788
2817
|
* @override
|
|
@@ -3398,6 +3427,189 @@ shaka.polyfill = class {
|
|
|
3398
3427
|
*/
|
|
3399
3428
|
static register(polyfill, priority) {}
|
|
3400
3429
|
};
|
|
3430
|
+
/**
|
|
3431
|
+
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3432
|
+
* browsers that do not implement it (e.g. Firefox).
|
|
3433
|
+
* Note that IE also does not support ARIAMixin, but this polyfill does not work
|
|
3434
|
+
* for that platform, as it relies on getters and setters.
|
|
3435
|
+
* @see https://w3c.github.io/aria/#ARIAMixin
|
|
3436
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element
|
|
3437
|
+
*/
|
|
3438
|
+
shaka.polyfill.Aria = class {
|
|
3439
|
+
/**
|
|
3440
|
+
* Install the polyfill if needed.
|
|
3441
|
+
*/
|
|
3442
|
+
static install() {}
|
|
3443
|
+
};
|
|
3444
|
+
/**
|
|
3445
|
+
* @summary A polyfill to add support for EncryptionScheme queries in EME.
|
|
3446
|
+
* @see https://wicg.github.io/encrypted-media-encryption-scheme/
|
|
3447
|
+
* @see https://github.com/w3c/encrypted-media/pull/457
|
|
3448
|
+
* @see https://github.com/google/eme-encryption-scheme-polyfill
|
|
3449
|
+
*/
|
|
3450
|
+
shaka.polyfill.EncryptionScheme = class {
|
|
3451
|
+
/**
|
|
3452
|
+
* Install the polyfill if needed.
|
|
3453
|
+
* @suppress {missingRequire}
|
|
3454
|
+
*/
|
|
3455
|
+
static install() {}
|
|
3456
|
+
};
|
|
3457
|
+
/**
|
|
3458
|
+
* @summary A polyfill to unify fullscreen APIs across browsers.
|
|
3459
|
+
* Many browsers have prefixed fullscreen methods on Element and document.
|
|
3460
|
+
* See {@link https://mzl.la/2K0xcHo Using fullscreen mode} on MDN for more
|
|
3461
|
+
* information.
|
|
3462
|
+
*/
|
|
3463
|
+
shaka.polyfill.Fullscreen = class {
|
|
3464
|
+
/**
|
|
3465
|
+
* Install the polyfill if needed.
|
|
3466
|
+
*/
|
|
3467
|
+
static install() {}
|
|
3468
|
+
};
|
|
3469
|
+
/**
|
|
3470
|
+
* @summary A polyfill to patch math round bug on some browsers.
|
|
3471
|
+
* @see https://stackoverflow.com/q/12830742
|
|
3472
|
+
*/
|
|
3473
|
+
shaka.polyfill.MathRound = class {
|
|
3474
|
+
/**
|
|
3475
|
+
* Install the polyfill if needed.
|
|
3476
|
+
*/
|
|
3477
|
+
static install() {}
|
|
3478
|
+
};
|
|
3479
|
+
/**
|
|
3480
|
+
* @summary A polyfill to provide navigator.mediaCapabilities on all browsers.
|
|
3481
|
+
* This is necessary for Tizen 3, Xbox One and possibly others we have yet to
|
|
3482
|
+
* discover.
|
|
3483
|
+
*/
|
|
3484
|
+
shaka.polyfill.MediaCapabilities = class {
|
|
3485
|
+
/**
|
|
3486
|
+
* Install the polyfill if needed.
|
|
3487
|
+
* @suppress {const}
|
|
3488
|
+
*/
|
|
3489
|
+
static install() {}
|
|
3490
|
+
};
|
|
3491
|
+
/**
|
|
3492
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
3493
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
3494
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
3495
|
+
* @type {MediaCapabilities}
|
|
3496
|
+
*/
|
|
3497
|
+
shaka.polyfill.MediaCapabilities.originalMcap;
|
|
3498
|
+
/**
|
|
3499
|
+
* @summary A polyfill to patch MSE bugs.
|
|
3500
|
+
*/
|
|
3501
|
+
shaka.polyfill.MediaSource = class {
|
|
3502
|
+
/**
|
|
3503
|
+
* Install the polyfill if needed.
|
|
3504
|
+
*/
|
|
3505
|
+
static install() {}
|
|
3506
|
+
};
|
|
3507
|
+
/**
|
|
3508
|
+
* @summary A polyfill for systems that do not implement screen.orientation.
|
|
3509
|
+
* For now, this only handles systems that implement the deprecated
|
|
3510
|
+
* window.orientation feature... e.g. iPad.
|
|
3511
|
+
*/
|
|
3512
|
+
shaka.polyfill.Orientation = class {
|
|
3513
|
+
/**
|
|
3514
|
+
* Install the polyfill if needed.
|
|
3515
|
+
*/
|
|
3516
|
+
static install() {}
|
|
3517
|
+
};
|
|
3518
|
+
/**
|
|
3519
|
+
* @summary A polyfill to implement modern, standardized EME on top of Apple's
|
|
3520
|
+
* prefixed EME in Safari.
|
|
3521
|
+
*/
|
|
3522
|
+
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3523
|
+
/**
|
|
3524
|
+
* Installs the polyfill if needed.
|
|
3525
|
+
*/
|
|
3526
|
+
static install() {}
|
|
3527
|
+
};
|
|
3528
|
+
/**
|
|
3529
|
+
* @summary A polyfill to implement
|
|
3530
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015}
|
|
3531
|
+
* on top of ms-prefixed
|
|
3532
|
+
* {@link https://www.w3.org/TR/2014/WD-encrypted-media-20140218/ EME v20140218}
|
|
3533
|
+
*/
|
|
3534
|
+
shaka.polyfill.PatchedMediaKeysMs = class {
|
|
3535
|
+
/**
|
|
3536
|
+
* Installs the polyfill if needed.
|
|
3537
|
+
*/
|
|
3538
|
+
static install() {}
|
|
3539
|
+
};
|
|
3540
|
+
/**
|
|
3541
|
+
* @summary A polyfill to stub out
|
|
3542
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
3543
|
+
* EME.
|
|
3544
|
+
* All methods will fail.
|
|
3545
|
+
*/
|
|
3546
|
+
shaka.polyfill.PatchedMediaKeysNop = class {
|
|
3547
|
+
/**
|
|
3548
|
+
* Installs the polyfill if needed.
|
|
3549
|
+
*/
|
|
3550
|
+
static install() {}
|
|
3551
|
+
};
|
|
3552
|
+
/**
|
|
3553
|
+
* @summary A polyfill to implement
|
|
3554
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of
|
|
3555
|
+
* webkit-prefixed {@link https://bit.ly/Eme01b EME v0.1b}.
|
|
3556
|
+
*/
|
|
3557
|
+
shaka.polyfill.PatchedMediaKeysWebkit = class {
|
|
3558
|
+
/**
|
|
3559
|
+
* Installs the polyfill if needed.
|
|
3560
|
+
*/
|
|
3561
|
+
static install() {}
|
|
3562
|
+
};
|
|
3563
|
+
/**
|
|
3564
|
+
* @summary A polyfill to provide PiP support in Safari.
|
|
3565
|
+
* Note that Safari only supports PiP on video elements, not audio.
|
|
3566
|
+
*/
|
|
3567
|
+
shaka.polyfill.PiPWebkit = class {
|
|
3568
|
+
/**
|
|
3569
|
+
* Install the polyfill if needed.
|
|
3570
|
+
*/
|
|
3571
|
+
static install() {}
|
|
3572
|
+
};
|
|
3573
|
+
/**
|
|
3574
|
+
* @summary A polyfill to provide navigator.storage.estimate in old
|
|
3575
|
+
* webkit browsers.
|
|
3576
|
+
* See: https://developers.google.com/web/updates/2017/08/estimating-available-storage-space#the-present
|
|
3577
|
+
*/
|
|
3578
|
+
shaka.polyfill.StorageEstimate = class {
|
|
3579
|
+
/**
|
|
3580
|
+
* Install the polyfill if needed.
|
|
3581
|
+
*/
|
|
3582
|
+
static install() {}
|
|
3583
|
+
};
|
|
3584
|
+
/**
|
|
3585
|
+
* @summary A polyfill to silence the play() Promise in HTML5 video.
|
|
3586
|
+
*/
|
|
3587
|
+
shaka.polyfill.VideoPlayPromise = class {
|
|
3588
|
+
/**
|
|
3589
|
+
* Install the polyfill if needed.
|
|
3590
|
+
*/
|
|
3591
|
+
static install() {}
|
|
3592
|
+
};
|
|
3593
|
+
/**
|
|
3594
|
+
* @summary A polyfill to provide MSE VideoPlaybackQuality metrics.
|
|
3595
|
+
* Many browsers do not yet provide this API, and Chrome currently provides
|
|
3596
|
+
* similar data through individual prefixed attributes on HTMLVideoElement.
|
|
3597
|
+
*/
|
|
3598
|
+
shaka.polyfill.VideoPlaybackQuality = class {
|
|
3599
|
+
/**
|
|
3600
|
+
* Install the polyfill if needed.
|
|
3601
|
+
*/
|
|
3602
|
+
static install() {}
|
|
3603
|
+
};
|
|
3604
|
+
/**
|
|
3605
|
+
* @summary A polyfill to provide VTTCue.
|
|
3606
|
+
*/
|
|
3607
|
+
shaka.polyfill.VTTCue = class {
|
|
3608
|
+
/**
|
|
3609
|
+
* Install the polyfill if needed.
|
|
3610
|
+
*/
|
|
3611
|
+
static install() {}
|
|
3612
|
+
};
|
|
3401
3613
|
/**
|
|
3402
3614
|
* LRC file format: https://en.wikipedia.org/wiki/LRC_(file_format)
|
|
3403
3615
|
* @implements {shaka.extern.TextParser}
|