shaka-player 4.1.1 → 4.1.2

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 (129) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/CONTRIBUTORS +2 -0
  3. package/README.md +20 -6
  4. package/demo/index.html +0 -2
  5. package/dist/controls.css +1 -1
  6. package/dist/deps.js +3 -3
  7. package/dist/locales.js +31 -31
  8. package/dist/shaka-player.compiled.d.ts +11 -0
  9. package/dist/shaka-player.compiled.debug.d.ts +11 -0
  10. package/dist/shaka-player.compiled.debug.externs.js +48 -37
  11. package/dist/shaka-player.compiled.debug.js +140 -136
  12. package/dist/shaka-player.compiled.debug.map +4 -4
  13. package/dist/shaka-player.compiled.externs.js +48 -37
  14. package/dist/shaka-player.compiled.js +774 -772
  15. package/dist/shaka-player.compiled.map +4 -4
  16. package/dist/shaka-player.ui.d.ts +11 -0
  17. package/dist/shaka-player.ui.debug.d.ts +11 -0
  18. package/dist/shaka-player.ui.debug.externs.js +48 -37
  19. package/dist/shaka-player.ui.debug.js +152 -148
  20. package/dist/shaka-player.ui.debug.map +4 -4
  21. package/dist/shaka-player.ui.externs.js +48 -37
  22. package/dist/shaka-player.ui.js +884 -882
  23. package/dist/shaka-player.ui.map +4 -4
  24. package/docs/tutorials/upgrade.md +1 -0
  25. package/docs/tutorials/welcome.md +6 -3
  26. package/lib/dash/dash_parser.js +5 -0
  27. package/lib/hls/hls_parser.js +6 -2
  28. package/lib/media/media_source_engine.js +57 -24
  29. package/lib/media/presentation_timeline.js +24 -1
  30. package/lib/media/streaming_engine.js +3 -4
  31. package/lib/media/time_ranges_utils.js +46 -0
  32. package/lib/player.js +1 -1
  33. package/lib/polyfill/media_capabilities.js +3 -0
  34. package/lib/polyfill/videoplaybackquality.js +3 -1
  35. package/lib/util/platform.js +19 -1
  36. package/lib/util/string_utils.js +56 -14
  37. package/maintained-branches.md +15 -0
  38. package/package.json +2 -4
  39. package/test/media/drm_engine_integration.js +24 -8
  40. package/test/media/media_source_engine_integration.js +24 -10
  41. package/test/media/media_source_engine_unit.js +53 -38
  42. package/test/media/streaming_engine_unit.js +28 -27
  43. package/test/test/util/fake_media_source_engine.js +10 -9
  44. package/app-engine/README.md +0 -9
  45. package/app-engine/demo-version-index/README.md +0 -14
  46. package/app-engine/demo-version-index/app.yaml +0 -28
  47. package/app-engine/demo-version-index/generate.py +0 -164
  48. package/app-engine/demo-version-index/main.py +0 -11
  49. package/app-engine/demo-version-index/requirements.txt +0 -5
  50. package/app-engine/demo-version-index/templates/index.html +0 -114
  51. package/app-engine/shaka-player-demo/README.md +0 -18
  52. package/app-engine/shaka-player-demo/app.yaml +0 -61
  53. package/app-engine/shaka-player-demo/main.py +0 -95
  54. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  55. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  56. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  57. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  58. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  59. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  60. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  61. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  62. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  63. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  64. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  65. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  66. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  67. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  69. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  71. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  73. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  74. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  75. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  76. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  77. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  78. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  79. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  80. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  81. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  82. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  83. package/app-engine/shaka-player-demo/posters.py +0 -110
  84. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  85. package/app-engine/shaka-player-demo/time.txt +0 -1
  86. package/build/README.md +0 -127
  87. package/build/__init__.py +0 -0
  88. package/build/all.py +0 -150
  89. package/build/apps.py +0 -186
  90. package/build/build.py +0 -392
  91. package/build/check.py +0 -354
  92. package/build/checkversion.py +0 -84
  93. package/build/compiler.py +0 -513
  94. package/build/conformance.textproto +0 -335
  95. package/build/docker/Dockerfile +0 -20
  96. package/build/docker/docker-compose.yml +0 -10
  97. package/build/docs.py +0 -54
  98. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  99. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  100. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  101. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  102. package/build/gendeps.py +0 -71
  103. package/build/generateExterns.js +0 -867
  104. package/build/generateLocalizations.py +0 -262
  105. package/build/generateTsDefs.py +0 -137
  106. package/build/install-linux-prereqs.sh +0 -136
  107. package/build/license-header +0 -5
  108. package/build/misspellings.txt +0 -39
  109. package/build/pixelsChanged.js +0 -35
  110. package/build/shaka-lab.yaml +0 -161
  111. package/build/shakaBuildHelpers.py +0 -356
  112. package/build/stats.py +0 -816
  113. package/build/subprocessWindowsPatch.py +0 -103
  114. package/build/test.py +0 -541
  115. package/build/types/ads +0 -8
  116. package/build/types/cast +0 -6
  117. package/build/types/cea +0 -13
  118. package/build/types/complete +0 -9
  119. package/build/types/core +0 -108
  120. package/build/types/dash +0 -8
  121. package/build/types/hls +0 -9
  122. package/build/types/manifests +0 -5
  123. package/build/types/networking +0 -6
  124. package/build/types/offline +0 -22
  125. package/build/types/polyfill +0 -18
  126. package/build/types/text +0 -11
  127. package/build/types/ui +0 -39
  128. package/build/updateScreenshots.py +0 -85
  129. package/build/wrapper.template.js +0 -52
package/build/types/core DELETED
@@ -1,108 +0,0 @@
1
- # The core library. This is always included, regardless of whether it is
2
- # explicitly listed.
3
-
4
- +../../lib/abr/ewma.js
5
- +../../lib/abr/ewma_bandwidth_estimator.js
6
- +../../lib/abr/simple_abr_manager.js
7
-
8
- +../../lib/debug/asserts.js
9
- +../../lib/debug/log.js
10
-
11
- +../../lib/dependencies/all.js
12
-
13
- +../../lib/deprecate/deprecate.js
14
- +../../lib/deprecate/enforcer.js
15
- +../../lib/deprecate/version.js
16
-
17
- +../../lib/media/adaptation_set.js
18
- +../../lib/media/adaptation_set_criteria.js
19
- +../../lib/media/buffering_observer.js
20
- +../../lib/media/closed_caption_parser.js
21
- +../../lib/media/content_workarounds.js
22
- +../../lib/media/drm_engine.js
23
- +../../lib/media/gap_jumping_controller.js
24
- +../../lib/media/manifest_parser.js
25
- +../../lib/media/media_source_engine.js
26
- +../../lib/media/mp4_segment_index_parser.js
27
- +../../lib/media/play_rate_controller.js
28
- +../../lib/media/playhead.js
29
- +../../lib/media/playhead_observer.js
30
- +../../lib/media/presentation_timeline.js
31
- +../../lib/media/quality_observer.js
32
- +../../lib/media/region_observer.js
33
- +../../lib/media/region_timeline.js
34
- +../../lib/media/segment_index.js
35
- +../../lib/media/segment_reference.js
36
- +../../lib/media/stall_detector.js
37
- +../../lib/media/streaming_engine.js
38
- +../../lib/media/time_ranges_utils.js
39
- +../../lib/media/transmuxer.js
40
- +../../lib/media/video_wrapper.js
41
- +../../lib/media/webm_segment_index_parser.js
42
-
43
- +../../lib/net/backoff.js
44
- +../../lib/net/networking_engine.js
45
-
46
- +../../lib/player.js
47
-
48
- +../../lib/polyfill/all.js
49
-
50
- +../../lib/routing/node.js
51
- +../../lib/routing/payload.js
52
- +../../lib/routing/walker.js
53
-
54
- +../../lib/text/cue.js
55
- +../../lib/text/simple_text_displayer.js
56
- +../../lib/text/text_engine.js
57
- +../../lib/text/ui_text_displayer.js
58
-
59
- +../../lib/util/abortable_operation.js
60
- +../../lib/util/array_utils.js
61
- +../../lib/util/buffer_utils.js
62
- +../../lib/util/cmcd_manager.js
63
- +../../lib/util/config_utils.js
64
- +../../lib/util/data_view_reader.js
65
- +../../lib/util/delayed_tick.js
66
- +../../lib/util/destroyer.js
67
- +../../lib/util/dom_utils.js
68
- +../../lib/util/ebml_parser.js
69
- +../../lib/util/error.js
70
- +../../lib/util/event_manager.js
71
- +../../lib/util/fairplay_utils.js
72
- +../../lib/util/fake_event.js
73
- +../../lib/util/fake_event_target.js
74
- +../../lib/util/functional.js
75
- +../../lib/util/i_destroyable.js
76
- +../../lib/util/i_releasable.js
77
- +../../lib/util/iterables.js
78
- +../../lib/util/language_utils.js
79
- +../../lib/util/lazy.js
80
- +../../lib/util/manifest_parser_utils.js
81
- +../../lib/util/map_utils.js
82
- +../../lib/util/media_ready_state_utils.js
83
- +../../lib/util/mime_utils.js
84
- +../../lib/util/mp4_box_parsers.js
85
- +../../lib/util/mp4_parser.js
86
- +../../lib/util/multi_map.js
87
- +../../lib/util/networking.js
88
- +../../lib/util/object_utils.js
89
- +../../lib/util/operation_manager.js
90
- +../../lib/util/periods.js
91
- +../../lib/util/platform.js
92
- +../../lib/util/player_configuration.js
93
- +../../lib/util/pssh.js
94
- +../../lib/util/public_promise.js
95
- +../../lib/util/state_history.js
96
- +../../lib/util/stats.js
97
- +../../lib/util/stream_utils.js
98
- +../../lib/util/string_utils.js
99
- +../../lib/util/switch_history.js
100
- +../../lib/util/text_parser.js
101
- +../../lib/util/timer.js
102
- +../../lib/util/uint8array_utils.js
103
- +../../lib/util/xml_utils.js
104
-
105
- +../../third_party/closure-uri/uri.js
106
- +../../third_party/closure-uri/utils.js
107
-
108
- +@cea
package/build/types/dash DELETED
@@ -1,8 +0,0 @@
1
- # The DASH manifest parser plugin.
2
-
3
- +../../lib/dash/content_protection.js
4
- +../../lib/dash/dash_parser.js
5
- +../../lib/dash/mpd_utils.js
6
- +../../lib/dash/segment_base.js
7
- +../../lib/dash/segment_list.js
8
- +../../lib/dash/segment_template.js
package/build/types/hls DELETED
@@ -1,9 +0,0 @@
1
- # The HLS manifest parser plugin.
2
-
3
- +../../lib/hls/hls_classes.js
4
- +../../lib/hls/hls_parser.js
5
- +../../lib/hls/hls_utils.js
6
- +../../lib/hls/manifest_text_parser.js
7
-
8
- # Used by the HLS parser:
9
- +../../lib/net/data_uri_plugin.js
@@ -1,5 +0,0 @@
1
- # All standard manifest parser plugins.
2
-
3
- +@dash
4
- +@hls
5
- +@offline
@@ -1,6 +0,0 @@
1
- # All standard networking scheme plugins.
2
-
3
- +../../lib/net/http_xhr_plugin.js
4
- +../../lib/net/http_fetch_plugin.js
5
- +../../lib/net/http_plugin_utils.js
6
- +../../lib/net/data_uri_plugin.js
@@ -1,22 +0,0 @@
1
- # The offline storage system and manifest parser plugin.
2
-
3
- +../../lib/offline/download_info.js
4
- +../../lib/offline/download_manager.js
5
- +../../lib/offline/download_progress_estimator.js
6
- +../../lib/offline/indexeddb/base_storage_cell.js
7
- +../../lib/offline/indexeddb/db_connection.js
8
- +../../lib/offline/indexeddb/db_operation.js
9
- +../../lib/offline/indexeddb/eme_session_storage_cell.js
10
- +../../lib/offline/indexeddb/storage_mechanism.js
11
- +../../lib/offline/indexeddb/v1_storage_cell.js
12
- +../../lib/offline/indexeddb/v2_storage_cell.js
13
- +../../lib/offline/indexeddb/v5_storage_cell.js
14
- +../../lib/offline/manifest_converter.js
15
- +../../lib/offline/offline_manifest_parser.js
16
- +../../lib/offline/offline_scheme.js
17
- +../../lib/offline/offline_uri.js
18
- +../../lib/offline/session_deleter.js
19
- +../../lib/offline/storage.js
20
- +../../lib/offline/storage_muxer.js
21
- +../../lib/offline/stored_content_utils.js
22
- +../../lib/offline/stream_bandwidth_estimator.js
@@ -1,18 +0,0 @@
1
- # Polyfills used to emulate missing browsers features.
2
-
3
- +../../node_modules/eme-encryption-scheme-polyfill/index.js
4
- +../../lib/polyfill/aria.js
5
- +../../lib/polyfill/encryption_scheme.js
6
- +../../lib/polyfill/fullscreen.js
7
- +../../lib/polyfill/mediasource.js
8
- +../../lib/polyfill/media_capabilities.js
9
- +../../lib/polyfill/orientation.js
10
- +../../lib/polyfill/patchedmediakeys_nop.js
11
- +../../lib/polyfill/patchedmediakeys_webkit.js
12
- +../../lib/polyfill/pip_webkit.js
13
- +../../lib/polyfill/random_uuid.js
14
- +../../lib/polyfill/storage_estimate.js
15
- +../../lib/polyfill/symbol.js
16
- +../../lib/polyfill/video_play_promise.js
17
- +../../lib/polyfill/videoplaybackquality.js
18
- +../../lib/polyfill/vttcue.js
package/build/types/text DELETED
@@ -1,11 +0,0 @@
1
- # Optional plugins related to text parsing and displaying.
2
-
3
- +../../lib/text/lrc_text_parser.js
4
- +../../lib/text/mp4_ttml_parser.js
5
- +../../lib/text/mp4_vtt_parser.js
6
- +../../lib/text/sbv_text_parser.js
7
- +../../lib/text/srt_text_parser.js
8
- +../../lib/text/ssa_text_parser.js
9
- +../../lib/text/ttml_text_parser.js
10
- +../../lib/text/vtt_text_parser.js
11
- +../../lib/text/web_vtt_generator.js
package/build/types/ui DELETED
@@ -1,39 +0,0 @@
1
- # UI library.
2
-
3
- +../../third_party/language-mapping-list/language-mapping-list.js
4
- +../../ui/ad_counter.js
5
- +../../ui/ad_position.js
6
- +../../ui/audio_language_selection.js
7
- +../../ui/externs/ui.js
8
- +../../ui/play_button.js
9
- +../../ui/big_play_button.js
10
- +../../ui/airplay_button.js
11
- +../../ui/cast_button.js
12
- +../../ui/context_menu.js
13
- +../../ui/controls.js
14
- +../../ui/constants.js
15
- +../../ui/enums.js
16
- +../../ui/element.js
17
- +../../ui/fast_forward_button.js
18
- +../../ui/fullscreen_button.js
19
- +../../ui/language_utils.js
20
- +../../ui/localization.js
21
- +../../ui/loop_button.js
22
- +../../ui/mute_button.js
23
- +../../ui/overflow_menu.js
24
- +../../ui/pip_button.js
25
- +../../ui/playback_rate_selection.js
26
- +../../ui/presentation_time.js
27
- +../../ui/range_element.js
28
- +../../ui/resolution_selection.js
29
- +../../ui/rewind_button.js
30
- +../../ui/seek_bar.js
31
- +../../ui/settings_menu.js
32
- +../../ui/small_play_button.js
33
- +../../ui/skip_ad_button.js
34
- +../../ui/spacer.js
35
- +../../ui/statistics_button.js
36
- +../../ui/text_selection.js
37
- +../../ui/ui.js
38
- +../../ui/ui_utils.js
39
- +../../ui/volume_bar.js
@@ -1,85 +0,0 @@
1
- #!/usr/bin/env python
2
- #
3
- # Copyright 2016 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- """Update the screenshots in our layout tests based on the latest run."""
18
-
19
- import os
20
- import shutil
21
-
22
- import shakaBuildHelpers
23
-
24
-
25
- def main(args):
26
- base = shakaBuildHelpers.get_source_base()
27
-
28
- screenshotsFolder = os.path.join(
29
- base, 'test', 'test', 'assets', 'screenshots')
30
- pixelsChangedTool = os.path.join(
31
- base, 'build', 'pixelsChanged.js');
32
-
33
- for platform in os.listdir(screenshotsFolder):
34
- # This is a subfolder with actual screenshots.
35
- platformFolder = os.path.join(screenshotsFolder, platform)
36
-
37
- if not os.path.isdir(platformFolder):
38
- # Skip hidden files like .gitignore and non-folders
39
- continue
40
-
41
- for child in os.listdir(platformFolder):
42
- # If any args were specified, use them to filter. Either the platform or
43
- # base of the filename must match the filter.
44
- if args and not platform in args and not child.split('.')[0] in args:
45
- continue
46
-
47
- fullPath = os.path.join(platformFolder, child)
48
- # If this has the "-new" suffix, it was just written by the layout tests.
49
- # Rename it to overwrite the "official" version, which is stored in
50
- # git-lfs.
51
- if fullPath.endswith('-new'):
52
- officialPath = fullPath[:-4]
53
-
54
- # Finally, check to see if the pixels have changed before updating it.
55
- # The png file itself can be slightly different byte-for-byte even when
56
- # the image is visibly the same, and the git repo history will carry
57
- # every revision forever, getting larger with each change. So we only
58
- # want to update the image if the new one is _visibly_ different. For
59
- # this, we use the same tools we use to measure screenshot differences
60
- # in Karma.
61
- if os.path.exists(officialPath):
62
- output = shakaBuildHelpers.execute_get_output([
63
- 'node',
64
- pixelsChangedTool,
65
- officialPath,
66
- fullPath,
67
- ])
68
- pixelsChanged = float(output)
69
- else:
70
- # No original? Then everything has changed!
71
- pixelsChanged = 1e6
72
-
73
- if pixelsChanged == 0:
74
- # Nothing changed, so don't update the image. This will keep the git
75
- # history from getting bigger for no reason.
76
- continue
77
-
78
- shutil.move(fullPath, officialPath)
79
- print('Updated: ' + officialPath)
80
-
81
- return 0
82
-
83
-
84
- if __name__ == '__main__':
85
- shakaBuildHelpers.run_main(main)
@@ -1,52 +0,0 @@
1
- /*! @license
2
- * Shaka Player
3
- * Copyright 2016 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
-
7
- (function() {
8
- // This is "window" in browsers and "global" in nodejs.
9
- // See https://github.com/shaka-project/shaka-player/issues/1445
10
- var innerGlobal = typeof window != 'undefined' ? window : global;
11
-
12
- // This is where our library exports things to. It is "this" in the wrapped
13
- // code. With this, we can decide later what module loader we are in, if any,
14
- // and put these exports in the appropriate place for that loader.
15
- var exportTo = {};
16
-
17
- // According to the Closure team, their polyfills will be written to
18
- // $jscomp.global, which will be "window", or "global", or "this", depending
19
- // on circumstances.
20
- // See https://github.com/google/closure-compiler/issues/2957 and
21
- // https://github.com/shaka-project/shaka-player/issues/1455#issuecomment-393250035
22
-
23
- // We provide "global" for use by Closure, and "window" for use by the Shaka
24
- // library itself. Both point to "innerGlobal" above.
25
- // We also provide "module", which is always undefined, to prevent compiled-in
26
- // code from doing its own exports that conflict with ours.
27
- (function(window, global, module) {
28
-
29
- %output%
30
-
31
- }).call(/* this= */ exportTo,
32
- /* window= */ innerGlobal,
33
- /* global= */ innerGlobal,
34
- /* module= */ undefined);
35
-
36
- if (typeof exports != 'undefined') {
37
- // CommonJS module loader. Use "exports" instead of "module.exports" to
38
- // avoid triggering inappropriately in Electron.
39
- for (var k in exportTo.shaka) {
40
- exports[k] = exportTo.shaka[k];
41
- }
42
- } else if (typeof define == 'function' && define.amd) {
43
- // AMD module loader.
44
- define(function(){
45
- return exportTo.shaka;
46
- });
47
- } else {
48
- // Loaded as an ES module or directly in a <script> tag.
49
- // Export directly to the global scope.
50
- innerGlobal.shaka = exportTo.shaka;
51
- }
52
- })();