shaka-player 3.3.2 → 4.0.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/.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 +129 -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 +37 -0
- package/.github/workflows/nightly-demo.yaml +42 -0
- package/.github/workflows/release-please.yaml +168 -0
- package/.github/workflows/safari-homedir-launcher.sh +18 -0
- package/.github/workflows/selenium-lab-tests.yaml +92 -0
- package/.github/workflows/sync-labels.yaml +33 -0
- package/.github/workflows/update-issues.yaml +29 -0
- package/.github/workflows/validate-pr-title.yaml +35 -0
- package/AUTHORS +3 -0
- package/CHANGELOG.md +1866 -1675
- package/CONTRIBUTING.md +2 -2
- package/CONTRIBUTORS +3 -0
- package/README.md +16 -13
- 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 +28 -0
- package/app-engine/demo-version-index/generate.py +164 -0
- package/app-engine/demo-version-index/main.py +11 -0
- package/app-engine/demo-version-index/requirements.txt +5 -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 +3 -3
- package/build/checkversion.py +1 -1
- package/build/compiler.py +1 -1
- package/build/conformance.textproto +13 -0
- 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 +161 -0
- package/build/shakaBuildHelpers.py +4 -29
- package/build/test.py +94 -29
- package/build/types/core +0 -1
- package/build/types/polyfill +1 -3
- 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/asset.js +17 -1
- package/demo/common/assets.js +31 -0
- package/demo/common/message_ids.js +6 -3
- package/demo/config.js +10 -12
- package/demo/custom.js +39 -1
- package/demo/customWarning.txt +2 -2
- package/demo/demo.less +29 -18
- package/demo/demo_uncompiled.js +1 -13
- package/demo/demo_utils.js +0 -1
- package/demo/index.html +1 -1
- package/demo/locales/en.json +6 -3
- package/demo/locales/source.json +22 -10
- package/demo/main.js +12 -9
- package/demo/search.js +2 -1
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +236 -232
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +236 -232
- package/dist/demo.compiled.map +4 -4
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +229 -226
- package/dist/locales.js +34 -32
- package/dist/receiver.compiled.debug.js +75 -73
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +75 -73
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +321 -314
- package/dist/shaka-player.compiled.debug.d.ts +321 -314
- package/dist/shaka-player.compiled.debug.externs.js +140 -129
- package/dist/shaka-player.compiled.debug.js +527 -592
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +140 -129
- package/dist/shaka-player.compiled.js +836 -860
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +367 -358
- package/dist/shaka-player.ui.debug.d.ts +367 -358
- package/dist/shaka-player.ui.debug.externs.js +148 -129
- package/dist/shaka-player.ui.debug.js +586 -649
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +148 -129
- package/dist/shaka-player.ui.js +1008 -1028
- 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/config.md +0 -2
- package/docs/tutorials/drm-config.md +5 -0
- package/docs/tutorials/fairplay.md +7 -22
- package/docs/tutorials/faq.md +8 -19
- package/docs/tutorials/index.json +3 -8
- package/docs/tutorials/plugins.md +4 -6
- package/docs/tutorials/selenium-grid-config.md +122 -0
- package/docs/tutorials/upgrade.md +83 -11
- package/docs/tutorials/welcome.md +10 -2
- package/externs/cmcd.js +1 -1
- package/externs/polyfill.js +15 -0
- package/externs/shaka/manifest.js +5 -1
- package/externs/shaka/net.js +12 -0
- package/externs/shaka/offline.js +5 -1
- package/externs/shaka/player.js +39 -32
- package/externs/shaka/text.js +12 -12
- package/externs/sourcebuffer.js +15 -0
- package/karma.conf.js +137 -30
- package/lib/abr/simple_abr_manager.js +12 -6
- package/lib/ads/client_side_ad.js +13 -2
- package/lib/ads/client_side_ad_manager.js +22 -4
- package/lib/cast/cast_proxy.js +3 -4
- package/lib/cast/cast_utils.js +0 -1
- 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/content_protection.js +85 -5
- package/lib/dash/dash_parser.js +10 -12
- 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 +386 -749
- package/lib/hls/manifest_text_parser.js +5 -6
- package/lib/media/adaptation_set.js +1 -2
- package/lib/media/content_workarounds.js +2 -2
- package/lib/media/drm_engine.js +105 -55
- package/lib/media/gap_jumping_controller.js +10 -45
- package/lib/media/media_source_engine.js +90 -17
- package/lib/media/mp4_segment_index_parser.js +1 -4
- package/lib/media/playhead.js +4 -7
- package/lib/media/presentation_timeline.js +19 -10
- package/lib/media/segment_index.js +13 -46
- package/lib/media/segment_reference.js +47 -1
- package/lib/media/streaming_engine.js +35 -17
- package/lib/media/time_ranges_utils.js +5 -12
- package/lib/media/video_wrapper.js +1 -1
- package/lib/net/networking_engine.js +4 -1
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +104 -136
- package/lib/player.js +50 -216
- package/lib/polyfill/all.js +2 -3
- package/lib/polyfill/encryption_scheme.js +1 -1
- package/lib/polyfill/media_capabilities.js +15 -9
- package/lib/polyfill/mediasource.js +0 -28
- package/lib/polyfill/patchedmediakeys_nop.js +2 -0
- package/lib/polyfill/patchedmediakeys_webkit.js +2 -0
- package/lib/polyfill/symbol.js +46 -0
- package/lib/text/cue.js +1 -7
- package/lib/text/lrc_text_parser.js +8 -0
- package/lib/text/mp4_ttml_parser.js +8 -0
- package/lib/text/mp4_vtt_parser.js +8 -0
- package/lib/text/sbv_text_parser.js +8 -0
- package/lib/text/simple_text_displayer.js +3 -8
- package/lib/text/srt_text_parser.js +8 -0
- package/lib/text/ssa_text_parser.js +8 -0
- package/lib/text/text_engine.js +19 -3
- package/lib/text/ttml_text_parser.js +16 -5
- package/lib/text/ui_text_displayer.js +2 -8
- package/lib/text/vtt_text_parser.js +24 -2
- package/lib/text/web_vtt_generator.js +1 -7
- package/lib/util/buffer_utils.js +1 -3
- package/lib/util/ebml_parser.js +3 -3
- package/lib/util/error.js +10 -14
- package/lib/util/fairplay_utils.js +109 -0
- package/lib/util/functional.js +0 -42
- package/lib/util/iterables.js +0 -46
- package/lib/util/mime_utils.js +2 -0
- 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 +48 -3
- package/lib/util/player_configuration.js +12 -6
- package/lib/util/pssh.js +24 -8
- package/lib/util/stream_utils.js +96 -25
- package/lib/util/string_utils.js +3 -5
- package/lib/util/uint8array_utils.js +3 -21
- package/lib/util/xml_utils.js +16 -8
- package/package.json +61 -36
- package/roadmap.md +27 -27
- package/shaka-player.uncompiled.js +1 -3
- 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 +1 -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 +45 -10
- package/test/dash/dash_parser_live_unit.js +2 -15
- package/test/dash/dash_parser_manifest_unit.js +2 -40
- 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 +3 -13
- package/test/dash/mpd_utils_unit.js +3 -11
- package/test/demo/demo_unit.js +2 -6
- package/test/deprecate/enforcer_unit.js +0 -4
- package/test/deprecate/version_unit.js +0 -2
- package/test/hls/hls_live_unit.js +101 -234
- package/test/hls/hls_parser_unit.js +517 -447
- 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 +90 -144
- package/test/media/manifest_parser_unit.js +0 -4
- package/test/media/media_source_engine_integration.js +26 -10
- package/test/media/media_source_engine_unit.js +8 -20
- 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 +35 -207
- package/test/media/presentation_timeline_unit.js +4 -7
- package/test/media/quality_observer_unit.js +0 -4
- package/test/media/region_observer_unit.js +1 -6
- package/test/media/region_timeline_unit.js +0 -3
- package/test/media/segment_index_unit.js +15 -31
- 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 +13 -75
- package/test/media/streaming_engine_unit.js +14 -37
- package/test/media/time_ranges_utils_unit.js +0 -7
- 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 +34 -12
- package/test/offline/offline_integration.js +1 -10
- package/test/offline/offline_manifest_parser_unit.js +1 -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 +6 -31
- package/test/player_external.js +1 -15
- package/test/player_integration.js +38 -28
- 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 +0 -7
- package/test/player_unit.js +78 -37
- package/test/routing/walker_unit.js +0 -8
- 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 +11 -11
- 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 +12 -15
- package/test/test/util/manifest_parser_util.js +4 -7
- package/test/test/util/offline_utils.js +1 -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 +1 -15
- package/test/test/util/test_scheme.js +25 -20
- package/test/test/util/ttml_utils.js +0 -2
- package/test/test/util/ui_utils.js +0 -9
- package/test/test/util/util.js +9 -23
- package/test/test/util/waiter.js +84 -43
- package/test/text/cue_integration.js +2 -6
- package/test/text/lrc_text_parser_unit.js +6 -11
- package/test/text/mp4_ttml_parser_unit.js +6 -10
- package/test/text/mp4_vtt_parser_unit.js +7 -12
- package/test/text/sbv_text_parser_unit.js +5 -10
- package/test/text/simple_text_displayer_unit.js +1 -8
- package/test/text/srt_text_parser_unit.js +5 -10
- package/test/text/ssa_text_parser_unit.js +17 -34
- package/test/text/text_engine_unit.js +47 -12
- package/test/text/text_track_integration.js +0 -2
- package/test/text/ttml_text_parser_unit.js +79 -88
- package/test/text/ui_text_displayer_unit.js +44 -41
- package/test/text/vtt_text_parser_unit.js +55 -66
- 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 +1 -12
- package/test/ui/ui_customization_unit.js +0 -6
- package/test/ui/ui_integration.js +0 -32
- package/test/ui/ui_unit.js +28 -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 +3 -3
- 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/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 +26 -15
- 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/ui/controls.js +65 -40
- package/ui/fullscreen_button.js +26 -6
- package/ui/less/ad_controls.less +6 -6
- package/ui/less/buttons.less +6 -6
- package/ui/less/containers.less +10 -12
- package/ui/less/overflow_menu.less +4 -4
- package/ui/less/range_elements.less +7 -2
- package/ui/less/tooltip.less +4 -4
- package/ui/locales/en.json +1 -0
- package/ui/locales/sjn-translations.yaml +257 -0
- package/ui/locales/sjn.json +42 -0
- package/ui/locales/source.json +5 -0
- package/ui/resolution_selection.js +31 -33
- package/ui/seek_bar.js +2 -1
- package/ui/ui.js +0 -17
- package/.github/workflows/build_and_test.yaml +0 -73
- package/.github/workflows/release.yaml +0 -53
- package/docs/tutorials/upgrade-v2-5.md +0 -441
- package/docs/tutorials/upgrade-v3.md +0 -38
- package/externs/svgelement.js +0 -18
- package/externs/webcrypto.js +0 -18
- package/lib/polyfill/mathround.js +0 -49
- package/lib/polyfill/patchedmediakeys_apple.js +0 -744
- package/lib/polyfill/patchedmediakeys_ms.js +0 -698
- package/lib/util/mutex.js +0 -52
- package/test/util/functional_unit.js +0 -82
package/build/test.py
CHANGED
|
@@ -19,13 +19,22 @@
|
|
|
19
19
|
import argparse
|
|
20
20
|
import json
|
|
21
21
|
import logging
|
|
22
|
+
import os
|
|
22
23
|
import platform
|
|
24
|
+
import re
|
|
23
25
|
|
|
24
26
|
import build
|
|
25
27
|
import gendeps
|
|
26
28
|
import shakaBuildHelpers
|
|
27
29
|
|
|
28
30
|
|
|
31
|
+
# Set a higher default for capture_timeout in grid mode. If the test gets
|
|
32
|
+
# queued by the grid, this may prevent Karma from killing the session while
|
|
33
|
+
# waiting.
|
|
34
|
+
LOCAL_CAPTURE_TIMEOUT = 1 * 60 * 1000 # 1m in ms
|
|
35
|
+
SELENIUM_CAPTURE_TIMEOUT = 10 * 60 * 1000 # 10m in ms
|
|
36
|
+
|
|
37
|
+
|
|
29
38
|
class _HandleMixedListsAction(argparse.Action):
|
|
30
39
|
'''Action to handle comma-separated and space-separated lists.
|
|
31
40
|
|
|
@@ -59,6 +68,21 @@ class _HandleKeyValuePairs(argparse.Action):
|
|
|
59
68
|
merged[key] = value
|
|
60
69
|
setattr(namespace, self.dest, merged)
|
|
61
70
|
|
|
71
|
+
def _KeyValueValidator(argument):
|
|
72
|
+
'''To validate the option has a key value pair format.
|
|
73
|
+
|
|
74
|
+
When you forget to provide the option in key=value format,
|
|
75
|
+
it reminds you by throwing an error before executing any tests.
|
|
76
|
+
'''
|
|
77
|
+
|
|
78
|
+
keyValuePair = [str for str in argument.split('=') if str != ''];
|
|
79
|
+
|
|
80
|
+
if len(keyValuePair) == 2:
|
|
81
|
+
return argument
|
|
82
|
+
else:
|
|
83
|
+
raise argparse.ArgumentTypeError(
|
|
84
|
+
'Received %s but expecting format of key=value' % argument
|
|
85
|
+
)
|
|
62
86
|
|
|
63
87
|
def _IntGreaterThanZero(x):
|
|
64
88
|
i = int(x)
|
|
@@ -85,6 +109,8 @@ def _GetDefaultBrowsers():
|
|
|
85
109
|
raise Error('Unrecognized system: %s' % platform.uname()[0])
|
|
86
110
|
|
|
87
111
|
|
|
112
|
+
# TODO(joeyparrish): When internal tools using this Launcher system are removed,
|
|
113
|
+
# simplify this whole mess.
|
|
88
114
|
class Launcher:
|
|
89
115
|
"""A stateful object for parsing arguments and running Karma commands.
|
|
90
116
|
|
|
@@ -111,7 +137,7 @@ class Launcher:
|
|
|
111
137
|
|
|
112
138
|
running_commands = self.parser.add_argument_group(
|
|
113
139
|
'Running',
|
|
114
|
-
'These commands affect how tests are
|
|
140
|
+
'These commands affect how tests are run.')
|
|
115
141
|
logging_commands = self.parser.add_argument_group(
|
|
116
142
|
'Logging',
|
|
117
143
|
'These commands affect what gets logged and how the logs will appear.')
|
|
@@ -183,8 +209,14 @@ class Launcher:
|
|
|
183
209
|
action='store_true')
|
|
184
210
|
running_commands.add_argument(
|
|
185
211
|
'--drm',
|
|
186
|
-
help='Run tests that require DRM.',
|
|
212
|
+
help='Run tests that require DRM (on by default).',
|
|
213
|
+
default=True,
|
|
187
214
|
action='store_true')
|
|
215
|
+
running_commands.add_argument(
|
|
216
|
+
'--no-drm', '--nodrm',
|
|
217
|
+
help='Skip tests that require DRM (opposite of --drm).',
|
|
218
|
+
dest='drm',
|
|
219
|
+
action='store_false')
|
|
188
220
|
running_commands.add_argument(
|
|
189
221
|
'--quarantined',
|
|
190
222
|
help='Run tests that have been quarantined.',
|
|
@@ -215,9 +247,9 @@ class Launcher:
|
|
|
215
247
|
running_commands.add_argument(
|
|
216
248
|
'--capture-timeout',
|
|
217
249
|
help='Kill the browser if it does not capture in the given time [ms]. '
|
|
218
|
-
'(default
|
|
219
|
-
|
|
220
|
-
|
|
250
|
+
'(default {} for local, {} for Selenium)'.format(
|
|
251
|
+
LOCAL_CAPTURE_TIMEOUT, SELENIUM_CAPTURE_TIMEOUT),
|
|
252
|
+
type=int)
|
|
221
253
|
running_commands.add_argument(
|
|
222
254
|
'--delay-tests',
|
|
223
255
|
help='Insert an artificial delay between tests, in seconds. '
|
|
@@ -244,7 +276,7 @@ class Launcher:
|
|
|
244
276
|
help='Configure license servers for the custom asset playback test. '
|
|
245
277
|
'May be specified multiple times to configure multiple key '
|
|
246
278
|
'systems.',
|
|
247
|
-
type=
|
|
279
|
+
type=_KeyValueValidator,
|
|
248
280
|
metavar='KEY_SYSTEM_ID=LICENSE_SERVER_URI',
|
|
249
281
|
action=_HandleKeyValuePairs)
|
|
250
282
|
running_commands.add_argument(
|
|
@@ -258,6 +290,13 @@ class Launcher:
|
|
|
258
290
|
help="Don't use Babel to convert ES6 to ES5.",
|
|
259
291
|
dest='babel',
|
|
260
292
|
action='store_false')
|
|
293
|
+
running_commands.add_argument(
|
|
294
|
+
'--grid-address',
|
|
295
|
+
help='Address (hostname:port) of a Selenium grid to run tests on.')
|
|
296
|
+
running_commands.add_argument(
|
|
297
|
+
'--grid-config',
|
|
298
|
+
help='Path to a yaml config defining Selenium grid browsers. '
|
|
299
|
+
'(See docs/selenium-grid-config.md)')
|
|
261
300
|
|
|
262
301
|
|
|
263
302
|
logging_commands.add_argument(
|
|
@@ -313,6 +352,17 @@ class Launcher:
|
|
|
313
352
|
help='Specify the hostname to be used when capturing browsers. This '
|
|
314
353
|
'defaults to localhost.',
|
|
315
354
|
default='localhost')
|
|
355
|
+
networking_commands.add_argument(
|
|
356
|
+
'--tls-key',
|
|
357
|
+
help='Specify a TLS key to serve tests over HTTPs.')
|
|
358
|
+
networking_commands.add_argument(
|
|
359
|
+
'--tls-cert',
|
|
360
|
+
help='Specify a TLS cert to serve tests over HTTPs.')
|
|
361
|
+
networking_commands.add_argument(
|
|
362
|
+
'--lets-encrypt-folder',
|
|
363
|
+
help="Specify a Let's Encrypt folder to search for the latest key and "
|
|
364
|
+
"cert, to serve tests over HTTPs. This overrides --tls-key and "
|
|
365
|
+
"--tls-cert.")
|
|
316
366
|
|
|
317
367
|
|
|
318
368
|
pre_launch_commands.add_argument(
|
|
@@ -345,28 +395,36 @@ class Launcher:
|
|
|
345
395
|
pass_through = [
|
|
346
396
|
'auto_watch',
|
|
347
397
|
'babel',
|
|
398
|
+
'browsers',
|
|
348
399
|
'capture_timeout',
|
|
349
400
|
'colors',
|
|
401
|
+
'delay_tests',
|
|
350
402
|
'drm',
|
|
403
|
+
'exclude_browsers',
|
|
351
404
|
'external',
|
|
352
405
|
'filter',
|
|
406
|
+
'grid_address',
|
|
407
|
+
'grid_config',
|
|
353
408
|
'hostname',
|
|
354
409
|
'html_coverage_report',
|
|
355
410
|
'log_level',
|
|
356
411
|
'logging',
|
|
412
|
+
'no_browsers',
|
|
357
413
|
'port',
|
|
358
414
|
'quarantined',
|
|
359
415
|
'quick',
|
|
360
416
|
'random',
|
|
417
|
+
'reporters',
|
|
361
418
|
'report_slower_than',
|
|
362
419
|
'seed',
|
|
363
420
|
'single_run',
|
|
364
|
-
'uncompiled',
|
|
365
|
-
'delay_tests',
|
|
366
421
|
'spec_hide_passed',
|
|
367
422
|
'test_custom_asset',
|
|
368
423
|
'test_custom_license_server',
|
|
369
424
|
'test_timeout',
|
|
425
|
+
'tls_key',
|
|
426
|
+
'tls_cert',
|
|
427
|
+
'uncompiled',
|
|
370
428
|
]
|
|
371
429
|
|
|
372
430
|
# Check each value before setting it to avoid passing null values.
|
|
@@ -375,8 +433,33 @@ class Launcher:
|
|
|
375
433
|
if value is not None:
|
|
376
434
|
self.karma_config[name] = value
|
|
377
435
|
|
|
378
|
-
if self.parsed_args.
|
|
379
|
-
|
|
436
|
+
if not self.parsed_args.capture_timeout:
|
|
437
|
+
# The default for capture_timeout depends on whether or not we are using
|
|
438
|
+
# a Selenium grid.
|
|
439
|
+
if self.parsed_args.grid_config:
|
|
440
|
+
self.karma_config['capture_timeout'] = SELENIUM_CAPTURE_TIMEOUT
|
|
441
|
+
else:
|
|
442
|
+
self.karma_config['capture_timeout'] = LOCAL_CAPTURE_TIMEOUT
|
|
443
|
+
|
|
444
|
+
self._HandleLetsEncryptConfig()
|
|
445
|
+
|
|
446
|
+
def _HandleLetsEncryptConfig(self):
|
|
447
|
+
folder = self.parsed_args.lets_encrypt_folder
|
|
448
|
+
if not folder:
|
|
449
|
+
return
|
|
450
|
+
|
|
451
|
+
max_serial_number = 0
|
|
452
|
+
# Go through the contents of the folder to find the latest key & cert.
|
|
453
|
+
for file_name in os.listdir(folder):
|
|
454
|
+
matches = re.match(r'(?:privkey|fullchain)(\d+).pem', file_name)
|
|
455
|
+
if matches:
|
|
456
|
+
serial_number = int(matches.group(1))
|
|
457
|
+
max_serial_number = max(max_serial_number, serial_number)
|
|
458
|
+
|
|
459
|
+
self.karma_config['tls_key'] = os.path.join(
|
|
460
|
+
folder, 'privkey{}.pem'.format(max_serial_number))
|
|
461
|
+
self.karma_config['tls_cert'] = os.path.join(
|
|
462
|
+
folder, 'fullchain{}.pem'.format(max_serial_number))
|
|
380
463
|
|
|
381
464
|
def ResolveBrowsers(self, default_browsers):
|
|
382
465
|
"""Decide what browsers we should use.
|
|
@@ -385,25 +468,7 @@ class Launcher:
|
|
|
385
468
|
additional logic to derive a browser list from the parsed arguments.
|
|
386
469
|
"""
|
|
387
470
|
assert(default_browsers and len(default_browsers))
|
|
388
|
-
|
|
389
|
-
if self.parsed_args.no_browsers:
|
|
390
|
-
logging.warning('In this mode browsers must manually connect to karma.')
|
|
391
|
-
elif self.parsed_args.browsers:
|
|
392
|
-
self.karma_config['browsers'] = self.parsed_args.browsers
|
|
393
|
-
else:
|
|
394
|
-
logging.warning('Using default browsers: %s', default_browsers)
|
|
395
|
-
self.karma_config['browsers'] = default_browsers
|
|
396
|
-
|
|
397
|
-
# Check if there are any browsers that we should remove
|
|
398
|
-
if self.parsed_args.exclude_browsers and 'browsers' in self.karma_config:
|
|
399
|
-
all_browsers = set(self.karma_config['browsers'])
|
|
400
|
-
bad_browsers = set(self.parsed_args.exclude_browsers)
|
|
401
|
-
if bad_browsers - all_browsers:
|
|
402
|
-
raise RuntimeError('Attempting to exclude unselected browsers: %s' %
|
|
403
|
-
','.join(bad_browsers - all_browsers))
|
|
404
|
-
|
|
405
|
-
good_browsers = all_browsers - bad_browsers
|
|
406
|
-
self.karma_config['browsers'] = list(good_browsers)
|
|
471
|
+
self.karma_config['default_browsers'] = default_browsers
|
|
407
472
|
|
|
408
473
|
def RunCommand(self, karma_conf):
|
|
409
474
|
"""Build a command and send it to Karma for execution.
|
package/build/types/core
CHANGED
package/build/types/polyfill
CHANGED
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
+../../lib/polyfill/aria.js
|
|
5
5
|
+../../lib/polyfill/encryption_scheme.js
|
|
6
6
|
+../../lib/polyfill/fullscreen.js
|
|
7
|
-
+../../lib/polyfill/mathround.js
|
|
8
7
|
+../../lib/polyfill/mediasource.js
|
|
9
8
|
+../../lib/polyfill/media_capabilities.js
|
|
10
9
|
+../../lib/polyfill/orientation.js
|
|
11
|
-
+../../lib/polyfill/patchedmediakeys_apple.js
|
|
12
|
-
+../../lib/polyfill/patchedmediakeys_ms.js
|
|
13
10
|
+../../lib/polyfill/patchedmediakeys_nop.js
|
|
14
11
|
+../../lib/polyfill/patchedmediakeys_webkit.js
|
|
15
12
|
+../../lib/polyfill/pip_webkit.js
|
|
16
13
|
+../../lib/polyfill/random_uuid.js
|
|
17
14
|
+../../lib/polyfill/storage_estimate.js
|
|
15
|
+
+../../lib/polyfill/symbol.js
|
|
18
16
|
+../../lib/polyfill/video_play_promise.js
|
|
19
17
|
+../../lib/polyfill/videoplaybackquality.js
|
|
20
18
|
+../../lib/polyfill/vttcue.js
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
(function() {
|
|
8
8
|
// This is "window" in browsers and "global" in nodejs.
|
|
9
|
-
// See https://github.com/
|
|
9
|
+
// See https://github.com/shaka-project/shaka-player/issues/1445
|
|
10
10
|
var innerGlobal = typeof window != 'undefined' ? window : global;
|
|
11
11
|
|
|
12
12
|
// This is where our library exports things to. It is "this" in the wrapped
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// $jscomp.global, which will be "window", or "global", or "this", depending
|
|
19
19
|
// on circumstances.
|
|
20
20
|
// See https://github.com/google/closure-compiler/issues/2957 and
|
|
21
|
-
// https://github.com/
|
|
21
|
+
// https://github.com/shaka-project/shaka-player/issues/1455#issuecomment-393250035
|
|
22
22
|
|
|
23
23
|
// We provide "global" for use by Closure, and "window" for use by the Shaka
|
|
24
24
|
// library itself. Both point to "innerGlobal" above.
|
|
Binary file
|
package/demo/asset_card.js
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
goog.provide('shakaDemo.AssetCard');
|
|
9
8
|
|
|
10
|
-
|
|
11
9
|
goog.require('goog.asserts');
|
|
10
|
+
goog.require('shakaAssets');
|
|
12
11
|
goog.require('shakaDemo.MessageIds');
|
|
13
12
|
goog.require('shakaDemo.Tooltips');
|
|
14
13
|
goog.requireType('ShakaDemoAssetInfo');
|
|
@@ -63,7 +63,7 @@ UNCOMPILED_JS = [
|
|
|
63
63
|
<script defer src="../load.js"></script>
|
|
64
64
|
</head>
|
|
65
65
|
<body>
|
|
66
|
-
<div data-shaka-player-container id="
|
|
66
|
+
<div data-shaka-player-container id="video-container">
|
|
67
67
|
<video autoplay data-shaka-player id="video"></video>
|
|
68
68
|
</div>
|
|
69
69
|
<!-- Covers everything else while idle -->
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/* Experimentation has revealed that unless html, body, and
|
|
7
|
+
/* Experimentation has revealed that unless html, body, and video-container are
|
|
8
8
|
* width and height 100%, video can force all its parents to grow larger than
|
|
9
9
|
* window.innerHeight, causing things to be cut off for some content.
|
|
10
10
|
*/
|
|
@@ -25,7 +25,7 @@ body {
|
|
|
25
25
|
color: white;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
#video-container {
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 100%;
|
|
31
31
|
}
|
|
@@ -83,29 +83,29 @@ body:after {
|
|
|
83
83
|
height: 0;
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
z-index: -1;
|
|
86
|
-
content: url(idle1.jpg) url(idle2.jpg) url(idle3.jpg);
|
|
86
|
+
content: url("idle1.jpg") url("idle2.jpg") url("idle3.jpg");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
@keyframes bg-change {
|
|
90
|
-
0% { background-image: url(
|
|
90
|
+
0% { background-image: url("idle1.jpg"); padding-left: 0; }
|
|
91
91
|
|
|
92
|
-
32% { background-image: url(
|
|
92
|
+
32% { background-image: url("idle1.jpg"); padding-left: 0; }
|
|
93
93
|
|
|
94
|
-
34% { background-image: url(
|
|
94
|
+
34% { background-image: url("idle2.jpg"); padding-left: 0; }
|
|
95
95
|
|
|
96
|
-
49% { background-image: url(
|
|
96
|
+
49% { background-image: url("idle2.jpg"); padding-left: 0; }
|
|
97
97
|
|
|
98
|
-
50% { background-image: url(
|
|
98
|
+
50% { background-image: url("idle2.jpg"); padding-left: 400px; }
|
|
99
99
|
|
|
100
|
-
65% { background-image: url(
|
|
100
|
+
65% { background-image: url("idle2.jpg"); padding-left: 400px; }
|
|
101
101
|
|
|
102
|
-
67% { background-image: url(
|
|
102
|
+
67% { background-image: url("idle3.jpg"); padding-left: 400px; }
|
|
103
103
|
|
|
104
|
-
87% { background-image: url(
|
|
104
|
+
87% { background-image: url("idle3.jpg"); padding-left: 400px; }
|
|
105
105
|
|
|
106
|
-
88% { background-image: url(
|
|
106
|
+
88% { background-image: url("idle3.jpg"); padding-left: 0; }
|
|
107
107
|
|
|
108
|
-
98% { background-image: url(
|
|
108
|
+
98% { background-image: url("idle3.jpg"); padding-left: 0; }
|
|
109
109
|
|
|
110
|
-
100% { background-image: url(
|
|
110
|
+
100% { background-image: url("idle1.jpg"); padding-left: 0; }
|
|
111
111
|
}
|
package/demo/common/asset.js
CHANGED
|
@@ -77,6 +77,8 @@ const ShakaDemoAssetInfo = class {
|
|
|
77
77
|
this.imaContentSrcId = null;
|
|
78
78
|
/** @type {?string} */
|
|
79
79
|
this.mimeType = null;
|
|
80
|
+
/** @type {?string} */
|
|
81
|
+
this.mediaPlaylistFullMimeType = null;
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
// Offline storage values.
|
|
@@ -161,6 +163,15 @@ const ShakaDemoAssetInfo = class {
|
|
|
161
163
|
return this.drm.length == 1 && this.drm[0] == shakaAssets.KeySystem.CLEAR;
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @param {string} mediaPlaylistFullMimeType
|
|
168
|
+
* @return {!ShakaDemoAssetInfo}
|
|
169
|
+
*/
|
|
170
|
+
setMediaPlaylistFullMimeType(mediaPlaylistFullMimeType) {
|
|
171
|
+
this.mediaPlaylistFullMimeType = mediaPlaylistFullMimeType;
|
|
172
|
+
return this;
|
|
173
|
+
}
|
|
174
|
+
|
|
164
175
|
/**
|
|
165
176
|
* @param {!Object} extraConfig
|
|
166
177
|
* @return {!ShakaDemoAssetInfo}
|
|
@@ -368,7 +379,7 @@ const ShakaDemoAssetInfo = class {
|
|
|
368
379
|
*/
|
|
369
380
|
getConfiguration() {
|
|
370
381
|
const config = /** @type {shaka.extern.PlayerConfiguration} */(
|
|
371
|
-
{drm: {advanced: {}}, manifest: {dash: {}}});
|
|
382
|
+
{drm: {advanced: {}}, manifest: {dash: {}, hls: {}}});
|
|
372
383
|
|
|
373
384
|
if (this.extraConfig) {
|
|
374
385
|
for (const key in this.extraConfig) {
|
|
@@ -376,6 +387,11 @@ const ShakaDemoAssetInfo = class {
|
|
|
376
387
|
}
|
|
377
388
|
}
|
|
378
389
|
|
|
390
|
+
if (this.mediaPlaylistFullMimeType) {
|
|
391
|
+
config.manifest.hls.mediaPlaylistFullMimeType =
|
|
392
|
+
this.mediaPlaylistFullMimeType;
|
|
393
|
+
}
|
|
394
|
+
|
|
379
395
|
if (this.licenseServers.size) {
|
|
380
396
|
config.drm.servers = config.drm.servers || {};
|
|
381
397
|
this.licenseServers.forEach((value, key) => {
|
package/demo/common/assets.js
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
goog.require('ShakaDemoAssetInfo');
|
|
14
14
|
goog.require('shakaDemo.MessageIds');
|
|
15
15
|
|
|
16
|
+
goog.provide('shakaAssets');
|
|
17
|
+
|
|
16
18
|
|
|
17
19
|
// Types and enums {{{
|
|
18
20
|
/**
|
|
@@ -123,6 +125,8 @@ shakaAssets.Feature = {
|
|
|
123
125
|
MP4: shakaDemo.MessageIds.MP4,
|
|
124
126
|
// Set if the asset has at least one MPEG-2 TS stream.
|
|
125
127
|
MP2TS: shakaDemo.MessageIds.MP2TS,
|
|
128
|
+
// Set if the asset has at least one containerless stream (AAC, etc).
|
|
129
|
+
CONTAINERLESS: shakaDemo.MessageIds.CONTAINERLESS,
|
|
126
130
|
|
|
127
131
|
// Set if the asset has at least one stream that is at least 720p.
|
|
128
132
|
HIGH_DEFINITION: shakaDemo.MessageIds.HIGH_DEFINITION,
|
|
@@ -292,6 +296,15 @@ shakaAssets.testAssets = [
|
|
|
292
296
|
.addFeature(shakaAssets.Feature.SUBTITLES)
|
|
293
297
|
.addFeature(shakaAssets.Feature.SURROUND)
|
|
294
298
|
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
299
|
+
new ShakaDemoAssetInfo(
|
|
300
|
+
/* name= */ 'Angel One (HLS, MP4, video media playlist only)',
|
|
301
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/angel_one.png',
|
|
302
|
+
/* manifestUri= */ 'https://storage.googleapis.com/shaka-demo-assets/angel-one-hls/playlist_v-0480p-1000k-libx264.mp4.m3u8',
|
|
303
|
+
/* source= */ shakaAssets.Source.SHAKA)
|
|
304
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
305
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
306
|
+
.addFeature(shakaAssets.Feature.OFFLINE)
|
|
307
|
+
.setMediaPlaylistFullMimeType('video/mp4; codecs="avc1.4d401f"'),
|
|
295
308
|
new ShakaDemoAssetInfo(
|
|
296
309
|
/* name= */ 'Angel One (HLS, MP4, multilingual, Widevine)',
|
|
297
310
|
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/angel_one.png',
|
|
@@ -1188,6 +1201,24 @@ shakaAssets.testAssets = [
|
|
|
1188
1201
|
.addFeature(shakaAssets.Feature.HLS)
|
|
1189
1202
|
.addFeature(shakaAssets.Feature.LIVE)
|
|
1190
1203
|
.addFeature(shakaAssets.Feature.MP4),
|
|
1204
|
+
new ShakaDemoAssetInfo(
|
|
1205
|
+
/* name= */ 'Audio only HLS with raw AAC',
|
|
1206
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/apple_test_pattern.png',
|
|
1207
|
+
/* manifestUri= */ 'https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8',
|
|
1208
|
+
/* source= */ shakaAssets.Source.APPLE)
|
|
1209
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
1210
|
+
.addFeature(shakaAssets.Feature.CONTAINERLESS)
|
|
1211
|
+
.addFeature(shakaAssets.Feature.AUDIO_ONLY),
|
|
1212
|
+
new ShakaDemoAssetInfo(
|
|
1213
|
+
/* name= */ 'Apple Advanced HLS Stream (TS) with raw AAC',
|
|
1214
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/apple_test_pattern.png',
|
|
1215
|
+
/* manifestUri= */ 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8',
|
|
1216
|
+
/* source= */ shakaAssets.Source.APPLE)
|
|
1217
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
1218
|
+
.addFeature(shakaAssets.Feature.MP2TS)
|
|
1219
|
+
.addFeature(shakaAssets.Feature.CONTAINERLESS)
|
|
1220
|
+
.addFeature(shakaAssets.Feature.HIGH_DEFINITION)
|
|
1221
|
+
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
1191
1222
|
// }}}
|
|
1192
1223
|
|
|
1193
1224
|
// IRT assets {{{
|
|
@@ -13,6 +13,7 @@ shakaDemo.MessageIds = {
|
|
|
13
13
|
ADS: 'DEMO_ADS',
|
|
14
14
|
AUDIO_ONLY: 'DEMO_AUDIO_ONLY',
|
|
15
15
|
CAPTIONS: 'DEMO_CAPTIONS',
|
|
16
|
+
CONTAINERLESS: 'DEMO_CONTAINERLESS',
|
|
16
17
|
DASH: 'DEMO_DASH',
|
|
17
18
|
HIGH_DEFINITION: 'DEMO_HIGH_DEFINITION',
|
|
18
19
|
HLS: 'DEMO_HLS',
|
|
@@ -106,6 +107,8 @@ shakaDemo.MessageIds = {
|
|
|
106
107
|
DRM_SYSTEM: 'DEMO_DRM_SYSTEM',
|
|
107
108
|
DRM_TAB: 'DEMO_DRM_TAB',
|
|
108
109
|
EDIT_CUSTOM: 'DEMO_EDIT_CUSTOM',
|
|
110
|
+
HLS_FULL_MIME_TYPE: 'DEMO_HLS_FULL_MIME_TYPE',
|
|
111
|
+
HLS_TAB: 'DEMO_HLS_TAB',
|
|
109
112
|
HEADERS_TAB: 'DEMO_HEADERS_TAB',
|
|
110
113
|
ICON_URL: 'DEMO_ICON_URL',
|
|
111
114
|
LICENSE_CERTIFICATE_URL: 'DEMO_LICENSE_CERTIFICATE_URL',
|
|
@@ -187,12 +190,11 @@ shakaDemo.MessageIds = {
|
|
|
187
190
|
IGNORE_DASH_SUGGESTED_PRESENTATION_DELAY: 'DEMO_IGNORE_DASH_SUGGESTED_PRESENTATION_DELAY',
|
|
188
191
|
IGNORE_HLS_IMAGE_FAILURES: 'DEMO_IGNORE_HLS_IMAGE_FAILURES',
|
|
189
192
|
IGNORE_HLS_TEXT_FAILURES: 'DEMO_IGNORE_HLS_TEXT_FAILURES',
|
|
190
|
-
|
|
193
|
+
IGNORE_MANIFEST_PROGRAM_DATE_TIME: 'DEMO_IGNORE_MANIFEST_PROGRAM_DATE_TIME',
|
|
191
194
|
IGNORE_MIN_BUFFER_TIME: 'DEMO_IGNORE_MIN_BUFFER_TIME',
|
|
192
195
|
IGNORE_TEXT_FAILURES: 'DEMO_IGNORE_TEXT_FAILURES',
|
|
193
196
|
INACCURATE_MANIFEST_TOLERANCE: 'DEMO_INACCURATE_MANIFEST_TOLERANCE',
|
|
194
197
|
INITIAL_SEGMENT_LIMIT: 'DEMO_INITIAL_SEGMENT_LIMIT',
|
|
195
|
-
JUMP_LARGE_GAPS: 'DEMO_JUMP_LARGE_GAPS',
|
|
196
198
|
LANGUAGE_SECTION_HEADER: 'DEMO_LANGUAGE_SECTION_HEADER',
|
|
197
199
|
LOG_LEVEL: 'DEMO_LOG_LEVEL',
|
|
198
200
|
LOG_LEVEL_DEBUG: 'DEMO_LOG_LEVEL_DEBUG',
|
|
@@ -208,7 +210,6 @@ shakaDemo.MessageIds = {
|
|
|
208
210
|
MAX_FRAMERATE: 'DEMO_MAX_FRAMERATE',
|
|
209
211
|
MAX_HEIGHT: 'DEMO_MAX_HEIGHT',
|
|
210
212
|
MAX_PIXELS: 'DEMO_MAX_PIXELS',
|
|
211
|
-
MAX_SMALL_GAP_SIZE: 'DEMO_MAX_SMALL_GAP_SIZE',
|
|
212
213
|
MAX_WIDTH: 'DEMO_MAX_WIDTH',
|
|
213
214
|
MIN_BANDWIDTH: 'DEMO_MIN_BANDWIDTH',
|
|
214
215
|
MIN_BYTES: 'DEMO_MIN_BYTES',
|
|
@@ -222,6 +223,7 @@ shakaDemo.MessageIds = {
|
|
|
222
223
|
NUMBER_INTEGER_WARNING: 'DEMO_NUMBER_INTEGER_WARNING',
|
|
223
224
|
NUMBER_NONZERO_DECIMAL_WARNING: 'DEMO_NUMBER_NONZERO_DECIMAL_WARNING',
|
|
224
225
|
NUMBER_NONZERO_INTEGER_WARNING: 'DEMO_NUMBER_NONZERO_INTEGER_WARNING',
|
|
226
|
+
NUMBER_OF_PARALLEL_DOWNLOADS: 'DEMO_NUMBER_OF_PARALLEL_DOWNLOADS',
|
|
225
227
|
OFFLINE_SECTION_HEADER: 'DEMO_OFFLINE_SECTION_HEADER',
|
|
226
228
|
PREFER_FORCED_SUBS: 'DEMO_PREFER_FORCED_SUBS',
|
|
227
229
|
PREFER_NATIVE_HLS: 'DEMO_PREFER_NATIVE_HLS',
|
|
@@ -229,6 +231,7 @@ shakaDemo.MessageIds = {
|
|
|
229
231
|
RESTRICTIONS_SECTION_HEADER: 'DEMO_RESTRICTIONS_SECTION_HEADER',
|
|
230
232
|
SAFE_SEEK_OFFSET: 'DEMO_SAFE_SEEK_OFFSET',
|
|
231
233
|
SAFE_SKIP_DISTANCE: 'DEMO_SAFE_SKIP_DISTANCE',
|
|
234
|
+
SEGMENT_RELATIVE_VTT_TIMING: 'DEMO_SEGMENT_RELATIVE_VTT_TIMING',
|
|
232
235
|
SESSION_ID: 'DEMO_SESSION_ID',
|
|
233
236
|
SHAKA_CONTROLS: 'DEMO_SHAKA_CONTROLS',
|
|
234
237
|
SLOW_HALF_LIFE: 'DEMO_SLOW_HALF_LIFE',
|
package/demo/config.js
CHANGED
|
@@ -11,7 +11,6 @@ goog.require('goog.asserts');
|
|
|
11
11
|
goog.require('shakaDemo.BoolInput');
|
|
12
12
|
goog.require('shakaDemo.DatalistInput');
|
|
13
13
|
goog.require('shakaDemo.InputContainer');
|
|
14
|
-
goog.require('shakaDemo.Main');
|
|
15
14
|
goog.require('shakaDemo.MessageIds');
|
|
16
15
|
goog.require('shakaDemo.NumberInput');
|
|
17
16
|
goog.require('shakaDemo.SelectInput');
|
|
@@ -209,12 +208,12 @@ shakaDemo.Config = class {
|
|
|
209
208
|
'manifest.hls.ignoreTextStreamFailures')
|
|
210
209
|
.addBoolInput_(MessageIds.IGNORE_HLS_IMAGE_FAILURES,
|
|
211
210
|
'manifest.hls.ignoreImageStreamFailures')
|
|
212
|
-
.addBoolInput_(MessageIds.USE_FULL_SEGMENTS_FOR_START_TIME,
|
|
213
|
-
'manifest.hls.useFullSegmentsForStartTime')
|
|
214
211
|
.addTextInput_(MessageIds.DEFAULT_AUDIO_CODEC,
|
|
215
212
|
'manifest.hls.defaultAudioCodec')
|
|
216
213
|
.addTextInput_(MessageIds.DEFAULT_VIDEO_CODEC,
|
|
217
214
|
'manifest.hls.defaultVideoCodec')
|
|
215
|
+
.addBoolInput_(MessageIds.IGNORE_MANIFEST_PROGRAM_DATE_TIME,
|
|
216
|
+
'manifest.hls.ignoreManifestProgramDateTime')
|
|
218
217
|
.addNumberInput_(MessageIds.AVAILABILITY_WINDOW_OVERRIDE,
|
|
219
218
|
'manifest.availabilityWindowOverride',
|
|
220
219
|
/* canBeDecimal= */ true,
|
|
@@ -237,7 +236,9 @@ shakaDemo.Config = class {
|
|
|
237
236
|
.addBoolInput_(MessageIds.DISABLE_TEXT,
|
|
238
237
|
'manifest.disableText')
|
|
239
238
|
.addBoolInput_(MessageIds.DISABLE_THUMBNAILS,
|
|
240
|
-
'manifest.disableThumbnails')
|
|
239
|
+
'manifest.disableThumbnails')
|
|
240
|
+
.addBoolInput_(MessageIds.SEGMENT_RELATIVE_VTT_TIMING,
|
|
241
|
+
'manifest.segmentRelativeVttTiming');
|
|
241
242
|
|
|
242
243
|
this.addRetrySection_('manifest', MessageIds.MANIFEST_RETRY_SECTION_HEADER);
|
|
243
244
|
}
|
|
@@ -340,7 +341,9 @@ shakaDemo.Config = class {
|
|
|
340
341
|
const docLink = this.resolveExternLink_('.OfflineConfiguration');
|
|
341
342
|
this.addSection_(MessageIds.OFFLINE_SECTION_HEADER, docLink)
|
|
342
343
|
.addBoolInput_(MessageIds.USE_PERSISTENT_LICENSES,
|
|
343
|
-
'offline.usePersistentLicense')
|
|
344
|
+
'offline.usePersistentLicense')
|
|
345
|
+
.addNumberInput_(MessageIds.NUMBER_OF_PARALLEL_DOWNLOADS,
|
|
346
|
+
'offline.numberOfParallelDownloads');
|
|
344
347
|
}
|
|
345
348
|
|
|
346
349
|
/** @private */
|
|
@@ -351,9 +354,6 @@ shakaDemo.Config = class {
|
|
|
351
354
|
.addNumberInput_(MessageIds.GAP_DETECTION_THRESHOLD,
|
|
352
355
|
'streaming.gapDetectionThreshold',
|
|
353
356
|
/* canBeDecimal= */ true)
|
|
354
|
-
.addNumberInput_(MessageIds.MAX_SMALL_GAP_SIZE,
|
|
355
|
-
'streaming.smallGapLimit',
|
|
356
|
-
/* canBeDecimal= */ true)
|
|
357
357
|
.addNumberInput_(MessageIds.BUFFERING_GOAL,
|
|
358
358
|
'streaming.bufferingGoal',
|
|
359
359
|
/* canBeDecimal= */ true)
|
|
@@ -406,10 +406,8 @@ shakaDemo.Config = class {
|
|
|
406
406
|
this.latestInput_.input().checked = true;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
this.addBoolInput_(MessageIds.
|
|
410
|
-
'streaming.
|
|
411
|
-
.addBoolInput_(MessageIds.FORCE_TRANSMUX_TS,
|
|
412
|
-
'streaming.forceTransmuxTS')
|
|
409
|
+
this.addBoolInput_(MessageIds.FORCE_TRANSMUX_TS,
|
|
410
|
+
'streaming.forceTransmuxTS')
|
|
413
411
|
.addBoolInput_(MessageIds.START_AT_SEGMENT_BOUNDARY,
|
|
414
412
|
'streaming.startAtSegmentBoundary')
|
|
415
413
|
.addBoolInput_(MessageIds.IGNORE_TEXT_FAILURES,
|
package/demo/custom.js
CHANGED
|
@@ -12,7 +12,6 @@ goog.require('ShakaDemoAssetInfo');
|
|
|
12
12
|
goog.require('shakaDemo.AssetCard');
|
|
13
13
|
goog.require('shakaDemo.Input');
|
|
14
14
|
goog.require('shakaDemo.InputContainer');
|
|
15
|
-
goog.require('shakaDemo.Main');
|
|
16
15
|
goog.require('shakaDemo.MessageIds');
|
|
17
16
|
goog.require('shakaDemo.TextInput');
|
|
18
17
|
|
|
@@ -245,6 +244,40 @@ shakaDemo.Custom = class {
|
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
|
|
247
|
+
/**
|
|
248
|
+
* @param {!ShakaDemoAssetInfo} assetInProgress
|
|
249
|
+
* @param {!Array.<!HTMLInputElement>} inputsToCheck
|
|
250
|
+
* @return {!Element} div
|
|
251
|
+
* @private
|
|
252
|
+
*/
|
|
253
|
+
makeAssetDialogContentsHLS_(assetInProgress, inputsToCheck) {
|
|
254
|
+
const mediaPlaylistDiv = document.createElement('div');
|
|
255
|
+
const containerStyle = shakaDemo.InputContainer.Style.FLEX;
|
|
256
|
+
const container = new shakaDemo.InputContainer(
|
|
257
|
+
mediaPlaylistDiv, /* headerText= */ null, containerStyle,
|
|
258
|
+
/* docLink= */ null);
|
|
259
|
+
container.getClassList().add('wide-input');
|
|
260
|
+
container.setDefaultRowClass('wide-input');
|
|
261
|
+
|
|
262
|
+
const fullMimeTypeSetup = (input, container) => {
|
|
263
|
+
if (assetInProgress.mediaPlaylistFullMimeType) {
|
|
264
|
+
input.value = assetInProgress.mediaPlaylistFullMimeType;
|
|
265
|
+
}
|
|
266
|
+
const defaultConfig = shaka.util.PlayerConfiguration.createDefault();
|
|
267
|
+
input.placeholder = defaultConfig.manifest.hls.mediaPlaylistFullMimeType;
|
|
268
|
+
};
|
|
269
|
+
const fullMimeTypeOnChange = (input) => {
|
|
270
|
+
assetInProgress.setMediaPlaylistFullMimeType(input.value);
|
|
271
|
+
};
|
|
272
|
+
const fullMimeTypeName = shakaDemoMain.getLocalizedString(
|
|
273
|
+
shakaDemo.MessageIds.HLS_FULL_MIME_TYPE);
|
|
274
|
+
this.makeField_(
|
|
275
|
+
container, fullMimeTypeName, fullMimeTypeSetup, fullMimeTypeOnChange);
|
|
276
|
+
|
|
277
|
+
return mediaPlaylistDiv;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
248
281
|
/**
|
|
249
282
|
* @param {!ShakaDemoAssetInfo} assetInProgress
|
|
250
283
|
* @param {!Array.<!HTMLInputElement>} inputsToCheck
|
|
@@ -674,6 +707,8 @@ shakaDemo.Custom = class {
|
|
|
674
707
|
assetInProgress, inputsToCheck);
|
|
675
708
|
const adsDiv = this.makeAssetDialogContentsAds_(
|
|
676
709
|
assetInProgress, inputsToCheck);
|
|
710
|
+
const hlsDiv = this.makeAssetDialogContentsHLS_(
|
|
711
|
+
assetInProgress, inputsToCheck);
|
|
677
712
|
const extraConfigDiv = this.makeAssetDialogContentsExtra_(
|
|
678
713
|
assetInProgress, inputsToCheck);
|
|
679
714
|
const finishDiv = this.makeAssetDialogContentsFinish_(
|
|
@@ -713,6 +748,8 @@ shakaDemo.Custom = class {
|
|
|
713
748
|
shakaDemo.MessageIds.HEADERS_TAB, headersDiv, /* startOn= */ false);
|
|
714
749
|
addTabButton(
|
|
715
750
|
shakaDemo.MessageIds.ADS_TAB, adsDiv, /* startOn= */ false);
|
|
751
|
+
addTabButton(
|
|
752
|
+
shakaDemo.MessageIds.HLS_TAB, hlsDiv, /* startOn= */ false);
|
|
716
753
|
addTabButton(
|
|
717
754
|
shakaDemo.MessageIds.EXTRA_TAB, extraConfigDiv, /* startOn= */ false);
|
|
718
755
|
|
|
@@ -722,6 +759,7 @@ shakaDemo.Custom = class {
|
|
|
722
759
|
this.dialog_.appendChild(drmDiv);
|
|
723
760
|
this.dialog_.appendChild(headersDiv);
|
|
724
761
|
this.dialog_.appendChild(adsDiv);
|
|
762
|
+
this.dialog_.appendChild(hlsDiv);
|
|
725
763
|
this.dialog_.appendChild(extraConfigDiv);
|
|
726
764
|
this.dialog_.appendChild(finishDiv);
|
|
727
765
|
this.dialog_.appendChild(iconDiv);
|
package/demo/customWarning.txt
CHANGED
|
@@ -4,5 +4,5 @@ of the asset you were playing at the time you pressed the bug report button.
|
|
|
4
4
|
We have detected that you were playing a custom asset.
|
|
5
5
|
If this asset's URL is confidential, you might instead want to fill out an issue
|
|
6
6
|
template manually:
|
|
7
|
-
https://github.com/
|
|
8
|
-
-->
|
|
7
|
+
https://github.com/shaka-project/shaka-player/issues/new/choose
|
|
8
|
+
-->
|