shaka-player 4.1.0 → 4.1.3
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 +2 -0
- package/CHANGELOG.md +42 -0
- package/CONTRIBUTORS +4 -0
- package/README.md +20 -6
- package/demo/common/assets.js +1 -1
- package/demo/index.html +1 -3
- package/demo/main.js +3 -3
- package/dist/controls.css +1 -1
- package/dist/demo.compiled.debug.js +3 -3
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +3 -3
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +3 -3
- package/dist/locales.js +29 -29
- package/dist/receiver.compiled.debug.js +1 -1
- package/dist/receiver.compiled.debug.map +1 -1
- package/dist/receiver.compiled.js +1 -1
- package/dist/receiver.compiled.map +1 -1
- package/dist/shaka-player.compiled.d.ts +12 -1
- package/dist/shaka-player.compiled.debug.d.ts +12 -1
- package/dist/shaka-player.compiled.debug.externs.js +52 -40
- package/dist/shaka-player.compiled.debug.js +270 -257
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +52 -40
- package/dist/shaka-player.compiled.js +754 -746
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +12 -1
- package/dist/shaka-player.ui.debug.d.ts +12 -1
- package/dist/shaka-player.ui.debug.externs.js +52 -40
- package/dist/shaka-player.ui.debug.js +296 -283
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +52 -40
- package/dist/shaka-player.ui.js +874 -867
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ui.md +6 -6
- package/docs/tutorials/upgrade.md +1 -0
- package/docs/tutorials/welcome.md +6 -3
- package/externs/shaka/player.js +4 -2
- package/karma.conf.js +3 -11
- package/lib/ads/client_side_ad_manager.js +1 -1
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +183 -70
- package/lib/media/drm_engine.js +1 -1
- package/lib/media/media_source_engine.js +57 -24
- package/lib/media/presentation_timeline.js +24 -1
- package/lib/media/segment_index.js +26 -1
- package/lib/media/segment_reference.js +10 -3
- package/lib/media/streaming_engine.js +4 -4
- package/lib/media/time_ranges_utils.js +46 -0
- package/lib/player.js +1 -6
- package/lib/polyfill/media_capabilities.js +9 -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/util/buffer_utils.js +3 -0
- package/lib/util/object_utils.js +1 -0
- package/lib/util/platform.js +19 -1
- package/lib/util/stream_utils.js +24 -3
- package/lib/util/string_utils.js +102 -13
- package/maintained-branches.md +15 -0
- package/package.json +3 -5
- package/test/hls/hls_parser_unit.js +102 -8
- 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 +28 -27
- package/test/test/util/fake_media_source_engine.js +10 -9
- package/test/text/simple_text_displayer_unit.js +27 -0
- package/test/text/ui_text_displayer_unit.js +65 -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
|
@@ -923,6 +923,17 @@ declare namespace shaka.media {
|
|
|
923
923
|
getSegmentAvailabilityStart ( ) : number ;
|
|
924
924
|
isInProgress ( ) : boolean ;
|
|
925
925
|
isLive ( ) : boolean ;
|
|
926
|
+
/**
|
|
927
|
+
* Lock the presentation timeline's start time. After this is called, no
|
|
928
|
+
* further adjustments to presentationStartTime_ will be permitted.
|
|
929
|
+
* This should be called after all Periods have been parsed, and all calls to
|
|
930
|
+
* notifySegments() from the initial manifest parse have been made.
|
|
931
|
+
* Without this, we can get assertion failures in SegmentIndex for certain
|
|
932
|
+
* DAI content. If DAI adds ad segments to the manifest faster than
|
|
933
|
+
* real-time, adjustments to presentationStartTime_ can cause availability
|
|
934
|
+
* windows to jump around on updates.
|
|
935
|
+
*/
|
|
936
|
+
lockStartTime ( ) : any ;
|
|
926
937
|
/**
|
|
927
938
|
* Gives PresentationTimeline a Stream's maximum segment duration so it can
|
|
928
939
|
* size and position the segment availability window. This function should be
|
|
@@ -1644,7 +1655,7 @@ declare namespace shaka.text {
|
|
|
1644
1655
|
linePadding : any ;
|
|
1645
1656
|
nestedCues : any ;
|
|
1646
1657
|
opacity : any ;
|
|
1647
|
-
payload :
|
|
1658
|
+
payload : any ;
|
|
1648
1659
|
position : any ;
|
|
1649
1660
|
positionAlign : any ;
|
|
1650
1661
|
region : any ;
|
|
@@ -923,6 +923,17 @@ declare namespace shaka.media {
|
|
|
923
923
|
getSegmentAvailabilityStart ( ) : number ;
|
|
924
924
|
isInProgress ( ) : boolean ;
|
|
925
925
|
isLive ( ) : boolean ;
|
|
926
|
+
/**
|
|
927
|
+
* Lock the presentation timeline's start time. After this is called, no
|
|
928
|
+
* further adjustments to presentationStartTime_ will be permitted.
|
|
929
|
+
* This should be called after all Periods have been parsed, and all calls to
|
|
930
|
+
* notifySegments() from the initial manifest parse have been made.
|
|
931
|
+
* Without this, we can get assertion failures in SegmentIndex for certain
|
|
932
|
+
* DAI content. If DAI adds ad segments to the manifest faster than
|
|
933
|
+
* real-time, adjustments to presentationStartTime_ can cause availability
|
|
934
|
+
* windows to jump around on updates.
|
|
935
|
+
*/
|
|
936
|
+
lockStartTime ( ) : any ;
|
|
926
937
|
/**
|
|
927
938
|
* Gives PresentationTimeline a Stream's maximum segment duration so it can
|
|
928
939
|
* size and position the segment availability window. This function should be
|
|
@@ -1644,7 +1655,7 @@ declare namespace shaka.text {
|
|
|
1644
1655
|
linePadding : any ;
|
|
1645
1656
|
nestedCues : any ;
|
|
1646
1657
|
opacity : any ;
|
|
1647
|
-
payload :
|
|
1658
|
+
payload : any ;
|
|
1648
1659
|
position : any ;
|
|
1649
1660
|
positionAlign : any ;
|
|
1650
1661
|
region : any ;
|
|
@@ -587,7 +587,6 @@ shaka.text.Cue.prototype.direction;
|
|
|
587
587
|
shaka.text.Cue.prototype.endTime;
|
|
588
588
|
/**
|
|
589
589
|
* @override
|
|
590
|
-
* @type {string}
|
|
591
590
|
*/
|
|
592
591
|
shaka.text.Cue.prototype.payload;
|
|
593
592
|
/**
|
|
@@ -912,6 +911,7 @@ shaka.util.BufferUtils = class {
|
|
|
912
911
|
* @param {?BufferSource} arr1
|
|
913
912
|
* @param {?BufferSource} arr2
|
|
914
913
|
* @return {boolean}
|
|
914
|
+
* @suppress {strictMissingProperties}
|
|
915
915
|
*/
|
|
916
916
|
static equal(arr1, arr2) {}
|
|
917
917
|
/**
|
|
@@ -980,6 +980,43 @@ shaka.dependencies = class {
|
|
|
980
980
|
shaka.dependencies.Allowed = {
|
|
981
981
|
muxjs: 'muxjs'
|
|
982
982
|
};
|
|
983
|
+
/**
|
|
984
|
+
* A timer allows a single function to be executed at a later time or at
|
|
985
|
+
* regular intervals.
|
|
986
|
+
* @final
|
|
987
|
+
*/
|
|
988
|
+
shaka.util.Timer = class {
|
|
989
|
+
/**
|
|
990
|
+
* Create a new timer. A timer is committed to a single callback function.
|
|
991
|
+
* While there is no technical reason to do this, it is far easier to
|
|
992
|
+
* understand and use timers when they are connected to one functional idea.
|
|
993
|
+
* @param {function()} onTick
|
|
994
|
+
*/
|
|
995
|
+
constructor(onTick) {}
|
|
996
|
+
/**
|
|
997
|
+
* Have the timer call |onTick| now.
|
|
998
|
+
* @return {!shaka.util.Timer}
|
|
999
|
+
*/
|
|
1000
|
+
tickNow() {}
|
|
1001
|
+
/**
|
|
1002
|
+
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
1003
|
+
* called first.
|
|
1004
|
+
* @param {number} seconds
|
|
1005
|
+
* @return {!shaka.util.Timer}
|
|
1006
|
+
*/
|
|
1007
|
+
tickAfter(seconds) {}
|
|
1008
|
+
/**
|
|
1009
|
+
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
1010
|
+
* @param {number} seconds
|
|
1011
|
+
* @return {!shaka.util.Timer}
|
|
1012
|
+
*/
|
|
1013
|
+
tickEvery(seconds) {}
|
|
1014
|
+
/**
|
|
1015
|
+
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
1016
|
+
* after calling |stop|.
|
|
1017
|
+
*/
|
|
1018
|
+
stop() {}
|
|
1019
|
+
};
|
|
983
1020
|
/**
|
|
984
1021
|
* @namespace shaka.util.StringUtils
|
|
985
1022
|
* @summary A set of string utility functions.
|
|
@@ -1112,43 +1149,6 @@ shaka.text.TextEngine = class {
|
|
|
1112
1149
|
*/
|
|
1113
1150
|
destroy() {}
|
|
1114
1151
|
};
|
|
1115
|
-
/**
|
|
1116
|
-
* A timer allows a single function to be executed at a later time or at
|
|
1117
|
-
* regular intervals.
|
|
1118
|
-
* @final
|
|
1119
|
-
*/
|
|
1120
|
-
shaka.util.Timer = class {
|
|
1121
|
-
/**
|
|
1122
|
-
* Create a new timer. A timer is committed to a single callback function.
|
|
1123
|
-
* While there is no technical reason to do this, it is far easier to
|
|
1124
|
-
* understand and use timers when they are connected to one functional idea.
|
|
1125
|
-
* @param {function()} onTick
|
|
1126
|
-
*/
|
|
1127
|
-
constructor(onTick) {}
|
|
1128
|
-
/**
|
|
1129
|
-
* Have the timer call |onTick| now.
|
|
1130
|
-
* @return {!shaka.util.Timer}
|
|
1131
|
-
*/
|
|
1132
|
-
tickNow() {}
|
|
1133
|
-
/**
|
|
1134
|
-
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
1135
|
-
* called first.
|
|
1136
|
-
* @param {number} seconds
|
|
1137
|
-
* @return {!shaka.util.Timer}
|
|
1138
|
-
*/
|
|
1139
|
-
tickAfter(seconds) {}
|
|
1140
|
-
/**
|
|
1141
|
-
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
1142
|
-
* @param {number} seconds
|
|
1143
|
-
* @return {!shaka.util.Timer}
|
|
1144
|
-
*/
|
|
1145
|
-
tickEvery(seconds) {}
|
|
1146
|
-
/**
|
|
1147
|
-
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
1148
|
-
* after calling |stop|.
|
|
1149
|
-
*/
|
|
1150
|
-
stop() {}
|
|
1151
|
-
};
|
|
1152
1152
|
/**
|
|
1153
1153
|
* @summary
|
|
1154
1154
|
* <p>
|
|
@@ -1803,8 +1803,9 @@ shaka.media.SegmentReference = class {
|
|
|
1803
1803
|
* If not provided, the duration should be automatically calculated based on
|
|
1804
1804
|
* the duration of the reference.
|
|
1805
1805
|
* @param {?number=} syncTime
|
|
1806
|
-
* A time value, expressed in
|
|
1807
|
-
*
|
|
1806
|
+
* A time value, expressed in seconds since 1970, which is used to
|
|
1807
|
+
* synchronize between streams. Both produced and consumed by the HLS
|
|
1808
|
+
* parser. Other components should not need this value.
|
|
1808
1809
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
1809
1810
|
* The segment status is used to indicate that a segment does not exist or is
|
|
1810
1811
|
* not available.
|
|
@@ -1941,6 +1942,17 @@ shaka.media.PresentationTimeline = class {
|
|
|
1941
1942
|
* @param {!Array.<!shaka.media.SegmentReference>} references
|
|
1942
1943
|
*/
|
|
1943
1944
|
notifySegments(references) {}
|
|
1945
|
+
/**
|
|
1946
|
+
* Lock the presentation timeline's start time. After this is called, no
|
|
1947
|
+
* further adjustments to presentationStartTime_ will be permitted.
|
|
1948
|
+
* This should be called after all Periods have been parsed, and all calls to
|
|
1949
|
+
* notifySegments() from the initial manifest parse have been made.
|
|
1950
|
+
* Without this, we can get assertion failures in SegmentIndex for certain
|
|
1951
|
+
* DAI content. If DAI adds ad segments to the manifest faster than
|
|
1952
|
+
* real-time, adjustments to presentationStartTime_ can cause availability
|
|
1953
|
+
* windows to jump around on updates.
|
|
1954
|
+
*/
|
|
1955
|
+
lockStartTime() {}
|
|
1944
1956
|
/**
|
|
1945
1957
|
* Gives PresentationTimeline a Stream's minimum segment start time.
|
|
1946
1958
|
* @param {number} startTime
|