shaka-player 3.3.0 → 3.3.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/.csslintrc +11 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/pull_request_template.md +6 -34
- package/.github/workflows/build-and-test.yaml +130 -0
- package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
- package/.github/workflows/demo-version-index.yaml +29 -0
- package/.github/workflows/nightly-demo.yaml +42 -0
- package/.github/workflows/release-please.yaml +145 -0
- package/.github/workflows/safari-homedir-launcher.sh +18 -0
- package/.github/workflows/selenium-lab-tests.yaml +93 -0
- package/AUTHORS +2 -0
- package/CHANGELOG.md +1722 -1640
- package/CONTRIBUTING.md +2 -2
- package/CONTRIBUTORS +2 -0
- package/README.md +7 -7
- package/app-engine/README.md +9 -0
- package/app-engine/demo-version-index/README.md +14 -0
- package/app-engine/demo-version-index/app.yaml +2 -0
- package/app-engine/demo-version-index/main.py +162 -0
- package/app-engine/demo-version-index/requirements.txt +6 -0
- package/app-engine/demo-version-index/templates/index.html +114 -0
- package/app-engine/shaka-player-demo/README.md +18 -0
- package/app-engine/shaka-player-demo/app.yaml +61 -0
- package/app-engine/shaka-player-demo/main.py +95 -0
- 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 +46 -0
- 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 +110 -0
- package/app-engine/shaka-player-demo/requirements.txt +5 -0
- package/app-engine/shaka-player-demo/time.txt +1 -0
- package/build/README.md +1 -1
- package/build/checkversion.py +1 -1
- package/build/conformance.textproto +196 -169
- package/build/docker/Dockerfile +20 -0
- package/build/docker/docker-compose.yml +10 -0
- package/build/gendeps.py +18 -15
- package/build/shaka-lab.yaml +163 -0
- package/build/shakaBuildHelpers.py +4 -29
- package/build/test.py +93 -28
- package/build/types/polyfill +1 -0
- package/build/wrapper.template.js +2 -2
- package/demo/TengwarTelcontar.woff2 +0 -0
- package/demo/asset_card.js +1 -2
- package/demo/cast_receiver/index.html +1 -1
- package/demo/cast_receiver/receiver_app.css +14 -14
- package/demo/common/assets.js +2 -0
- package/demo/config.js +0 -1
- package/demo/custom.js +0 -1
- package/demo/customWarning.txt +2 -2
- package/demo/demo.less +29 -18
- package/demo/demo_uncompiled.js +1 -13
- package/demo/index.html +1 -1
- package/demo/main.js +3 -3
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +191 -194
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +191 -194
- package/dist/demo.compiled.map +4 -4
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +233 -226
- package/dist/locales.js +30 -30
- package/dist/receiver.compiled.debug.js +43 -45
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +43 -45
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +272 -238
- package/dist/shaka-player.compiled.debug.d.ts +272 -238
- package/dist/shaka-player.compiled.debug.externs.js +53 -16
- package/dist/shaka-player.compiled.debug.js +393 -394
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +53 -16
- package/dist/shaka-player.compiled.js +840 -843
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +318 -293
- package/dist/shaka-player.ui.debug.d.ts +318 -293
- package/dist/shaka-player.ui.debug.externs.js +55 -27
- package/dist/shaka-player.ui.debug.js +415 -417
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +55 -27
- package/dist/shaka-player.ui.js +997 -1000
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/REDESIGN.md +33 -33
- package/docs/design/bg-fetch.md +2 -2
- package/docs/design/codec_preferences.md +1 -1
- package/docs/design/dash-audio-channels.md +3 -3
- package/docs/design/dash-manifests.md +1 -1
- package/docs/design/gap-jumping.md +3 -3
- package/docs/design/preload.md +2 -2
- package/docs/tutorials/faq.md +8 -8
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/plugins.md +3 -3
- package/docs/tutorials/selenium-grid-config.md +122 -0
- package/docs/tutorials/welcome.md +10 -2
- package/externs/cmcd.js +186 -0
- package/externs/shaka/player.js +8 -0
- package/externs/shaka/text.js +10 -0
- package/karma.conf.js +156 -45
- package/lib/abr/simple_abr_manager.js +12 -6
- package/lib/ads/ad_manager.js +1 -0
- package/lib/cast/cast_proxy.js +6 -4
- package/lib/cast/cast_receiver.js +3 -0
- package/lib/cea/cea608_data_channel.js +2 -2
- package/lib/cea/cea708_service.js +5 -4
- package/lib/cea/mp4_cea_parser.js +11 -5
- package/lib/cea/sei_processor.js +6 -3
- package/lib/dash/dash_parser.js +40 -30
- package/lib/dash/mpd_utils.js +4 -5
- package/lib/dash/segment_list.js +1 -2
- package/lib/dash/segment_template.js +3 -3
- package/lib/hls/hls_parser.js +41 -9
- package/lib/hls/manifest_text_parser.js +4 -3
- package/lib/media/adaptation_set.js +1 -2
- package/lib/media/content_workarounds.js +2 -2
- package/lib/media/drm_engine.js +3 -2
- package/lib/media/media_source_engine.js +3 -2
- package/lib/media/mp4_segment_index_parser.js +1 -4
- package/lib/media/playhead.js +2 -2
- package/lib/media/presentation_timeline.js +18 -8
- package/lib/media/quality_observer.js +17 -34
- 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 +12 -9
- package/lib/media/time_ranges_utils.js +1 -3
- package/lib/media/video_wrapper.js +1 -1
- package/lib/net/networking_engine.js +5 -1
- package/lib/offline/storage.js +12 -13
- package/lib/player.js +87 -41
- package/lib/polyfill/all.js +2 -3
- package/lib/polyfill/encryption_scheme.js +1 -1
- package/lib/polyfill/media_capabilities.js +32 -17
- package/lib/polyfill/mediasource.js +1 -1
- package/lib/polyfill/symbol.js +46 -0
- package/lib/text/cue.js +7 -1
- package/lib/text/simple_text_displayer.js +2 -1
- package/lib/text/ttml_text_parser.js +92 -63
- package/lib/text/ui_text_displayer.js +18 -12
- package/lib/util/buffer_utils.js +1 -3
- package/lib/util/cmcd_manager.js +47 -201
- package/lib/util/ebml_parser.js +3 -3
- package/lib/util/error.js +1 -1
- package/lib/util/fake_event_target.js +21 -1
- package/lib/util/iterables.js +0 -46
- package/lib/util/mp4_box_parsers.js +1 -4
- package/lib/util/mp4_parser.js +5 -7
- package/lib/util/periods.js +10 -11
- package/lib/util/platform.js +3 -3
- package/lib/util/pssh.js +1 -4
- package/lib/util/stream_utils.js +88 -11
- package/lib/util/string_utils.js +3 -5
- package/lib/util/uint8array_utils.js +3 -5
- package/lib/util/xml_utils.js +34 -7
- package/package.json +62 -40
- package/roadmap.md +17 -17
- package/shaka-player.uncompiled.js +1 -0
- package/test/abr/simple_abr_manager_unit.js +3 -8
- package/test/ads/ad_manager_unit.js +0 -6
- package/test/cast/cast_proxy_unit.js +0 -8
- package/test/cast/cast_receiver_integration.js +1 -18
- package/test/cast/cast_receiver_unit.js +1 -9
- package/test/cast/cast_sender_unit.js +0 -6
- package/test/cast/cast_utils_unit.js +0 -13
- package/test/cea/cea608_memory_unit.js +0 -5
- package/test/cea/cea708_service_unit.js +0 -7
- package/test/cea/cea708_window_unit.js +0 -5
- package/test/cea/cea_decoder_unit.js +0 -6
- package/test/cea/dtvcc_packet_builder_unit.js +0 -3
- package/test/cea/dtvcc_packet_unit.js +0 -5
- package/test/cea/mp4_cea_parser_unit.js +0 -4
- package/test/dash/dash_parser_content_protection_unit.js +1 -10
- package/test/dash/dash_parser_live_unit.js +45 -15
- package/test/dash/dash_parser_manifest_unit.js +4 -17
- package/test/dash/dash_parser_segment_base_unit.js +1 -8
- package/test/dash/dash_parser_segment_list_unit.js +1 -7
- package/test/dash/dash_parser_segment_template_unit.js +0 -9
- package/test/dash/mpd_utils_unit.js +3 -11
- package/test/demo/demo_unit.js +0 -5
- package/test/deprecate/enforcer_unit.js +0 -4
- package/test/deprecate/version_unit.js +0 -2
- package/test/hls/hls_live_unit.js +2 -14
- package/test/hls/hls_parser_unit.js +76 -15
- package/test/hls/manifest_text_parser_unit.js +0 -10
- package/test/media/adaptation_set_criteria_unit.js +3 -7
- package/test/media/adaptation_set_unit.js +0 -2
- package/test/media/buffering_observer_unit.js +1 -4
- package/test/media/closed_caption_parser_unit.js +0 -3
- package/test/media/drm_engine_integration.js +2 -15
- package/test/media/drm_engine_unit.js +7 -27
- package/test/media/manifest_parser_unit.js +0 -4
- package/test/media/media_source_engine_integration.js +0 -7
- package/test/media/media_source_engine_unit.js +1 -14
- package/test/media/mp4_segment_index_parser_unit.js +0 -4
- package/test/media/play_rate_controller_unit.js +0 -4
- package/test/media/playhead_unit.js +8 -16
- package/test/media/presentation_timeline_unit.js +4 -7
- package/test/media/quality_observer_unit.js +4 -5
- package/test/media/region_observer_unit.js +40 -10
- package/test/media/region_timeline_unit.js +40 -25
- package/test/media/segment_index_unit.js +0 -6
- package/test/media/segment_reference_unit.js +0 -3
- package/test/media/stall_detector_unit.js +0 -5
- package/test/media/streaming_engine_integration.js +11 -37
- package/test/media/streaming_engine_unit.js +155 -34
- package/test/media/time_ranges_utils_unit.js +0 -2
- package/test/media/transmuxer_integration.js +0 -6
- package/test/media/webm_segment_index_parser_unit.js +0 -4
- package/test/net/data_uri_plugin_unit.js +0 -7
- package/test/net/http_plugin_unit.js +0 -9
- package/test/net/networking_engine_unit.js +0 -11
- package/test/offline/download_progress_estimator_unit.js +0 -2
- package/test/offline/indexeddb_storage_unit.js +0 -6
- package/test/offline/manifest_convert_unit.js +0 -8
- package/test/offline/offline_integration.js +1 -10
- package/test/offline/offline_manifest_parser_unit.js +0 -6
- package/test/offline/offline_scheme_unit.js +0 -8
- package/test/offline/offline_uri_unit.js +0 -2
- package/test/offline/storage_compatibility_unit.js +1 -14
- package/test/offline/storage_integration.js +1 -27
- package/test/player_external.js +2 -10
- package/test/player_integration.js +63 -36
- package/test/player_load_graph_integration.js +1 -6
- package/test/player_src_equals_external.js +3 -9
- package/test/player_src_equals_integration.js +41 -15
- package/test/player_unit.js +71 -46
- package/test/routing/walker_unit.js +0 -8
- package/test/test/assets/chapters.vtt +2 -2
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/assets/large_file.mpd +1 -1
- package/test/test/boot.js +75 -22
- package/test/test/externs/jasmine.js +2 -2
- package/test/test/externs/karma.js +4 -0
- package/test/test/namespace.js +10 -0
- package/test/test/util/canned_idb.js +0 -8
- package/test/test/util/cea_utils.js +0 -6
- package/test/test/util/dash_parser_util.js +0 -13
- package/test/test/util/fake_ad.js +0 -3
- package/test/test/util/fake_ad_manager.js +0 -9
- package/test/test/util/fake_demo_main.js +0 -5
- package/test/test/util/fake_drm_engine.js +0 -6
- package/test/test/util/fake_media_source_engine.js +0 -7
- package/test/test/util/fake_networking_engine.js +0 -5
- package/test/test/util/fake_text_displayer.js +0 -5
- package/test/test/util/indexeddb_utils.js +1 -10
- package/test/test/util/jasmine_fetch.js +0 -1
- package/test/test/util/loader.js +0 -18
- package/test/test/util/manifest_generator.js +9 -14
- package/test/test/util/manifest_parser_util.js +0 -6
- package/test/test/util/offline_utils.js +0 -5
- package/test/test/util/simple_fakes.js +9 -26
- package/test/test/util/stream_generator.js +0 -14
- package/test/test/util/streaming_engine_util.js +0 -15
- package/test/test/util/test_scheme.js +1 -19
- package/test/test/util/ttml_utils.js +79 -0
- package/test/test/util/ui_utils.js +0 -9
- package/test/test/util/util.js +15 -26
- package/test/test/util/waiter.js +84 -43
- package/test/text/cue_integration.js +0 -4
- package/test/text/lrc_text_parser_unit.js +0 -4
- package/test/text/mp4_ttml_parser_unit.js +10 -23
- package/test/text/mp4_vtt_parser_unit.js +1 -7
- package/test/text/sbv_text_parser_unit.js +0 -4
- package/test/text/simple_text_displayer_unit.js +1 -8
- package/test/text/srt_text_parser_unit.js +0 -4
- package/test/text/ssa_text_parser_unit.js +0 -5
- package/test/text/text_engine_unit.js +2 -7
- package/test/text/text_track_integration.js +0 -2
- package/test/text/ttml_text_parser_unit.js +499 -239
- package/test/text/ui_text_displayer_unit.js +44 -41
- package/test/text/vtt_text_parser_unit.js +0 -9
- package/test/text/web_vtt_generator_unit.js +0 -3
- package/test/ui/ad_ui_unit.js +0 -11
- package/test/ui/localization_unit.js +0 -3
- package/test/ui/text_displayer_layout_unit.js +9 -19
- package/test/ui/ui_customization_unit.js +0 -6
- package/test/ui/ui_integration.js +0 -16
- package/test/ui/ui_unit.js +1 -17
- package/test/util/abortable_operation_unit.js +4 -9
- package/test/util/array_utils_unit.js +0 -2
- package/test/util/buffer_utils_unit.js +0 -2
- package/test/util/cmcd_manager_unit.js +29 -18
- package/test/util/data_view_reader_unit.js +0 -4
- package/test/util/ebml_parser_unit.js +0 -4
- package/test/util/event_manager_unit.js +0 -3
- package/test/util/fake_event_target_unit.js +0 -5
- package/test/util/functional_unit.js +1 -1
- package/test/util/iterables_unit.js +0 -64
- package/test/util/language_utils_unit.js +0 -3
- package/test/util/manifest_parser_utils_unit.js +0 -2
- package/test/util/mp4_box_parsers_unit.js +0 -5
- package/test/util/mp4_parser_unit.js +0 -4
- package/test/util/multi_map_unit.js +0 -3
- package/test/util/object_utils_unit.js +0 -2
- package/test/util/periods_unit.js +14 -7
- package/test/util/pssh_unit.js +0 -5
- package/test/util/state_history_unit.js +0 -2
- package/test/util/stream_utils_unit.js +39 -38
- package/test/util/string_utils_unit.js +0 -6
- package/test/util/text_parser_unit.js +0 -2
- package/test/util/xml_utils_unit.js +0 -4
- package/third_party/closure-uri/uri.js +21 -0
- package/ui/controls.js +3 -0
- package/ui/less/ad_controls.less +4 -4
- package/ui/less/buttons.less +5 -5
- package/ui/less/containers.less +9 -11
- package/ui/less/overflow_menu.less +4 -4
- package/ui/less/range_elements.less +5 -0
- package/ui/less/tooltip.less +1 -1
- package/ui/locales/sjn-translations.yaml +257 -0
- package/ui/locales/sjn.json +42 -0
- package/ui/localization.js +12 -36
- package/ui/text_selection.js +1 -0
- package/externs/media_capabilities.js +0 -16
- package/externs/svgelement.js +0 -18
- package/externs/webcrypto.js +0 -18
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Shaka Player Demo - Poster Definitions
|
|
2
|
+
# Copyright 2022 Google LLC
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
# A Doodle-like service to change the poster on certain days.
|
|
6
|
+
# All posters are chosen based on the current date in PST.
|
|
7
|
+
|
|
8
|
+
# Month constants to make specific dates easier to read.
|
|
9
|
+
JANUARY = 1
|
|
10
|
+
FEBRUARY = 2
|
|
11
|
+
MARCH = 3
|
|
12
|
+
APRIL = 4
|
|
13
|
+
MAY = 5
|
|
14
|
+
JUNE = 6
|
|
15
|
+
JULY = 7
|
|
16
|
+
AUGUST = 8
|
|
17
|
+
SEPTEMBER = 9
|
|
18
|
+
OCTOBER = 10
|
|
19
|
+
NOVEMBER = 11
|
|
20
|
+
DECEMBER = 12
|
|
21
|
+
|
|
22
|
+
# Special posters for certain days.
|
|
23
|
+
VIDEO_POSTERS = {
|
|
24
|
+
# These are the same every year:
|
|
25
|
+
# =====
|
|
26
|
+
(FEBRUARY, 14): 'valentines.png',
|
|
27
|
+
(APRIL, 1): 'colorbars.gif',
|
|
28
|
+
(APRIL, 5): 'trek.jpg', # "First Contact Day": https://bit.ly/2CSXbxw
|
|
29
|
+
(OCTOBER, 31): 'zombie.jpg',
|
|
30
|
+
# =====
|
|
31
|
+
|
|
32
|
+
# These birthday posters changed each year:
|
|
33
|
+
(DECEMBER, 19, 2015): '1yo.jpg',
|
|
34
|
+
(DECEMBER, 19, 2016): '2yo.png',
|
|
35
|
+
(DECEMBER, 19, 2017): '3yo.png',
|
|
36
|
+
|
|
37
|
+
# After this, the birthday poster shows for a whole week:
|
|
38
|
+
(DECEMBER, 17, 2018): '4yo.png',
|
|
39
|
+
(DECEMBER, 18, 2018): '4yo.png',
|
|
40
|
+
(DECEMBER, 19, 2018): '4yo.png',
|
|
41
|
+
(DECEMBER, 20, 2018): '4yo.png',
|
|
42
|
+
|
|
43
|
+
(DECEMBER, 19, 2019): '5yo.png',
|
|
44
|
+
(DECEMBER, 20, 2019): '5yo.png',
|
|
45
|
+
(DECEMBER, 21, 2019): '5yo.png',
|
|
46
|
+
(DECEMBER, 22, 2019): '5yo.png',
|
|
47
|
+
(DECEMBER, 23, 2019): '5yo.png',
|
|
48
|
+
(DECEMBER, 24, 2019): '5yo.png',
|
|
49
|
+
(DECEMBER, 25, 2019): '5yo.png',
|
|
50
|
+
|
|
51
|
+
(DECEMBER, 19, 2020): '6yo.png',
|
|
52
|
+
(DECEMBER, 20, 2020): '6yo.png',
|
|
53
|
+
(DECEMBER, 21, 2020): '6yo.png',
|
|
54
|
+
(DECEMBER, 22, 2020): '6yo.png',
|
|
55
|
+
(DECEMBER, 23, 2020): '6yo.png',
|
|
56
|
+
(DECEMBER, 24, 2020): '6yo.png',
|
|
57
|
+
(DECEMBER, 25, 2020): '6yo.png',
|
|
58
|
+
|
|
59
|
+
(DECEMBER, 19, 2021): '7yo.png',
|
|
60
|
+
(DECEMBER, 20, 2021): '7yo.png',
|
|
61
|
+
(DECEMBER, 21, 2021): '7yo.png',
|
|
62
|
+
(DECEMBER, 22, 2021): '7yo.png',
|
|
63
|
+
(DECEMBER, 23, 2021): '7yo.png',
|
|
64
|
+
(DECEMBER, 24, 2021): '7yo.png',
|
|
65
|
+
(DECEMBER, 25, 2021): '7yo.png',
|
|
66
|
+
|
|
67
|
+
(DECEMBER, 19, 2022): '8yo.png',
|
|
68
|
+
(DECEMBER, 20, 2022): '8yo.png',
|
|
69
|
+
(DECEMBER, 21, 2022): '8yo.png',
|
|
70
|
+
(DECEMBER, 22, 2022): '8yo.png',
|
|
71
|
+
(DECEMBER, 23, 2022): '8yo.png',
|
|
72
|
+
(DECEMBER, 24, 2022): '8yo.png',
|
|
73
|
+
(DECEMBER, 25, 2022): '8yo.png',
|
|
74
|
+
|
|
75
|
+
(DECEMBER, 19, 2023): '9yo.png',
|
|
76
|
+
(DECEMBER, 20, 2023): '9yo.png',
|
|
77
|
+
(DECEMBER, 21, 2023): '9yo.png',
|
|
78
|
+
(DECEMBER, 22, 2023): '9yo.png',
|
|
79
|
+
(DECEMBER, 23, 2023): '9yo.png',
|
|
80
|
+
(DECEMBER, 24, 2023): '9yo.png',
|
|
81
|
+
(DECEMBER, 25, 2023): '9yo.png',
|
|
82
|
+
|
|
83
|
+
(DECEMBER, 19, 2024): '10yo.png',
|
|
84
|
+
(DECEMBER, 20, 2024): '10yo.png',
|
|
85
|
+
(DECEMBER, 21, 2024): '10yo.png',
|
|
86
|
+
(DECEMBER, 22, 2024): '10yo.png',
|
|
87
|
+
(DECEMBER, 23, 2024): '10yo.png',
|
|
88
|
+
(DECEMBER, 24, 2024): '10yo.png',
|
|
89
|
+
(DECEMBER, 25, 2024): '10yo.png',
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# The default poster.
|
|
93
|
+
VIDEO_DEFAULT = 'standard.png'
|
|
94
|
+
|
|
95
|
+
# Special audio-only posters.
|
|
96
|
+
AUDIO_POSTERS = {
|
|
97
|
+
# http://discordia.wikia.com/wiki/Chaoflux
|
|
98
|
+
(FEBRUARY, 19): 'audioRickRoll.gif',
|
|
99
|
+
# http://discordia.wikia.com/wiki/Discoflux
|
|
100
|
+
(MAY, 3): 'audioRickRoll.gif',
|
|
101
|
+
# http://discordia.wikia.com/wiki/Confuflux
|
|
102
|
+
(JULY, 15): 'audioRickRoll.gif',
|
|
103
|
+
# http://discordia.wikia.com/wiki/Bureflux
|
|
104
|
+
(SEPTEMBER, 26): 'audioRickRoll.gif',
|
|
105
|
+
# http://discordia.wikia.com/wiki/Afflux
|
|
106
|
+
(DECEMBER, 8): 'audioRickRoll.gif',
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# The default audio-only poster.
|
|
110
|
+
AUDIO_DEFAULT = 'audioOnly.gif'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Time is an illusion; lunchtime doubly so.
|
package/build/README.md
CHANGED
|
@@ -99,7 +99,7 @@ will choose a defaults based on your platform. However, if you pass any
|
|
|
99
99
|
arguments to `test.py`, it will not choose browsers and you *must* pass
|
|
100
100
|
`--browsers`.
|
|
101
101
|
|
|
102
|
-
[lib/debug/log.js]: https://github.com/
|
|
102
|
+
[lib/debug/log.js]: https://github.com/shaka-project/shaka-player/blob/main/lib/debug/log.js
|
|
103
103
|
|
|
104
104
|
## Stats
|
|
105
105
|
|
package/build/checkversion.py
CHANGED
|
@@ -37,7 +37,7 @@ def changelog_version():
|
|
|
37
37
|
"""Gets the version of the library from the CHANGELOG."""
|
|
38
38
|
path = os.path.join(shakaBuildHelpers.get_source_base(), 'CHANGELOG.md')
|
|
39
39
|
with shakaBuildHelpers.open_file(path, 'r') as f:
|
|
40
|
-
match = re.search(r'
|
|
40
|
+
match = re.search(r'^###? \[(.*?)\]\(', f.read(), re.MULTILINE)
|
|
41
41
|
return match.group(1) if match else ''
|
|
42
42
|
|
|
43
43
|
|
|
@@ -12,297 +12,324 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
# Conformance requirements:
|
|
17
16
|
# See: https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework
|
|
18
17
|
|
|
19
|
-
|
|
20
18
|
# Disallow throwing non-Error types.
|
|
21
19
|
requirement: {
|
|
22
20
|
type: CUSTOM
|
|
23
|
-
java_class:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
whitelist_regexp:
|
|
28
|
-
whitelist_regexp:
|
|
21
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanThrowOfNonErrorTypes"
|
|
22
|
+
error_message:
|
|
23
|
+
"Throwing non-Error types or Error itself is not allowed; "
|
|
24
|
+
"throw shaka.util.Error instead."
|
|
25
|
+
whitelist_regexp: "test/"
|
|
26
|
+
whitelist_regexp: "node_modules/"
|
|
29
27
|
}
|
|
30
28
|
requirement: {
|
|
31
29
|
type: BANNED_CODE_PATTERN
|
|
32
|
-
value:
|
|
33
|
-
error_message:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
whitelist_regexp:
|
|
30
|
+
value: "function template() { throw new Error(); }"
|
|
31
|
+
error_message:
|
|
32
|
+
"Throwing non-Error types or Error itself is not allowed; "
|
|
33
|
+
"throw shaka.util.Error instead."
|
|
34
|
+
whitelist_regexp: "test/"
|
|
35
|
+
whitelist_regexp: "node_modules/"
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
|
|
40
38
|
# Ban accessing members of unknown types.
|
|
41
39
|
requirement: {
|
|
42
40
|
type: CUSTOM
|
|
43
|
-
java_class:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
java_class:
|
|
42
|
+
"com.google.javascript.jscomp.ConformanceRules$"
|
|
43
|
+
"BanUnknownTypedClassPropsReferences"
|
|
44
|
+
error_message:
|
|
45
|
+
"Using properties of unknown types is not allowed; add an "
|
|
46
|
+
"explicit type to the variable."
|
|
47
|
+
whitelist_regexp: "demo/"
|
|
48
48
|
}
|
|
49
49
|
requirement {
|
|
50
50
|
type: CUSTOM
|
|
51
|
-
java_class:
|
|
52
|
-
error_message:
|
|
53
|
-
|
|
51
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanUnknownThis"
|
|
52
|
+
error_message:
|
|
53
|
+
"Failed to infer type of \"this\"; "
|
|
54
|
+
"please be explicit or use bind!"
|
|
54
55
|
# Until we can get this rule updated for ES6 static methods
|
|
55
56
|
# (https://github.com/google/closure-compiler/issues/2880):
|
|
56
|
-
whitelist_regexp:
|
|
57
|
-
whitelist_regexp:
|
|
57
|
+
whitelist_regexp: "test/test/util/canned_idb.js"
|
|
58
|
+
whitelist_regexp: "test/assets/assets_integration.js"
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
|
|
61
61
|
# Reject unresolved types.
|
|
62
62
|
requirement {
|
|
63
63
|
type: CUSTOM
|
|
64
|
-
java_class:
|
|
65
|
-
error_message:
|
|
64
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanUnresolvedType"
|
|
65
|
+
error_message: "Failed to resolve type!"
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
68
|
# Reject global variables.
|
|
70
69
|
requirement {
|
|
71
70
|
type: CUSTOM
|
|
72
|
-
java_class:
|
|
73
|
-
error_message:
|
|
74
|
-
whitelist_regexp:
|
|
75
|
-
whitelist_regexp:
|
|
76
|
-
whitelist_regexp:
|
|
71
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanGlobalVars"
|
|
72
|
+
error_message: "Global variables are not allowed!"
|
|
73
|
+
whitelist_regexp: "demo/"
|
|
74
|
+
whitelist_regexp: "test/"
|
|
75
|
+
whitelist_regexp: "node_modules/"
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
|
|
80
78
|
# Disallow using "!" on nullable numbers in boolean assignment.
|
|
81
79
|
# Note: we can't use the pattern "var b = !n" because it causes too many
|
|
82
80
|
# false positives.
|
|
83
81
|
requirement: {
|
|
84
82
|
type: BANNED_CODE_PATTERN
|
|
85
|
-
value:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
value:
|
|
84
|
+
"/** @param {boolean} b @param {?number} n */ "
|
|
85
|
+
"function template(b, n) { b = !n; }"
|
|
86
|
+
error_message:
|
|
87
|
+
"Using \"!\" on nullable numbers in boolean assignment "
|
|
88
|
+
"is not allowed; use an explicit comparison instead."
|
|
89
|
+
whitelist_regexp: "node_modules/"
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
requirement: {
|
|
93
93
|
type: BANNED_CODE_PATTERN
|
|
94
|
-
value:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
value:
|
|
95
|
+
"/** @param {*} a"
|
|
96
|
+
" @param {(number|string|boolean|null|undefined)} x */"
|
|
97
|
+
"function template(a, x) { expect(a).toEqual(x); }"
|
|
98
|
+
value:
|
|
99
|
+
"/** @param {*} a"
|
|
100
|
+
" @param {(number|string|boolean|null|undefined)} x */"
|
|
101
|
+
"function template(a, x) { expect(a).not.toEqual(x); }"
|
|
102
|
+
error_message: "Use expect.toBe for primitives"
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
requirement: {
|
|
104
106
|
type: BANNED_CODE_PATTERN
|
|
105
|
-
value:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
value:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
value:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
value:
|
|
108
|
+
"/** @param {BufferSource} a */"
|
|
109
|
+
"function template(a) { new Uint8Array(a) }"
|
|
110
|
+
value:
|
|
111
|
+
"/** @param {BufferSource} a */"
|
|
112
|
+
"function template(a) { new Int8Array(a) }"
|
|
113
|
+
value:
|
|
114
|
+
"/** @param {BufferSource} a */"
|
|
115
|
+
"function template(a) { new Uint8ClampedArray(a) }"
|
|
116
|
+
value:
|
|
117
|
+
"/** @param {BufferSource} a */"
|
|
118
|
+
"function template(a) { new Unt16Array(a) }"
|
|
119
|
+
value:
|
|
120
|
+
"/** @param {BufferSource} a */"
|
|
121
|
+
"function template(a) { new Int16Array(a) }"
|
|
122
|
+
value:
|
|
123
|
+
"/** @param {BufferSource} a */"
|
|
124
|
+
"function template(a) { new Uint32Array(a) }"
|
|
125
|
+
value:
|
|
126
|
+
"/** @param {BufferSource} a */"
|
|
127
|
+
"function template(a) { new Int32Array(a) }"
|
|
128
|
+
value:
|
|
129
|
+
"/** @param {BufferSource} a */"
|
|
130
|
+
"function template(a) { new Float32Array(a) }"
|
|
131
|
+
value:
|
|
132
|
+
"/** @param {BufferSource} a */"
|
|
133
|
+
"function template(a) { new Float64Array(a) }"
|
|
134
|
+
error_message: "Use shaka.util.BufferUtils.view* instead."
|
|
135
|
+
whitelist_regexp: "lib/util/buffer_utils.js"
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
requirement: {
|
|
128
139
|
type: BANNED_CODE_PATTERN
|
|
129
|
-
value:
|
|
130
|
-
error_message:
|
|
140
|
+
value: "function template () { new Date().getTime() }"
|
|
141
|
+
error_message: "Use Date.now() instead."
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
# Disallow console logging.
|
|
134
145
|
requirement: {
|
|
135
146
|
type: BANNED_PROPERTY_CALL
|
|
136
|
-
value:
|
|
137
|
-
value:
|
|
138
|
-
value:
|
|
139
|
-
value:
|
|
140
|
-
value:
|
|
141
|
-
error_message:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
whitelist_regexp:
|
|
145
|
-
whitelist_regexp:
|
|
146
|
-
whitelist_regexp:
|
|
147
|
-
whitelist_regexp:
|
|
147
|
+
value: "Console.prototype.debug"
|
|
148
|
+
value: "Console.prototype.log"
|
|
149
|
+
value: "Console.prototype.info"
|
|
150
|
+
value: "Console.prototype.warn"
|
|
151
|
+
value: "Console.prototype.error"
|
|
152
|
+
error_message:
|
|
153
|
+
"Using \"console\" is not allowed; "
|
|
154
|
+
"use shaka.log instead"
|
|
155
|
+
whitelist_regexp: "demo/"
|
|
156
|
+
whitelist_regexp: "lib/debug/log.js"
|
|
157
|
+
whitelist_regexp: "test/test/boot.js"
|
|
158
|
+
whitelist_regexp: "node_modules/"
|
|
159
|
+
whitelist_regexp: "[synthetic:es6/promise/promise]"
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
# Disallow querySelector and querySelectorAll since they aren't supported on
|
|
151
163
|
# Shaka Player Embedded.
|
|
152
164
|
requirement: {
|
|
153
165
|
type: BANNED_PROPERTY_CALL
|
|
154
|
-
value:
|
|
155
|
-
value:
|
|
156
|
-
value:
|
|
157
|
-
value:
|
|
158
|
-
error_message:
|
|
159
|
-
whitelist_regexp:
|
|
160
|
-
whitelist_regexp:
|
|
161
|
-
whitelist_regexp:
|
|
162
|
-
whitelist_regexp:
|
|
166
|
+
value: "Element.prototype.querySelector"
|
|
167
|
+
value: "Document.prototype.querySelector"
|
|
168
|
+
value: "Element.prototype.querySelectorAll"
|
|
169
|
+
value: "Document.prototype.querySelectorAll"
|
|
170
|
+
error_message: "Use getElementsByTagName"
|
|
171
|
+
whitelist_regexp: "demo/"
|
|
172
|
+
whitelist_regexp: "ui/"
|
|
173
|
+
whitelist_regexp: "test/"
|
|
174
|
+
whitelist_regexp: "node_modules/"
|
|
163
175
|
}
|
|
164
176
|
|
|
165
|
-
|
|
166
177
|
# Disallow Element.children.
|
|
167
178
|
requirement: {
|
|
168
179
|
type: BANNED_PROPERTY
|
|
169
|
-
value:
|
|
170
|
-
error_message:
|
|
171
|
-
|
|
180
|
+
value: "Element.prototype.children"
|
|
181
|
+
error_message:
|
|
182
|
+
"Using \"Element.children\" is not allowed; "
|
|
183
|
+
"use Node.childNodes instead"
|
|
172
184
|
}
|
|
173
185
|
|
|
174
186
|
requirement: {
|
|
175
187
|
type: BANNED_PROPERTY
|
|
176
|
-
value:
|
|
177
|
-
value:
|
|
178
|
-
error_message:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
whitelist_regexp:
|
|
182
|
-
whitelist_regexp:
|
|
188
|
+
value: "DataView.prototype.buffer"
|
|
189
|
+
value: "TypedArray.prototype.buffer"
|
|
190
|
+
error_message:
|
|
191
|
+
"Using \"TypedArray.buffer\" is not safe since it doesn\'t "
|
|
192
|
+
"handle sub-arrays"
|
|
193
|
+
whitelist_regexp: "lib/util/buffer_utils.js"
|
|
194
|
+
whitelist_regexp: "lib/util/object_utils.js"
|
|
195
|
+
whitelist_regexp: "test/util/buffer_utils_unit.js"
|
|
183
196
|
}
|
|
184
197
|
|
|
185
|
-
|
|
186
198
|
# Disallow Element.innerHTML and outerHTML.
|
|
187
199
|
requirement: {
|
|
188
200
|
type: BANNED_PROPERTY
|
|
189
|
-
value:
|
|
190
|
-
value:
|
|
191
|
-
error_message:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
201
|
+
value: "Element.prototype.innerHTML"
|
|
202
|
+
value: "Element.prototype.outerHTML"
|
|
203
|
+
error_message:
|
|
204
|
+
"Using \"Element.innerHTML\" or \"Element.outerHTML\" is not "
|
|
205
|
+
"allowed due to security concerns; use textContent, "
|
|
206
|
+
"appendChild, or removeChild instead"
|
|
207
|
+
whitelist_regexp: "test/test/util/util.js"
|
|
195
208
|
}
|
|
196
209
|
|
|
197
|
-
|
|
198
210
|
# Disallow DOMRect.x and y.
|
|
199
211
|
requirement: {
|
|
200
212
|
type: BANNED_PROPERTY
|
|
201
|
-
value:
|
|
202
|
-
value:
|
|
203
|
-
error_message:
|
|
204
|
-
|
|
213
|
+
value: "DOMRect.prototype.x"
|
|
214
|
+
value: "DOMRect.prototype.y"
|
|
215
|
+
error_message:
|
|
216
|
+
"DOMRect \"x\" and \"y\" are not supported on legacy Edge; "
|
|
217
|
+
"use \"left\" and \"top\" instead."
|
|
205
218
|
# The built-in set and map polyfills trigger this ban somehow.
|
|
206
|
-
whitelist_regexp:
|
|
219
|
+
whitelist_regexp: "synthetic:es6/"
|
|
207
220
|
}
|
|
208
221
|
|
|
209
|
-
|
|
210
222
|
# Disallow fdescribe.
|
|
211
223
|
requirement: {
|
|
212
224
|
type: BANNED_NAME
|
|
213
|
-
value:
|
|
214
|
-
error_message:
|
|
225
|
+
value: "fdescribe"
|
|
226
|
+
error_message: "Using \"fdescribe\" is not allowed"
|
|
215
227
|
}
|
|
216
228
|
|
|
217
|
-
|
|
218
229
|
# Disallow fit.
|
|
219
230
|
requirement: {
|
|
220
231
|
type: BANNED_NAME
|
|
221
|
-
value:
|
|
222
|
-
error_message:
|
|
223
|
-
whitelist_regexp:
|
|
232
|
+
value: "fit"
|
|
233
|
+
error_message: "Using \"fit\" is not allowed"
|
|
234
|
+
whitelist_regexp: "test/player_external.js"
|
|
224
235
|
}
|
|
225
236
|
|
|
226
|
-
|
|
227
237
|
# Disallow setInterval.
|
|
228
238
|
requirement: {
|
|
229
239
|
type: BANNED_NAME
|
|
230
|
-
value:
|
|
231
|
-
error_message:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
whitelist_regexp:
|
|
240
|
+
value: "window.setInterval"
|
|
241
|
+
error_message:
|
|
242
|
+
"setInterval has several drawbacks, most of "
|
|
243
|
+
"all difficulty canceling and surprising behavior "
|
|
244
|
+
"when the device goes to sleep. Please use "
|
|
245
|
+
"shaka.util.Timer instead."
|
|
246
|
+
whitelist_regexp: "demo/"
|
|
247
|
+
whitelist_regexp: "test/"
|
|
237
248
|
}
|
|
238
249
|
requirement: {
|
|
239
250
|
type: BANNED_NAME
|
|
240
|
-
value:
|
|
241
|
-
error_message:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
whitelist_regexp:
|
|
251
|
+
value: "setInterval"
|
|
252
|
+
error_message:
|
|
253
|
+
"setInterval has several drawbacks, most of "
|
|
254
|
+
"all difficulty canceling and surprising behavior "
|
|
255
|
+
"when the device goes to sleep. Please use "
|
|
256
|
+
"shaka.util.Timer instead."
|
|
257
|
+
whitelist_regexp: "demo/"
|
|
258
|
+
whitelist_regexp: "test/"
|
|
247
259
|
}
|
|
248
260
|
|
|
249
261
|
# Disallow setTimeout.
|
|
250
262
|
requirement: {
|
|
251
263
|
type: BANNED_NAME
|
|
252
|
-
value:
|
|
253
|
-
error_message:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
whitelist_regexp:
|
|
258
|
-
whitelist_regexp:
|
|
264
|
+
value: "window.setTimeout"
|
|
265
|
+
error_message:
|
|
266
|
+
"setTimeout has several drawbacks, most of "
|
|
267
|
+
"all difficulty canceling it. Please use "
|
|
268
|
+
"shaka.util.Timer instead."
|
|
269
|
+
whitelist_regexp: "demo/"
|
|
270
|
+
whitelist_regexp: "test/"
|
|
271
|
+
whitelist_regexp: "lib/util/delayed_tick.js"
|
|
259
272
|
}
|
|
260
273
|
requirement: {
|
|
261
274
|
type: BANNED_NAME
|
|
262
|
-
value:
|
|
263
|
-
error_message:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
whitelist_regexp:
|
|
275
|
+
value: "setTimeout"
|
|
276
|
+
error_message:
|
|
277
|
+
"setTimeout has several drawbacks, most of "
|
|
278
|
+
"all difficulty canceling it. Please use "
|
|
279
|
+
"shaka.util.Timer instead."
|
|
280
|
+
whitelist_regexp: "demo/"
|
|
281
|
+
whitelist_regexp: "test/"
|
|
268
282
|
}
|
|
269
283
|
|
|
270
|
-
|
|
271
284
|
# Disallow eval, except when testing for modern JS syntax in demo
|
|
272
285
|
requirement: {
|
|
273
286
|
type: BANNED_NAME
|
|
274
|
-
value:
|
|
275
|
-
error_message:
|
|
276
|
-
whitelist_regexp:
|
|
277
|
-
whitelist_regexp:
|
|
278
|
-
whitelist_regexp:
|
|
287
|
+
value: "window.eval"
|
|
288
|
+
error_message: "Using \"eval\" is not allowed"
|
|
289
|
+
whitelist_regexp: "demo/demo_utils.js"
|
|
290
|
+
whitelist_regexp: "node_modules/google-closure-library/closure/goog/base.js"
|
|
291
|
+
whitelist_regexp: "test/util/functional_unit.js"
|
|
279
292
|
}
|
|
280
293
|
requirement: {
|
|
281
294
|
type: BANNED_NAME
|
|
282
|
-
value:
|
|
283
|
-
error_message:
|
|
284
|
-
whitelist_regexp:
|
|
285
|
-
whitelist_regexp:
|
|
286
|
-
whitelist_regexp:
|
|
295
|
+
value: "eval"
|
|
296
|
+
error_message: "Using \"eval\" is not allowed"
|
|
297
|
+
whitelist_regexp: "demo/demo_utils.js"
|
|
298
|
+
whitelist_regexp: "node_modules/google-closure-library/closure/goog/base.js"
|
|
299
|
+
whitelist_regexp: "test/util/functional_unit.js"
|
|
287
300
|
}
|
|
288
301
|
|
|
289
|
-
|
|
290
302
|
# Disallow ES6 methods.
|
|
291
303
|
requirement: {
|
|
292
304
|
type: BANNED_PROPERTY
|
|
293
|
-
value:
|
|
294
|
-
error_message:
|
|
295
|
-
|
|
305
|
+
value: "ArrayBuffer.prototype.slice"
|
|
306
|
+
error_message:
|
|
307
|
+
"ArrayBuffer.slice is not allowed because it "
|
|
308
|
+
"is not supported on Tizen 2016"
|
|
296
309
|
}
|
|
297
310
|
|
|
298
311
|
# Disallow the general use of fetch, which is not available on all supported
|
|
299
312
|
# platforms.
|
|
300
313
|
requirement: {
|
|
301
314
|
type: BANNED_NAME_CALL
|
|
302
|
-
value:
|
|
303
|
-
value:
|
|
304
|
-
error_message:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
315
|
+
value: "fetch"
|
|
316
|
+
value: "window.fetch"
|
|
317
|
+
error_message:
|
|
318
|
+
"Using \"fetch\" directly is not allowed; "
|
|
319
|
+
"use shaka.test.Util.fetch or NetworkingEngine.request "
|
|
320
|
+
"instead."
|
|
321
|
+
whitelist_regexp: "lib/net/http_fetch_plugin.js"
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
# Disallow the use of generators, which are a major performance issue. See
|
|
325
|
+
# https://github.com/shaka-project/shaka-player/issues/4062#issuecomment-1079428268
|
|
326
|
+
requirement: {
|
|
327
|
+
type: BANNED_CODE_PATTERN
|
|
328
|
+
value:
|
|
329
|
+
"/** @param {*} x */ "
|
|
330
|
+
"function *template(x) { yield x; }"
|
|
331
|
+
error_message:
|
|
332
|
+
"ES6 generators are a major performance issue! Find another solution. "
|
|
333
|
+
"See also https://bit.ly/3wAsoj5"
|
|
334
|
+
whitelist_regexp: "node_modules/"
|
|
308
335
|
}
|