shaka-player 4.1.1 → 4.2.0
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 +67 -15
- package/.github/workflows/compute-incremental-coverage.py +251 -0
- package/.github/workflows/report-incremental-coverage.yaml +39 -0
- package/.github/workflows/selenium-lab-tests.yaml +44 -1
- package/AUTHORS +1 -0
- package/CHANGELOG.md +36 -8
- package/CONTRIBUTORS +3 -0
- package/README.md +20 -6
- package/demo/common/assets.js +25 -0
- package/demo/common/message_ids.js +2 -0
- package/demo/config.js +5 -1
- package/demo/index.html +1 -3
- package/demo/locales/en.json +2 -0
- package/demo/locales/source.json +8 -0
- package/dist/controls.css +1 -1
- package/dist/demo.compiled.debug.js +25 -23
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +25 -23
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +6 -5
- package/dist/locales.js +30 -30
- package/dist/receiver.compiled.debug.js +24 -22
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +24 -22
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +69 -5
- package/dist/shaka-player.compiled.debug.d.ts +69 -5
- package/dist/shaka-player.compiled.debug.externs.js +111 -42
- package/dist/shaka-player.compiled.debug.js +352 -301
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +111 -42
- package/dist/shaka-player.compiled.js +823 -802
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +69 -5
- package/dist/shaka-player.ui.debug.d.ts +69 -5
- package/dist/shaka-player.ui.debug.externs.js +111 -42
- package/dist/shaka-player.ui.debug.js +360 -310
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +111 -42
- package/dist/shaka-player.ui.js +980 -957
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +149 -0
- package/docs/tutorials/ui.md +6 -6
- package/docs/tutorials/upgrade.md +1 -0
- package/docs/tutorials/welcome.md +6 -3
- package/externs/shaka/abr_manager.js +8 -0
- package/externs/shaka/manifest.js +43 -0
- package/externs/shaka/player.js +13 -2
- package/karma.conf.js +3 -11
- package/lib/abr/simple_abr_manager.js +72 -4
- package/lib/ads/client_side_ad_manager.js +1 -1
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +123 -27
- package/lib/media/drm_engine.js +1 -3
- package/lib/media/media_source_engine.js +57 -24
- package/lib/media/presentation_timeline.js +24 -1
- package/lib/media/segment_index.js +8 -0
- package/lib/media/segment_reference.js +7 -1
- package/lib/media/streaming_engine.js +42 -6
- package/lib/media/time_ranges_utils.js +46 -0
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +8 -6
- package/lib/polyfill/media_capabilities.js +9 -0
- package/lib/polyfill/patchedmediakeys_apple.js +729 -0
- package/lib/polyfill/videoplaybackquality.js +3 -1
- package/lib/text/cue.js +0 -5
- package/lib/text/simple_text_displayer.js +21 -9
- package/lib/text/ui_text_displayer.js +83 -19
- package/lib/text/vtt_text_parser.js +61 -4
- package/lib/util/buffer_utils.js +3 -0
- package/lib/util/error.js +21 -1
- package/lib/util/fairplay_utils.js +100 -2
- package/lib/util/object_utils.js +1 -0
- package/lib/util/platform.js +30 -1
- package/lib/util/player_configuration.js +3 -10
- package/lib/util/stream_utils.js +23 -3
- package/lib/util/string_utils.js +102 -13
- package/maintained-branches.md +15 -0
- package/package.json +3 -5
- package/shaka-player.uncompiled.js +1 -0
- package/test/hls/hls_parser_unit.js +49 -33
- package/test/media/drm_engine_integration.js +24 -8
- package/test/media/media_source_engine_integration.js +24 -10
- package/test/media/media_source_engine_unit.js +53 -38
- package/test/media/streaming_engine_unit.js +107 -32
- package/test/test/util/fake_media_source_engine.js +10 -9
- package/test/test/util/simple_fakes.js +4 -0
- package/test/test/util/streaming_engine_util.js +10 -2
- package/test/text/simple_text_displayer_unit.js +27 -0
- package/test/text/ui_text_displayer_unit.js +65 -0
- package/test/text/vtt_text_parser_unit.js +26 -0
- package/test/util/string_utils_unit.js +46 -8
- package/ui/text_selection.js +2 -2
- package/app-engine/README.md +0 -9
- package/app-engine/demo-version-index/README.md +0 -14
- package/app-engine/demo-version-index/app.yaml +0 -28
- package/app-engine/demo-version-index/generate.py +0 -164
- package/app-engine/demo-version-index/main.py +0 -11
- package/app-engine/demo-version-index/requirements.txt +0 -5
- package/app-engine/demo-version-index/templates/index.html +0 -114
- package/app-engine/shaka-player-demo/README.md +0 -18
- package/app-engine/shaka-player-demo/app.yaml +0 -61
- package/app-engine/shaka-player-demo/main.py +0 -95
- package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
- package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
- package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
- package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
- package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
- package/app-engine/shaka-player-demo/posters/standard.png +0 -0
- package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
- package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
- package/app-engine/shaka-player-demo/posters.py +0 -110
- package/app-engine/shaka-player-demo/requirements.txt +0 -5
- package/app-engine/shaka-player-demo/time.txt +0 -1
- package/build/README.md +0 -127
- package/build/__init__.py +0 -0
- package/build/all.py +0 -150
- package/build/apps.py +0 -186
- package/build/build.py +0 -392
- package/build/check.py +0 -354
- package/build/checkversion.py +0 -84
- package/build/compiler.py +0 -513
- package/build/conformance.textproto +0 -335
- package/build/docker/Dockerfile +0 -20
- package/build/docker/docker-compose.yml +0 -10
- package/build/docs.py +0 -54
- package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
- package/build/eslint-plugin-shaka-rules/index.js +0 -24
- package/build/eslint-plugin-shaka-rules/package.json +0 -7
- package/build/eslint-plugin-shaka-rules/private.js +0 -109
- package/build/gendeps.py +0 -71
- package/build/generateExterns.js +0 -867
- package/build/generateLocalizations.py +0 -262
- package/build/generateTsDefs.py +0 -137
- package/build/install-linux-prereqs.sh +0 -136
- package/build/license-header +0 -5
- package/build/misspellings.txt +0 -39
- package/build/pixelsChanged.js +0 -35
- package/build/shaka-lab.yaml +0 -161
- package/build/shakaBuildHelpers.py +0 -356
- package/build/stats.py +0 -816
- package/build/subprocessWindowsPatch.py +0 -103
- package/build/test.py +0 -541
- package/build/types/ads +0 -8
- package/build/types/cast +0 -6
- package/build/types/cea +0 -13
- package/build/types/complete +0 -9
- package/build/types/core +0 -108
- package/build/types/dash +0 -8
- package/build/types/hls +0 -9
- package/build/types/manifests +0 -5
- package/build/types/networking +0 -6
- package/build/types/offline +0 -22
- package/build/types/polyfill +0 -18
- package/build/types/text +0 -11
- package/build/types/ui +0 -39
- package/build/updateScreenshots.py +0 -85
- package/build/wrapper.template.js +0 -52
|
@@ -61,7 +61,6 @@ shaka.text.Cue.prototype.direction;
|
|
|
61
61
|
shaka.text.Cue.prototype.endTime;
|
|
62
62
|
/**
|
|
63
63
|
* @override
|
|
64
|
-
* @type {string}
|
|
65
64
|
*/
|
|
66
65
|
shaka.text.Cue.prototype.payload;
|
|
67
66
|
/**
|
|
@@ -386,6 +385,7 @@ shaka.util.BufferUtils = class {
|
|
|
386
385
|
* @param {?BufferSource} arr1
|
|
387
386
|
* @param {?BufferSource} arr2
|
|
388
387
|
* @return {boolean}
|
|
388
|
+
* @suppress {strictMissingProperties}
|
|
389
389
|
*/
|
|
390
390
|
static equal(arr1, arr2) {}
|
|
391
391
|
/**
|
|
@@ -604,6 +604,10 @@ shaka.util.Error.Code = {
|
|
|
604
604
|
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
605
605
|
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
606
606
|
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
607
|
+
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
608
|
+
'NO_WEB_CRYPTO_API': 4042,
|
|
609
|
+
'HLS_AES_128_INVALID_IV_LENGTH': 4043,
|
|
610
|
+
'HLS_AES_128_INVALID_KEY_LENGTH': 4044,
|
|
607
611
|
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
608
612
|
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
609
613
|
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
@@ -653,6 +657,43 @@ shaka.util.Error.Code = {
|
|
|
653
657
|
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
654
658
|
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
|
|
655
659
|
};
|
|
660
|
+
/**
|
|
661
|
+
* A timer allows a single function to be executed at a later time or at
|
|
662
|
+
* regular intervals.
|
|
663
|
+
* @final
|
|
664
|
+
*/
|
|
665
|
+
shaka.util.Timer = class {
|
|
666
|
+
/**
|
|
667
|
+
* Create a new timer. A timer is committed to a single callback function.
|
|
668
|
+
* While there is no technical reason to do this, it is far easier to
|
|
669
|
+
* understand and use timers when they are connected to one functional idea.
|
|
670
|
+
* @param {function()} onTick
|
|
671
|
+
*/
|
|
672
|
+
constructor(onTick) {}
|
|
673
|
+
/**
|
|
674
|
+
* Have the timer call |onTick| now.
|
|
675
|
+
* @return {!shaka.util.Timer}
|
|
676
|
+
*/
|
|
677
|
+
tickNow() {}
|
|
678
|
+
/**
|
|
679
|
+
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
680
|
+
* called first.
|
|
681
|
+
* @param {number} seconds
|
|
682
|
+
* @return {!shaka.util.Timer}
|
|
683
|
+
*/
|
|
684
|
+
tickAfter(seconds) {}
|
|
685
|
+
/**
|
|
686
|
+
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
687
|
+
* @param {number} seconds
|
|
688
|
+
* @return {!shaka.util.Timer}
|
|
689
|
+
*/
|
|
690
|
+
tickEvery(seconds) {}
|
|
691
|
+
/**
|
|
692
|
+
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
693
|
+
* after calling |stop|.
|
|
694
|
+
*/
|
|
695
|
+
stop() {}
|
|
696
|
+
};
|
|
656
697
|
/**
|
|
657
698
|
* @namespace shaka.util.StringUtils
|
|
658
699
|
* @summary A set of string utility functions.
|
|
@@ -928,43 +969,6 @@ shaka.util.LanguageUtils = class {
|
|
|
928
969
|
*/
|
|
929
970
|
static findClosestLocale(target, searchSpace) {}
|
|
930
971
|
};
|
|
931
|
-
/**
|
|
932
|
-
* A timer allows a single function to be executed at a later time or at
|
|
933
|
-
* regular intervals.
|
|
934
|
-
* @final
|
|
935
|
-
*/
|
|
936
|
-
shaka.util.Timer = class {
|
|
937
|
-
/**
|
|
938
|
-
* Create a new timer. A timer is committed to a single callback function.
|
|
939
|
-
* While there is no technical reason to do this, it is far easier to
|
|
940
|
-
* understand and use timers when they are connected to one functional idea.
|
|
941
|
-
* @param {function()} onTick
|
|
942
|
-
*/
|
|
943
|
-
constructor(onTick) {}
|
|
944
|
-
/**
|
|
945
|
-
* Have the timer call |onTick| now.
|
|
946
|
-
* @return {!shaka.util.Timer}
|
|
947
|
-
*/
|
|
948
|
-
tickNow() {}
|
|
949
|
-
/**
|
|
950
|
-
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
951
|
-
* called first.
|
|
952
|
-
* @param {number} seconds
|
|
953
|
-
* @return {!shaka.util.Timer}
|
|
954
|
-
*/
|
|
955
|
-
tickAfter(seconds) {}
|
|
956
|
-
/**
|
|
957
|
-
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
958
|
-
* @param {number} seconds
|
|
959
|
-
* @return {!shaka.util.Timer}
|
|
960
|
-
*/
|
|
961
|
-
tickEvery(seconds) {}
|
|
962
|
-
/**
|
|
963
|
-
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
964
|
-
* after calling |stop|.
|
|
965
|
-
*/
|
|
966
|
-
stop() {}
|
|
967
|
-
};
|
|
968
972
|
/**
|
|
969
973
|
* @summary
|
|
970
974
|
* <p>
|
|
@@ -1023,6 +1027,10 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
1023
1027
|
* @override
|
|
1024
1028
|
*/
|
|
1025
1029
|
playbackRateChanged(rate) {}
|
|
1030
|
+
/**
|
|
1031
|
+
* @override
|
|
1032
|
+
*/
|
|
1033
|
+
setMediaElement(mediaElement) {}
|
|
1026
1034
|
/**
|
|
1027
1035
|
* @override
|
|
1028
1036
|
*/
|
|
@@ -1333,7 +1341,8 @@ shaka.net.NetworkingEngine.RequestType = {
|
|
|
1333
1341
|
'LICENSE': 2,
|
|
1334
1342
|
'APP': 3,
|
|
1335
1343
|
'TIMING': 4,
|
|
1336
|
-
'SERVER_CERTIFICATE': 5
|
|
1344
|
+
'SERVER_CERTIFICATE': 5,
|
|
1345
|
+
'KEY': 6
|
|
1337
1346
|
};
|
|
1338
1347
|
/**
|
|
1339
1348
|
* Priority level for network scheme plugins.
|
|
@@ -1702,8 +1711,10 @@ shaka.media.SegmentReference = class {
|
|
|
1702
1711
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
1703
1712
|
* The segment status is used to indicate that a segment does not exist or is
|
|
1704
1713
|
* not available.
|
|
1714
|
+
* @param {?shaka.extern.HlsAes128Key=} hlsAes128Key
|
|
1715
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1705
1716
|
*/
|
|
1706
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status) {}
|
|
1717
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, hlsAes128Key) {}
|
|
1707
1718
|
/**
|
|
1708
1719
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1709
1720
|
* @return {!Array.<string>}
|
|
@@ -1835,6 +1846,17 @@ shaka.media.PresentationTimeline = class {
|
|
|
1835
1846
|
* @param {!Array.<!shaka.media.SegmentReference>} references
|
|
1836
1847
|
*/
|
|
1837
1848
|
notifySegments(references) {}
|
|
1849
|
+
/**
|
|
1850
|
+
* Lock the presentation timeline's start time. After this is called, no
|
|
1851
|
+
* further adjustments to presentationStartTime_ will be permitted.
|
|
1852
|
+
* This should be called after all Periods have been parsed, and all calls to
|
|
1853
|
+
* notifySegments() from the initial manifest parse have been made.
|
|
1854
|
+
* Without this, we can get assertion failures in SegmentIndex for certain
|
|
1855
|
+
* DAI content. If DAI adds ad segments to the manifest faster than
|
|
1856
|
+
* real-time, adjustments to presentationStartTime_ can cause availability
|
|
1857
|
+
* windows to jump around on updates.
|
|
1858
|
+
*/
|
|
1859
|
+
lockStartTime() {}
|
|
1838
1860
|
/**
|
|
1839
1861
|
* Gives PresentationTimeline a Stream's minimum segment start time.
|
|
1840
1862
|
* @param {number} startTime
|
|
@@ -2039,6 +2061,10 @@ shaka.media.SegmentIterator = class {
|
|
|
2039
2061
|
* @param {number} partialSegmentIndex
|
|
2040
2062
|
*/
|
|
2041
2063
|
constructor(segmentIndex, index, partialSegmentIndex) {}
|
|
2064
|
+
/**
|
|
2065
|
+
* @return {number}
|
|
2066
|
+
*/
|
|
2067
|
+
currentPosition() {}
|
|
2042
2068
|
/**
|
|
2043
2069
|
* @return {shaka.media.SegmentReference}
|
|
2044
2070
|
*/
|
|
@@ -3709,6 +3735,16 @@ shaka.polyfill.Orientation = class {
|
|
|
3709
3735
|
*/
|
|
3710
3736
|
static install() {}
|
|
3711
3737
|
};
|
|
3738
|
+
/**
|
|
3739
|
+
* @summary A polyfill to implement modern, standardized EME on top of Apple's
|
|
3740
|
+
* prefixed EME in Safari.
|
|
3741
|
+
*/
|
|
3742
|
+
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3743
|
+
/**
|
|
3744
|
+
* Installs the polyfill if needed.
|
|
3745
|
+
*/
|
|
3746
|
+
static install() {}
|
|
3747
|
+
};
|
|
3712
3748
|
/**
|
|
3713
3749
|
* @summary A polyfill to stub out
|
|
3714
3750
|
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
@@ -3988,11 +4024,44 @@ shaka.util.FairPlayUtils = class {
|
|
|
3988
4024
|
*/
|
|
3989
4025
|
static initDataTransform(initData, contentId, cert) {}
|
|
3990
4026
|
/**
|
|
3991
|
-
*
|
|
4027
|
+
* Verimatrix initDataTransform configuration.
|
|
4028
|
+
* @param {!Uint8Array} initData
|
|
4029
|
+
* @param {string} initDataType
|
|
4030
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4031
|
+
*/
|
|
4032
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4033
|
+
/**
|
|
4034
|
+
* EZDRM initDataTransform configuration.
|
|
4035
|
+
* @param {!Uint8Array} initData
|
|
4036
|
+
* @param {string} initDataType
|
|
4037
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4038
|
+
*/
|
|
4039
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4040
|
+
/**
|
|
4041
|
+
* Conax initDataTransform configuration.
|
|
4042
|
+
* @param {!Uint8Array} initData
|
|
4043
|
+
* @param {string} initDataType
|
|
4044
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4045
|
+
*/
|
|
4046
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4047
|
+
/**
|
|
4048
|
+
* Verimatrix FairPlay request.
|
|
4049
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4050
|
+
* @param {shaka.extern.Request} request
|
|
4051
|
+
*/
|
|
4052
|
+
static verimatrixFairPlayRequest(type, request) {}
|
|
4053
|
+
/**
|
|
4054
|
+
* EZDRM FairPlay request.
|
|
4055
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4056
|
+
* @param {shaka.extern.Request} request
|
|
4057
|
+
*/
|
|
4058
|
+
static ezdrmFairPlayRequest(type, request) {}
|
|
4059
|
+
/**
|
|
4060
|
+
* Conax FairPlay request.
|
|
3992
4061
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
3993
4062
|
* @param {shaka.extern.Request} request
|
|
3994
4063
|
*/
|
|
3995
|
-
static
|
|
4064
|
+
static conaxFairPlayRequest(type, request) {}
|
|
3996
4065
|
/**
|
|
3997
4066
|
* Common FairPlay response transform for some DRMs providers.
|
|
3998
4067
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|