shaka-player 4.6.4 → 4.7.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/README.md +1 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +9 -5
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.d.ts +46 -3
- package/dist/shaka-player.compiled.debug.d.ts +46 -3
- package/dist/shaka-player.compiled.debug.externs.js +45 -0
- package/dist/shaka-player.compiled.debug.js +382 -351
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +45 -0
- package/dist/shaka-player.compiled.js +1135 -1121
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +68 -4
- package/dist/shaka-player.ui.debug.d.ts +68 -4
- package/dist/shaka-player.ui.debug.externs.js +77 -0
- package/dist/shaka-player.ui.debug.js +428 -392
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +77 -0
- package/dist/shaka-player.ui.js +1304 -1290
- package/dist/shaka-player.ui.map +4 -4
- package/externs/mediasession.js +7 -0
- package/externs/shaka/abr_manager.js +8 -0
- package/externs/shaka/manifest.js +3 -3
- package/externs/shaka/player.js +59 -4
- package/lib/abr/simple_abr_manager.js +41 -15
- package/lib/cea/cea708_service.js +1 -1
- package/lib/cea/cea708_window.js +95 -7
- package/lib/dash/dash_parser.js +55 -11
- package/lib/media/adaptation_set_criteria.js +76 -10
- package/lib/media/media_source_engine.js +42 -18
- package/lib/media/segment_reference.js +12 -0
- package/lib/media/streaming_engine.js +55 -3
- package/lib/player.js +92 -6
- package/lib/util/cmsd_manager.js +269 -0
- package/lib/util/content_steering_manager.js +5 -1
- package/lib/util/mime_utils.js +6 -2
- package/lib/util/periods.js +108 -39
- package/lib/util/player_configuration.js +19 -5
- package/lib/util/stream_utils.js +82 -13
- package/package.json +1 -1
- package/ui/audio_language_selection.js +3 -0
- package/ui/controls.js +60 -0
- package/ui/externs/ui.js +12 -1
- package/ui/hidden_fast_forward_button.js +32 -0
- package/ui/hidden_rewind_button.js +32 -0
- package/ui/hidden_seek_button.js +121 -0
- package/ui/less/buttons.less +50 -0
- package/ui/less/containers.less +18 -0
- package/ui/resolution_selection.js +2 -0
- package/ui/ui.js +2 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -75
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/ISSUE_TEMPLATE/question.md +0 -26
- package/.github/config.yml +0 -1
- package/.github/workflows/appspot.yaml +0 -39
- package/.github/workflows/build-and-test.yaml +0 -222
- package/.github/workflows/compute-incremental-coverage.py +0 -265
- package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +0 -56
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +0 -37
- package/.github/workflows/deflake.yaml +0 -31
- package/.github/workflows/demo-version-index.yaml +0 -43
- package/.github/workflows/nightly-demo.yaml +0 -42
- package/.github/workflows/release-please.yaml +0 -193
- package/.github/workflows/report-incremental-coverage.yaml +0 -39
- package/.github/workflows/safari-homedir-launcher.sh +0 -18
- package/.github/workflows/selenium-lab-tests.yaml +0 -370
- package/.github/workflows/shaka-bot-commands/command-help.sh +0 -27
- package/.github/workflows/shaka-bot-commands/command-test.sh +0 -56
- package/.github/workflows/shaka-bot-commands/lib.sh +0 -83
- package/.github/workflows/shaka-bot-commands/main.sh +0 -51
- package/.github/workflows/sync-labels.yaml +0 -33
- package/.github/workflows/talk-to-shaka-bot.yaml +0 -29
- package/.github/workflows/update-issues.yaml +0 -31
- package/.github/workflows/update-screenshots.yaml +0 -142
- package/.github/workflows/validate-pr-title.yaml +0 -27
- package/CHANGELOG.md +0 -5774
- package/CODE_OF_CONDUCT.md +0 -93
- package/CONTRIBUTING.md +0 -76
- package/demo/TengwarTelcontar.woff2 +0 -0
- package/demo/app_logo_144.png +0 -0
- package/demo/app_logo_192.png +0 -0
- package/demo/app_logo_256.png +0 -0
- package/demo/app_logo_384.png +0 -0
- package/demo/app_logo_512.png +0 -0
- package/demo/app_manifest.json +0 -29
- package/demo/asset_card.js +0 -410
- package/demo/autoTemplate.txt +0 -61
- package/demo/cast_receiver/idle1.jpg +0 -0
- package/demo/cast_receiver/idle2.jpg +0 -0
- package/demo/cast_receiver/idle3.jpg +0 -0
- package/demo/cast_receiver/index.html +0 -75
- package/demo/cast_receiver/receiver_app.css +0 -111
- package/demo/cast_receiver/receiver_app.js +0 -158
- package/demo/close_button.js +0 -60
- package/demo/common/asset.js +0 -510
- package/demo/common/assets.js +0 -1634
- package/demo/config.js +0 -859
- package/demo/custom.js +0 -907
- package/demo/customWarning.txt +0 -8
- package/demo/demo.less +0 -591
- package/demo/demo_uncompiled.js +0 -11
- package/demo/demo_utils.js +0 -113
- package/demo/favicon.ico +0 -0
- package/demo/front.js +0 -156
- package/demo/icons/README.md +0 -4
- package/demo/icons/baseline-audiotrack-24px.svg +0 -1
- package/demo/icons/baseline-closed_caption-24px.svg +0 -1
- package/demo/icons/baseline-fast_forward-24px.svg +0 -1
- package/demo/icons/baseline-language-24px.svg +0 -1
- package/demo/icons/baseline-live_tv-24px.svg +0 -1
- package/demo/icons/baseline-subtitles-24px.svg +0 -1
- package/demo/icons/baseline-surround_sound-24px.svg +0 -1
- package/demo/icons/custom_ad.svg +0 -1
- package/demo/icons/custom_box_with_text.svg +0 -1
- package/demo/icons/custom_clear_key.svg +0 -1
- package/demo/icons/custom_high_definition.svg +0 -1
- package/demo/icons/custom_playready.svg +0 -1
- package/demo/icons/custom_ultra_high_definition.svg +0 -1
- package/demo/icons/custom_widevine.svg +0 -1
- package/demo/index.html +0 -173
- package/demo/input.js +0 -270
- package/demo/input_container.js +0 -218
- package/demo/load.js +0 -156
- package/demo/main.js +0 -1854
- package/demo/search.js +0 -452
- package/demo/service_worker.js +0 -355
- package/demo/shaka_logo_trans.png +0 -0
- package/demo/tooltip.js +0 -29
- package/demo/visualizer.js +0 -335
- package/demo/visualizer_button.js +0 -84
- package/dist/demo.compiled.debug.js +0 -340
- package/dist/demo.compiled.debug.map +0 -8
- package/dist/demo.compiled.js +0 -340
- package/dist/demo.compiled.map +0 -8
- package/dist/demo.css +0 -6
- package/dist/demo.css.map +0 -1
- package/dist/receiver.compiled.debug.js +0 -187
- package/dist/receiver.compiled.debug.map +0 -8
- package/dist/receiver.compiled.js +0 -187
- package/dist/receiver.compiled.map +0 -8
- package/docs/announcement-list-join-group.png +0 -0
- package/docs/api-mainpage.md +0 -28
- package/docs/design/REDESIGN.md +0 -283
- package/docs/design/architecture.md +0 -13
- package/docs/design/bg-fetch-after.gv +0 -29
- package/docs/design/bg-fetch-after.gv.png +0 -0
- package/docs/design/bg-fetch-before.gv +0 -18
- package/docs/design/bg-fetch-before.gv.png +0 -0
- package/docs/design/bg-fetch.md +0 -134
- package/docs/design/cast.gv +0 -35
- package/docs/design/cast.gv.png +0 -0
- package/docs/design/chromecast.md +0 -151
- package/docs/design/codec_preferences.md +0 -158
- package/docs/design/dash-audio-channels.md +0 -123
- package/docs/design/dash-manifests.md +0 -248
- package/docs/design/dash-timeline.svg +0 -4
- package/docs/design/dataflow.gv +0 -66
- package/docs/design/dataflow.gv.png +0 -0
- package/docs/design/export.md +0 -70
- package/docs/design/fuzzy-locale-matching.md +0 -40
- package/docs/design/gap-jumping.md +0 -151
- package/docs/design/lcevc-architecture.png +0 -0
- package/docs/design/lcevc-demo.png +0 -0
- package/docs/design/lcevc-integration.md +0 -72
- package/docs/design/locale_compatibility.svg +0 -1
- package/docs/design/locales_tree.svg +0 -1
- package/docs/design/localization-design-principles.md +0 -158
- package/docs/design/newdemo.gv +0 -83
- package/docs/design/newdemo.gv.png +0 -0
- package/docs/design/offline.gv +0 -43
- package/docs/design/offline.gv.png +0 -0
- package/docs/design/offline.md +0 -153
- package/docs/design/ownership.gv +0 -76
- package/docs/design/ownership.gv.png +0 -0
- package/docs/design/preload.md +0 -299
- package/docs/design/preload.png +0 -0
- package/docs/design/talking-about-languages.md +0 -46
- package/docs/design/timeline.svg +0 -152
- package/docs/design/ui.md +0 -31
- package/docs/design/ui_player_relationships.svg +0 -1
- package/docs/jsdoc-plugin.js +0 -74
- package/docs/jsdoc-template/README.md +0 -1
- package/docs/jsdoc-template/publish.js +0 -879
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/jsdoc-template/static/scripts/linenumber.js +0 -44
- package/docs/jsdoc-template/static/scripts/show-widget.js +0 -55
- package/docs/jsdoc-template/static/styles/jsdoc-default.css +0 -438
- package/docs/jsdoc-template/tmpl/augments.tmpl +0 -10
- package/docs/jsdoc-template/tmpl/container.tmpl +0 -205
- package/docs/jsdoc-template/tmpl/details.tmpl +0 -152
- package/docs/jsdoc-template/tmpl/example.tmpl +0 -2
- package/docs/jsdoc-template/tmpl/examples.tmpl +0 -13
- package/docs/jsdoc-template/tmpl/exceptions.tmpl +0 -32
- package/docs/jsdoc-template/tmpl/layout.tmpl +0 -50
- package/docs/jsdoc-template/tmpl/mainpage.tmpl +0 -14
- package/docs/jsdoc-template/tmpl/members.tmpl +0 -47
- package/docs/jsdoc-template/tmpl/method.tmpl +0 -140
- package/docs/jsdoc-template/tmpl/modifies.tmpl +0 -14
- package/docs/jsdoc-template/tmpl/params.tmpl +0 -131
- package/docs/jsdoc-template/tmpl/properties.tmpl +0 -125
- package/docs/jsdoc-template/tmpl/returns.tmpl +0 -19
- package/docs/jsdoc-template/tmpl/source.tmpl +0 -8
- package/docs/jsdoc-template/tmpl/tutorial.tmpl +0 -21
- package/docs/jsdoc-template/tmpl/type.tmpl +0 -7
- package/docs/jsdoc.conf.json +0 -38
- package/docs/shaka-player-logo.png +0 -0
- package/docs/style.md +0 -174
- package/docs/tutorials/a11y.md +0 -64
- package/docs/tutorials/ad_monetization.md +0 -292
- package/docs/tutorials/application-level-redirects.md +0 -94
- package/docs/tutorials/architecture.md +0 -32
- package/docs/tutorials/basic-usage.md +0 -89
- package/docs/tutorials/blob-url.md +0 -15
- package/docs/tutorials/config.md +0 -148
- package/docs/tutorials/debugging.md +0 -189
- package/docs/tutorials/drm-config.md +0 -274
- package/docs/tutorials/errors.md +0 -95
- package/docs/tutorials/fairplay.md +0 -242
- package/docs/tutorials/faq.md +0 -252
- package/docs/tutorials/index.json +0 -29
- package/docs/tutorials/lcevc.md +0 -118
- package/docs/tutorials/license-server-auth.md +0 -248
- package/docs/tutorials/license-wrapping.md +0 -168
- package/docs/tutorials/manifest-parser.md +0 -365
- package/docs/tutorials/network-and-buffering-config.md +0 -119
- package/docs/tutorials/offline.md +0 -683
- package/docs/tutorials/plugins.md +0 -184
- package/docs/tutorials/selenium-grid-config.md +0 -174
- package/docs/tutorials/service-worker.md +0 -106
- package/docs/tutorials/ui-customization.md +0 -288
- package/docs/tutorials/ui.md +0 -232
- package/docs/tutorials/upgrade-manifest.md +0 -281
- package/docs/tutorials/upgrade.md +0 -104
- package/docs/tutorials/welcome.md +0 -108
- package/docs/tutorials/widevine-service-certs.md +0 -45
- package/karma.conf.js +0 -879
- package/maintained-branches.md +0 -15
- package/roadmap.md +0 -186
- package/test/abr/simple_abr_manager_unit.js +0 -398
- package/test/ads/ad_manager_unit.js +0 -260
- package/test/assumptions/uint8_array_unit.js +0 -22
- package/test/cast/cast_proxy_unit.js +0 -736
- package/test/cast/cast_receiver_integration.js +0 -488
- package/test/cast/cast_receiver_unit.js +0 -1183
- package/test/cast/cast_sender_unit.js +0 -973
- package/test/cast/cast_utils_unit.js +0 -311
- package/test/cea/cea608_memory_unit.js +0 -411
- package/test/cea/cea708_service_unit.js +0 -674
- package/test/cea/cea708_window_unit.js +0 -373
- package/test/cea/cea_decoder_unit.js +0 -615
- package/test/cea/dtvcc_packet_builder_unit.js +0 -158
- package/test/cea/dtvcc_packet_unit.js +0 -60
- package/test/cea/mp4_cea_parser_unit.js +0 -127
- package/test/codec_switching/codec_switching_integration.js +0 -182
- package/test/dash/dash_parser_content_protection_unit.js +0 -998
- package/test/dash/dash_parser_integration.js +0 -74
- package/test/dash/dash_parser_live_unit.js +0 -1542
- package/test/dash/dash_parser_manifest_unit.js +0 -3121
- package/test/dash/dash_parser_segment_base_unit.js +0 -421
- package/test/dash/dash_parser_segment_list_unit.js +0 -380
- package/test/dash/dash_parser_segment_template_unit.js +0 -910
- package/test/dash/mpd_utils_unit.js +0 -794
- package/test/demo/demo_unit.js +0 -108
- package/test/deprecate/enforcer_unit.js +0 -74
- package/test/deprecate/version_unit.js +0 -57
- package/test/hls/hls_live_unit.js +0 -1330
- package/test/hls/hls_parser_unit.js +0 -5276
- package/test/hls/manifest_text_parser_unit.js +0 -545
- package/test/media/adaptation_set_criteria_unit.js +0 -806
- package/test/media/adaptation_set_unit.js +0 -229
- package/test/media/buffering_observer_unit.js +0 -143
- package/test/media/closed_caption_parser_unit.js +0 -18
- package/test/media/content_workarounds_unit.js +0 -43
- package/test/media/drm_engine_integration.js +0 -356
- package/test/media/drm_engine_unit.js +0 -2805
- package/test/media/media_source_engine_integration.js +0 -691
- package/test/media/media_source_engine_unit.js +0 -1512
- package/test/media/mp4_segment_index_parser_unit.js +0 -80
- package/test/media/play_rate_controller_unit.js +0 -69
- package/test/media/playhead_unit.js +0 -1394
- package/test/media/presentation_timeline_unit.js +0 -477
- package/test/media/quality_observer_unit.js +0 -138
- package/test/media/region_observer_unit.js +0 -374
- package/test/media/region_timeline_unit.js +0 -139
- package/test/media/segment_index_unit.js +0 -1080
- package/test/media/segment_prefetch_unit.js +0 -243
- package/test/media/segment_reference_unit.js +0 -63
- package/test/media/stall_detector_unit.js +0 -184
- package/test/media/streaming_engine_integration.js +0 -632
- package/test/media/streaming_engine_unit.js +0 -4211
- package/test/media/time_ranges_utils_unit.js +0 -123
- package/test/media/webm_segment_index_parser_unit.js +0 -90
- package/test/mss/mss_parser_content_protection_unit.js +0 -49
- package/test/mss/mss_parser_unit.js +0 -474
- package/test/mss/mss_player_integration.js +0 -124
- package/test/net/data_uri_plugin_unit.js +0 -105
- package/test/net/http_plugin_unit.js +0 -439
- package/test/net/networking_engine_unit.js +0 -1236
- package/test/net/networking_utils_unit.js +0 -37
- package/test/offline/download_progress_estimator_unit.js +0 -90
- package/test/offline/indexeddb_storage_unit.js +0 -192
- package/test/offline/manifest_convert_unit.js +0 -622
- package/test/offline/offline_integration.js +0 -168
- package/test/offline/offline_manifest_parser_unit.js +0 -231
- package/test/offline/offline_scheme_unit.js +0 -154
- package/test/offline/offline_uri_unit.js +0 -59
- package/test/offline/storage_compatibility_unit.js +0 -344
- package/test/offline/storage_integration.js +0 -1858
- package/test/player_external.js +0 -237
- package/test/player_integration.js +0 -1371
- package/test/player_load_graph_integration.js +0 -865
- package/test/player_src_equals_external.js +0 -154
- package/test/player_src_equals_integration.js +0 -527
- package/test/player_unit.js +0 -4434
- package/test/polyfill/media_capabilities_unit.js +0 -277
- package/test/polyfill/patchedmediakeys_apple_unit.js +0 -130
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +0 -30
- package/test/test/assets/3675/dash_1.mpd +0 -30
- package/test/test/assets/3675/dash_2.mpd +0 -30
- package/test/test/assets/3675/dash_3.mpd +0 -30
- package/test/test/assets/3675/dash_4.mpd +0 -30
- package/test/test/assets/3675/dash_5.mpd +0 -26
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/assets/audio-xhe-aac.mp4 +0 -0
- package/test/test/assets/audio.ts +0 -0
- package/test/test/assets/captions-test.ts +0 -0
- package/test/test/assets/cea-init.mp4 +0 -0
- package/test/test/assets/cea-segment.mp4 +0 -0
- package/test/test/assets/chapters.srt +0 -11
- package/test/test/assets/chapters.vtt +0 -10
- package/test/test/assets/chapters2.vtt +0 -10
- package/test/test/assets/dash-aes-128/Fragments(video=0,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=20000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=40000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=60000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=i,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/dash.mpd +0 -18
- package/test/test/assets/dash-aes-128/license +0 -1
- package/test/test/assets/dash-multi-codec/audio_en_2c_128k_aac.mp4 +0 -0
- package/test/test/assets/dash-multi-codec/audio_es_2c_64k_opus.webm +0 -0
- package/test/test/assets/dash-multi-codec/dash.mpd +0 -32
- package/test/test/assets/dash-multi-codec/video_144p_108k_h264.mp4 +0 -0
- package/test/test/assets/db-dump-v1.json +0 -1
- package/test/test/assets/db-dump-v2-broken.json +0 -1
- package/test/test/assets/db-dump-v2-clean.json +0 -1
- package/test/test/assets/db-dump-v3.json +0 -1
- package/test/test/assets/db-dump-v4-broken.json +0 -1
- package/test/test/assets/db-dump-v5.json +0 -1
- package/test/test/assets/empty_caption_video_init.mp4 +0 -0
- package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-audio-init.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-audio-segment.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-video-init.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-video-segment.mp4 +0 -0
- package/test/test/assets/green-pixel.mp4 +0 -0
- package/test/test/assets/green-pixel.txt +0 -15
- package/test/test/assets/h265-cea-init.mp4 +0 -0
- package/test/test/assets/h265-cea-segment.mp4 +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence0.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence1.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence2.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence3.aac +0 -0
- package/test/test/assets/hls-raw-aac/manifest.m3u8 +0 -4
- package/test/test/assets/hls-raw-aac/stream.m4a.m3u8 +0 -14
- package/test/test/assets/hls-raw-ac3/fileSequence0.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence1.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence2.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence3.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence4.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence5.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence6.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence7.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/prog_index.m3u8 +0 -31
- package/test/test/assets/hls-raw-ec3/fileSequence0.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence1.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence2.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence3.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence4.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence5.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence6.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence7.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/prog_index.m3u8 +0 -31
- package/test/test/assets/hls-raw-mp3/chunklist_w905519204.m3u8 +0 -13
- package/test/test/assets/hls-raw-mp3/media_w905519204_0.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_1.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_2.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_3.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/playlist.m3u8 +0 -4
- package/test/test/assets/hls-ts-aac/playlist.m3u8 +0 -23
- package/test/test/assets/hls-ts-aac/segment_0.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_1.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_2.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_3.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_4.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_5.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_6.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_7.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ac3/prog_index.m3u8 +0 -19
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ec3/prog_index.m3u8 +0 -19
- package/test/test/assets/hls-ts-h264/fileSequence0.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence1.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence2.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence3.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence4.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence5.ts +0 -0
- package/test/test/assets/hls-ts-h264/prog_index.m3u8 +0 -25
- package/test/test/assets/hls-ts-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-h265/hevc.m3u8 +0 -6
- package/test/test/assets/hls-ts-h265/index.m3u8 +0 -7
- package/test/test/assets/hls-ts-mp3/manifest.m3u8 +0 -13
- package/test/test/assets/hls-ts-mp3/media_w239891843_0.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_1.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_2.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_3.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/chunk.m3u8 +0 -17
- package/test/test/assets/hls-ts-muxed-aac-h264/n_0_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_1_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_2_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_3_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_4_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_5_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/playlist.m3u8 +0 -4
- package/test/test/assets/hls-ts-muxed-aac-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +0 -9
- package/test/test/assets/hls-ts-muxed-ac3-h264/media.m3u8 +0 -24
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00004.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00005.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/prog_index.m3u8 +0 -14
- package/test/test/assets/hls-ts-muxed-mp3-h264/index.m3u8 +0 -23
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-1-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-2-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-3-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-4-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-5-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-6-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-7-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-8-v1-a1.ts +0 -0
- package/test/test/assets/id3-metadata.aac +0 -0
- package/test/test/assets/id3-metadata.ts +0 -0
- package/test/test/assets/index-segment.mp4 +0 -0
- package/test/test/assets/index-segment.webm +0 -0
- package/test/test/assets/init-segment.webm +0 -0
- package/test/test/assets/large_file.mpd +0 -4930
- package/test/test/assets/multidrm-audio-init.mp4 +0 -0
- package/test/test/assets/multidrm-audio-segment.mp4 +0 -0
- package/test/test/assets/multidrm-video-init.mp4 +0 -0
- package/test/test/assets/multidrm-video-segment.mp4 +0 -0
- package/test/test/assets/multiple-trun-init.mp4 +0 -0
- package/test/test/assets/multiple-trun-segment.mp4 +0 -0
- package/test/test/assets/sintel-audio-init.mp4 +0 -0
- package/test/test/assets/sintel-audio-segment.mp4 +0 -0
- package/test/test/assets/sintel-video-init.mp4 +0 -0
- package/test/test/assets/sintel-video-segment.mp4 +0 -0
- package/test/test/assets/small.mp4 +0 -0
- package/test/test/assets/text-clip-alt.vtt +0 -63
- package/test/test/assets/text-clip.vtt +0 -63
- package/test/test/assets/thumbnails-sprites.vtt +0 -10
- package/test/test/assets/thumbnails.vtt +0 -10
- package/test/test/assets/ttml-init.mp4 +0 -0
- package/test/test/assets/ttml-segment-multiplemdat.mp4 +0 -0
- package/test/test/assets/ttml-segment.mp4 +0 -0
- package/test/test/assets/video.ts +0 -0
- package/test/test/assets/vtt-init.mp4 +0 -0
- package/test/test/assets/vtt-segment-multi-payload.mp4 +0 -0
- package/test/test/assets/vtt-segment-no-duration.mp4 +0 -0
- package/test/test/assets/vtt-segment-settings.mp4 +0 -0
- package/test/test/assets/vtt-segment.mp4 +0 -0
- package/test/test/boot.js +0 -495
- package/test/test/externs/filters.js +0 -44
- package/test/test/externs/fontfaceonload.js +0 -29
- package/test/test/externs/jasmine.js +0 -670
- package/test/test/externs/karma.js +0 -26
- package/test/test/externs/require.js +0 -21
- package/test/test/externs/sprintf.js +0 -18
- package/test/test/namespace.js +0 -10
- package/test/test/util/canned_idb.js +0 -379
- package/test/test/util/cea_utils.js +0 -60
- package/test/test/util/dash_parser_util.js +0 -329
- package/test/test/util/fake_ad.js +0 -321
- package/test/test/util/fake_ad_manager.js +0 -122
- package/test/test/util/fake_demo_main.js +0 -144
- package/test/test/util/fake_drm_engine.js +0 -103
- package/test/test/util/fake_media_source_engine.js +0 -464
- package/test/test/util/fake_networking_engine.js +0 -381
- package/test/test/util/fake_segment_prefetch.js +0 -84
- package/test/test/util/fake_text_displayer.js +0 -60
- package/test/test/util/id3_generator.js +0 -100
- package/test/test/util/indexeddb_utils.js +0 -124
- package/test/test/util/jasmine_fetch.js +0 -382
- package/test/test/util/layout_tests.js +0 -435
- package/test/test/util/loader.js +0 -88
- package/test/test/util/manifest_generator.js +0 -705
- package/test/test/util/manifest_parser_util.js +0 -101
- package/test/test/util/mss_parser_util.js +0 -119
- package/test/test/util/offline_utils.js +0 -105
- package/test/test/util/simple_fakes.js +0 -535
- package/test/test/util/stream_generator.js +0 -676
- package/test/test/util/streaming_engine_util.js +0 -506
- package/test/test/util/test_scheme.js +0 -778
- package/test/test/util/ttml_utils.js +0 -77
- package/test/test/util/ui_utils.js +0 -183
- package/test/test/util/util.js +0 -374
- package/test/test/util/waiter.js +0 -406
- package/test/text/cue_integration.js +0 -51
- package/test/text/lrc_text_parser_unit.js +0 -98
- package/test/text/mp4_ttml_parser_unit.js +0 -171
- package/test/text/mp4_vtt_parser_unit.js +0 -195
- package/test/text/sbv_text_parser_unit.js +0 -81
- package/test/text/simple_text_displayer_unit.js +0 -468
- package/test/text/srt_text_parser_unit.js +0 -163
- package/test/text/ssa_text_parser_unit.js +0 -382
- package/test/text/text_displayer_layout_unit.js +0 -323
- package/test/text/text_engine_unit.js +0 -500
- package/test/text/text_track_integration.js +0 -186
- package/test/text/ttml_text_parser_unit.js +0 -2176
- package/test/text/ui_text_displayer_unit.js +0 -608
- package/test/text/vtt_text_parser_unit.js +0 -1363
- package/test/text/web_vtt_generator_unit.js +0 -144
- package/test/text/web_vtt_layout_integration.js +0 -524
- package/test/transmuxer/transmuxer_engine_integration.js +0 -69
- package/test/transmuxer/transmuxer_integration.js +0 -443
- package/test/ui/ad_ui_unit.js +0 -369
- package/test/ui/localization_unit.js +0 -508
- package/test/ui/ui_customization_unit.js +0 -208
- package/test/ui/ui_integration.js +0 -669
- package/test/ui/ui_unit.js +0 -902
- package/test/util/abortable_operation_unit.js +0 -624
- package/test/util/array_utils_unit.js +0 -58
- package/test/util/buffer_utils_unit.js +0 -185
- package/test/util/cmcd_manager_unit.js +0 -440
- package/test/util/content_steering_manager_unit.js +0 -427
- package/test/util/data_view_reader_unit.js +0 -254
- package/test/util/ebml_parser_unit.js +0 -297
- package/test/util/event_manager_unit.js +0 -185
- package/test/util/fake_event_target_unit.js +0 -123
- package/test/util/id3_utils_unit.js +0 -168
- package/test/util/iterables_unit.js +0 -68
- package/test/util/language_utils_unit.js +0 -240
- package/test/util/manifest_parser_utils_unit.js +0 -55
- package/test/util/mime_utils_unit.js +0 -64
- package/test/util/mp4_box_parsers_unit.js +0 -246
- package/test/util/mp4_parser_unit.js +0 -373
- package/test/util/multi_map_unit.js +0 -94
- package/test/util/object_utils_unit.js +0 -79
- package/test/util/periods_unit.js +0 -1623
- package/test/util/pssh_unit.js +0 -226
- package/test/util/state_history_unit.js +0 -101
- package/test/util/stream_utils_unit.js +0 -1068
- package/test/util/string_utils_unit.js +0 -166
- package/test/util/text_parser_unit.js +0 -165
- package/test/util/ts_parser_unit.js +0 -77
- package/test/util/xml_utils_unit.js +0 -444
package/demo/config.js
DELETED
|
@@ -1,859 +0,0 @@
|
|
|
1
|
-
/*! @license
|
|
2
|
-
* Shaka Player
|
|
3
|
-
* Copyright 2016 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
goog.provide('shakaDemo.Config');
|
|
9
|
-
|
|
10
|
-
goog.require('goog.asserts');
|
|
11
|
-
goog.require('shakaDemo.BoolInput');
|
|
12
|
-
goog.require('shakaDemo.DatalistInput');
|
|
13
|
-
goog.require('shakaDemo.InputContainer');
|
|
14
|
-
goog.require('shakaDemo.NumberInput');
|
|
15
|
-
goog.require('shakaDemo.SelectInput');
|
|
16
|
-
goog.require('shakaDemo.TextInput');
|
|
17
|
-
goog.requireType('shakaDemo.Input');
|
|
18
|
-
|
|
19
|
-
/** @type {?shakaDemo.Config} */
|
|
20
|
-
let shakaDemoConfig;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Shaka Player demo, configuration page layout.
|
|
25
|
-
*/
|
|
26
|
-
shakaDemo.Config = class {
|
|
27
|
-
/**
|
|
28
|
-
* Register the page configuration.
|
|
29
|
-
*/
|
|
30
|
-
static init() {
|
|
31
|
-
const container = shakaDemoMain.getHamburgerMenu();
|
|
32
|
-
shakaDemoConfig = new shakaDemo.Config(container);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** @param {!Element} container */
|
|
36
|
-
constructor(container) {
|
|
37
|
-
/** @private {!Element} */
|
|
38
|
-
this.container_ = container;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* A list of all sections.
|
|
42
|
-
* @private {!Array.<!shakaDemo.InputContainer>}
|
|
43
|
-
*/
|
|
44
|
-
this.sections_ = [];
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The input object for the control currently being constructed.
|
|
48
|
-
* @private {?shakaDemo.Input}
|
|
49
|
-
*/
|
|
50
|
-
this.latestInput_ = null;
|
|
51
|
-
|
|
52
|
-
this.reload_();
|
|
53
|
-
|
|
54
|
-
// Listen to external config changes (i.e. from hash changes).
|
|
55
|
-
document.addEventListener('shaka-main-config-change', () => {
|
|
56
|
-
// Respond to them by remaking. This is to avoid triggering any config
|
|
57
|
-
// changes based on the config changes.
|
|
58
|
-
this.reloadAndSaveState_();
|
|
59
|
-
});
|
|
60
|
-
document.addEventListener('shaka-main-drawer-state-change', () => {
|
|
61
|
-
this.setContentAvailability_(shakaDemoMain.getIsDrawerOpen());
|
|
62
|
-
});
|
|
63
|
-
this.setContentAvailability_(shakaDemoMain.getIsDrawerOpen());
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @param {boolean} availability
|
|
68
|
-
* @private
|
|
69
|
-
*/
|
|
70
|
-
setContentAvailability_(availability) {
|
|
71
|
-
if (availability) {
|
|
72
|
-
this.container_.classList.remove('hidden');
|
|
73
|
-
} else {
|
|
74
|
-
this.container_.classList.add('hidden');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/** @private */
|
|
79
|
-
reload_() {
|
|
80
|
-
shaka.util.Dom.removeAllChildren(this.container_);
|
|
81
|
-
this.sections_ = [];
|
|
82
|
-
|
|
83
|
-
this.addMetaSection_();
|
|
84
|
-
this.addLanguageSection_();
|
|
85
|
-
this.addAbrSection_();
|
|
86
|
-
this.addOfflineSection_();
|
|
87
|
-
this.addDrmSection_();
|
|
88
|
-
this.addStreamingSection_();
|
|
89
|
-
this.addMediaSourceSection_();
|
|
90
|
-
this.addManifestSection_();
|
|
91
|
-
this.addRetrictionsSection_('', 'Restrictions');
|
|
92
|
-
this.addCmcdSection_();
|
|
93
|
-
this.addLcevcSection_();
|
|
94
|
-
this.addAdsSection_();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Remake the contents of the div. Unlike |reload_|, this will also remember
|
|
99
|
-
* which sections were open.
|
|
100
|
-
* @private
|
|
101
|
-
*/
|
|
102
|
-
reloadAndSaveState_() {
|
|
103
|
-
const wasOpenArray = this.sections_.map((section) => section.getIsOpen());
|
|
104
|
-
this.reload_();
|
|
105
|
-
for (let i = 0; i < wasOpenArray.length; i++) {
|
|
106
|
-
const wasOpen = wasOpenArray[i];
|
|
107
|
-
const section = this.sections_[i];
|
|
108
|
-
if (wasOpen) {
|
|
109
|
-
section.open();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Update the componentHandler, to account for any new MDL elements added.
|
|
114
|
-
componentHandler.upgradeDom();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** @private */
|
|
118
|
-
addDrmSection_() {
|
|
119
|
-
const docLink = this.resolveExternLink_('.DrmConfiguration');
|
|
120
|
-
this.addSection_('DRM', docLink)
|
|
121
|
-
.addBoolInput_('Delay License Request Until Played',
|
|
122
|
-
'drm.delayLicenseRequestUntilPlayed')
|
|
123
|
-
.addBoolInput_('Log license exchange data', 'drm.logLicenseExchange')
|
|
124
|
-
.addNumberInput_('Update expiration time',
|
|
125
|
-
'drm.updateExpirationTime',
|
|
126
|
-
/* canBeDecimal= */ true,
|
|
127
|
-
/* canBeZero= */ false,
|
|
128
|
-
/* canBeUnset= */ true)
|
|
129
|
-
.addBoolInput_('Parse inband "pssh" from media segments',
|
|
130
|
-
'drm.parseInbandPsshEnabled')
|
|
131
|
-
.addTextInput_('Min HDCP version', 'drm.minHdcpVersion')
|
|
132
|
-
.addBoolInput_('Ignore duplicate init data',
|
|
133
|
-
'drm.ignoreDuplicateInitData');
|
|
134
|
-
const advanced = shakaDemoMain.getConfiguration().drm.advanced || {};
|
|
135
|
-
const addDRMAdvancedField = (name, valueName, suggestions) => {
|
|
136
|
-
// All advanced fields of a given type are set at once.
|
|
137
|
-
this.addDatalistInput_(name, suggestions, (input) => {
|
|
138
|
-
// Add in any common drmSystem not currently in advanced.
|
|
139
|
-
for (const drmSystem of shakaDemo.Main.commonDrmSystems) {
|
|
140
|
-
if (!(drmSystem in advanced)) {
|
|
141
|
-
advanced[drmSystem] = shakaDemo.Main.defaultAdvancedDrmConfig();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
// Set the robustness.
|
|
145
|
-
for (const drmSystem in advanced) {
|
|
146
|
-
advanced[drmSystem][valueName] = input.value;
|
|
147
|
-
}
|
|
148
|
-
shakaDemoMain.configure('drm.advanced', advanced);
|
|
149
|
-
shakaDemoMain.remakeHash();
|
|
150
|
-
});
|
|
151
|
-
const keySystem = Object.keys(advanced)[0];
|
|
152
|
-
if (keySystem) {
|
|
153
|
-
const currentValue = advanced[keySystem][valueName];
|
|
154
|
-
this.latestInput_.input().value = currentValue;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const robustnessSuggestions = [
|
|
159
|
-
'SW_SECURE_CRYPTO',
|
|
160
|
-
'SW_SECURE_DECODE',
|
|
161
|
-
'HW_SECURE_CRYPTO',
|
|
162
|
-
'HW_SECURE_DECODE',
|
|
163
|
-
'HW_SECURE_ALL',
|
|
164
|
-
'150',
|
|
165
|
-
'2000',
|
|
166
|
-
'3000',
|
|
167
|
-
];
|
|
168
|
-
|
|
169
|
-
const sessionTypeSuggestions = ['temporary', 'persistent-license'];
|
|
170
|
-
|
|
171
|
-
addDRMAdvancedField(
|
|
172
|
-
'Video Robustness', 'videoRobustness', robustnessSuggestions);
|
|
173
|
-
addDRMAdvancedField(
|
|
174
|
-
'Audio Robustness', 'audioRobustness', robustnessSuggestions);
|
|
175
|
-
addDRMAdvancedField('Session Type', 'sessionType', sessionTypeSuggestions);
|
|
176
|
-
|
|
177
|
-
this.addRetrySection_('drm', 'DRM Retry Parameters');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/** @private */
|
|
181
|
-
addManifestSection_() {
|
|
182
|
-
const docLink = this.resolveExternLink_('.ManifestConfiguration');
|
|
183
|
-
this.addSection_('Manifest', docLink)
|
|
184
|
-
.addBoolInput_('Ignore DASH DRM Info', 'manifest.dash.ignoreDrmInfo')
|
|
185
|
-
.addBoolInput_('Auto-Correct DASH Drift',
|
|
186
|
-
'manifest.dash.autoCorrectDrift')
|
|
187
|
-
.addBoolInput_('Disable Xlink processing',
|
|
188
|
-
'manifest.dash.disableXlinkProcessing')
|
|
189
|
-
.addBoolInput_('Xlink Should Fail Gracefully',
|
|
190
|
-
'manifest.dash.xlinkFailGracefully')
|
|
191
|
-
.addBoolInput_('Ignore DASH suggestedPresentationDelay',
|
|
192
|
-
'manifest.dash.ignoreSuggestedPresentationDelay')
|
|
193
|
-
.addBoolInput_('Ignore empty DASH AdaptationSets',
|
|
194
|
-
'manifest.dash.ignoreEmptyAdaptationSet')
|
|
195
|
-
.addBoolInput_('Ignore DASH maxSegmentDuration',
|
|
196
|
-
'manifest.dash.ignoreMaxSegmentDuration')
|
|
197
|
-
.addBoolInput_('Ignore HLS Text Stream Failures',
|
|
198
|
-
'manifest.hls.ignoreTextStreamFailures')
|
|
199
|
-
.addBoolInput_('Ignore HLS Image Stream Failures',
|
|
200
|
-
'manifest.hls.ignoreImageStreamFailures')
|
|
201
|
-
.addTextInput_('Default Audio Codec', 'manifest.hls.defaultAudioCodec')
|
|
202
|
-
.addTextInput_('Default Video Codec', 'manifest.hls.defaultVideoCodec')
|
|
203
|
-
.addTextInput_('Default media playlist full mime type',
|
|
204
|
-
'manifest.hls.mediaPlaylistFullMimeType')
|
|
205
|
-
.addBoolInput_('Ignore Program Date Time from manifest',
|
|
206
|
-
'manifest.hls.ignoreManifestProgramDateTime')
|
|
207
|
-
.addBoolInput_('Use Safari behavior for live',
|
|
208
|
-
'manifest.hls.useSafariBehaviorForLive')
|
|
209
|
-
.addNumberInput_('Live segments delay',
|
|
210
|
-
'manifest.hls.liveSegmentsDelay')
|
|
211
|
-
.addBoolInput_('Enable HLS sequence mode', 'manifest.hls.sequenceMode')
|
|
212
|
-
.addBoolInput_('Ignore Manifest Timestamps in Segments Mode',
|
|
213
|
-
'manifest.hls.ignoreManifestTimestampsInSegmentsMode')
|
|
214
|
-
.addBoolInput_('Disable codec guessing',
|
|
215
|
-
'manifest.hls.disableCodecGuessing')
|
|
216
|
-
.addBoolInput_('Allow LL-HLS byterange optimization',
|
|
217
|
-
'manifest.hls.allowLowLatencyByteRangeOptimization')
|
|
218
|
-
.addNumberInput_('Availability Window Override',
|
|
219
|
-
'manifest.availabilityWindowOverride',
|
|
220
|
-
/* canBeDecimal= */ true,
|
|
221
|
-
/* canBeZero= */ false,
|
|
222
|
-
/* canBeUnset= */ true)
|
|
223
|
-
.addTextInput_('Clock Sync URI', 'manifest.dash.clockSyncUri')
|
|
224
|
-
.addNumberInput_('Default Presentation Delay',
|
|
225
|
-
'manifest.defaultPresentationDelay')
|
|
226
|
-
.addBoolInput_('Enable Audio Groups', 'manifest.dash.enableAudioGroups')
|
|
227
|
-
.addBoolInput_('Ignore Min Buffer Time',
|
|
228
|
-
'manifest.dash.ignoreMinBufferTime')
|
|
229
|
-
.addNumberInput_('Initial Segment Limit',
|
|
230
|
-
'manifest.dash.initialSegmentLimit',
|
|
231
|
-
/* canBeDecimal= */ false,
|
|
232
|
-
/* canBeZero= */ false,
|
|
233
|
-
/* canBeUnset= */ true)
|
|
234
|
-
.addBoolInput_('Enable DASH sequence mode',
|
|
235
|
-
'manifest.dash.sequenceMode')
|
|
236
|
-
.addBoolInput_('Disable Audio', 'manifest.disableAudio')
|
|
237
|
-
.addBoolInput_('Disable Video', 'manifest.disableVideo')
|
|
238
|
-
.addBoolInput_('Disable Text', 'manifest.disableText')
|
|
239
|
-
.addBoolInput_('Disable Thumbnails', 'manifest.disableThumbnails')
|
|
240
|
-
.addBoolInput_('Enable segment-relative VTT Timing',
|
|
241
|
-
'manifest.segmentRelativeVttTiming')
|
|
242
|
-
.addBoolInput_('Enable MSS sequence mode', 'manifest.mss.sequenceMode');
|
|
243
|
-
|
|
244
|
-
this.addRetrySection_('manifest', 'Manifest Retry Parameters');
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/** @private */
|
|
248
|
-
addAbrSection_() {
|
|
249
|
-
const docLink = this.resolveExternLink_('.AbrConfiguration');
|
|
250
|
-
this.addSection_('Adaptation', docLink)
|
|
251
|
-
.addBoolInput_('Enabled', 'abr.enabled')
|
|
252
|
-
.addBoolInput_('Use Network Information API',
|
|
253
|
-
'abr.useNetworkInformation')
|
|
254
|
-
.addNumberInput_('Default Bandwidth EstimatZ',
|
|
255
|
-
'abr.defaultBandwidthEstimate')
|
|
256
|
-
.addNumberInput_('Bandwidth Downgrade Target',
|
|
257
|
-
'abr.bandwidthDowngradeTarget',
|
|
258
|
-
/* canBeDecimal= */ true)
|
|
259
|
-
.addNumberInput_('Bandwidth Upgrade Target',
|
|
260
|
-
'abr.bandwidthUpgradeTarget',
|
|
261
|
-
/* canBeDecimal= */ true)
|
|
262
|
-
.addNumberInput_('Switch Interval', 'abr.switchInterval',
|
|
263
|
-
/* canBeDecimal= */ true)
|
|
264
|
-
.addNumberInput_('Min total Bytes', 'abr.advanced.minTotalBytes')
|
|
265
|
-
.addNumberInput_('Min Bytes', 'abr.advanced.minBytes')
|
|
266
|
-
.addNumberInput_('Fast half life', 'abr.advanced.fastHalfLife',
|
|
267
|
-
/* canBeDecimal= */ true)
|
|
268
|
-
.addNumberInput_('Slow half life', 'abr.advanced.slowHalfLife',
|
|
269
|
-
/* canBeDecimal= */ true)
|
|
270
|
-
.addBoolInput_('Restrict to element size', 'abr.restrictToElementSize')
|
|
271
|
-
.addBoolInput_('Restrict to screen size', 'abr.restrictToScreenSize')
|
|
272
|
-
.addBoolInput_('Ignore device pixel ratio',
|
|
273
|
-
'abr.ignoreDevicePixelRatio')
|
|
274
|
-
.addBoolInput_('Clear video buffer on abr rendition switch',
|
|
275
|
-
'abr.clearBufferSwitch')
|
|
276
|
-
.addNumberInput_('Safe margin on abr switch rendition',
|
|
277
|
-
'abr.safeMarginSwitch',
|
|
278
|
-
/* canBeDecimal= */ true);
|
|
279
|
-
this.addRetrictionsSection_('abr', 'Adaptation Restrictions');
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/** @private */
|
|
283
|
-
addCmcdSection_() {
|
|
284
|
-
const docLink = this.resolveExternLink_('.CmcdConfiguration');
|
|
285
|
-
this.addSection_('CMCD', docLink)
|
|
286
|
-
.addBoolInput_('Enabled', 'cmcd.enabled')
|
|
287
|
-
.addTextInput_('Session ID', 'cmcd.sessionId')
|
|
288
|
-
.addTextInput_('Content ID', 'cmcd.contentId')
|
|
289
|
-
.addBoolInput_('Use Headers', 'cmcd.useHeaders');
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/** @private */
|
|
293
|
-
addLcevcSection_() {
|
|
294
|
-
const docLink = this.resolveExternLink_('.LcevcConfiguration');
|
|
295
|
-
this.addSection_('MPEG-5 Part-2 LCEVC', docLink)
|
|
296
|
-
.addBoolInput_('Enabled', 'lcevc.enabled')
|
|
297
|
-
.addBoolInput_('LCEVC Dynamic Performance scaling',
|
|
298
|
-
'lcevc.dynamicPerformanceScaling')
|
|
299
|
-
.addNumberInput_('LCEVC Log Level', 'lcevc.logLevel')
|
|
300
|
-
.addBoolInput_('Draw LCEVC Logo', 'lcevc.drawLogo');
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/** @private */
|
|
304
|
-
addAdsSection_() {
|
|
305
|
-
const docLink = this.resolveExternLink_('.AdsConfiguration');
|
|
306
|
-
this.addSection_('Ads', docLink)
|
|
307
|
-
.addBoolInput_('Custom playhead tracker',
|
|
308
|
-
'ads.customPlayheadTracker');
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* @param {string} category
|
|
313
|
-
* @param {string} sectionName
|
|
314
|
-
* @private
|
|
315
|
-
*/
|
|
316
|
-
addRetrictionsSection_(category, sectionName) {
|
|
317
|
-
const prefix = (category ? category + '.' : '') + 'restrictions.';
|
|
318
|
-
const docLink = this.resolveExternLink_('.Restrictions');
|
|
319
|
-
this.addSection_(sectionName, docLink)
|
|
320
|
-
.addNumberInput_('Min Width', prefix + 'minWidth')
|
|
321
|
-
.addNumberInput_('Max Width', prefix + 'maxWidth')
|
|
322
|
-
.addNumberInput_('Min Height', prefix + 'minHeight')
|
|
323
|
-
.addNumberInput_('Max Height', prefix + 'maxHeight')
|
|
324
|
-
.addNumberInput_('Min Pixels', prefix + 'minPixels')
|
|
325
|
-
.addNumberInput_('Max Pixels', prefix + 'maxPixels')
|
|
326
|
-
.addNumberInput_('Min Framerate', prefix + 'minFrameRate')
|
|
327
|
-
.addNumberInput_('Max Framerate', prefix + 'maxFrameRate')
|
|
328
|
-
.addNumberInput_('Min Bandwidth', prefix + 'minBandwidth')
|
|
329
|
-
.addNumberInput_('Max Bandwidth', prefix + 'maxBandwidth');
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* @param {string} category
|
|
334
|
-
* @param {string} sectionName
|
|
335
|
-
* @private
|
|
336
|
-
*/
|
|
337
|
-
addRetrySection_(category, sectionName) {
|
|
338
|
-
const prefix = category + '.retryParameters.';
|
|
339
|
-
const docLink = this.resolveExternLink_('.RetryParameters');
|
|
340
|
-
this.addSection_(sectionName, docLink)
|
|
341
|
-
.addNumberInput_('Max Attempts', prefix + 'maxAttempts')
|
|
342
|
-
.addNumberInput_('Base Delay', prefix + 'baseDelay',
|
|
343
|
-
/* canBeDecimal= */ true)
|
|
344
|
-
.addNumberInput_('Backoff Factor', prefix + 'backoffFactor',
|
|
345
|
-
/* canBeDecimal= */ true)
|
|
346
|
-
.addNumberInput_('Fuzz Factor', prefix + 'fuzzFactor',
|
|
347
|
-
/* canBeDecimal= */ true)
|
|
348
|
-
.addNumberInput_('Timeout Factor', prefix + 'timeout',
|
|
349
|
-
/* canBeDecimal= */ true)
|
|
350
|
-
.addNumberInput_('Stall Timeout', prefix + 'stallTimeout',
|
|
351
|
-
/* canBeDecimal= */ true)
|
|
352
|
-
.addNumberInput_('Connection Timeout', prefix + 'connectionTimeout',
|
|
353
|
-
/* canBeDecimal= */ true);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/** @private */
|
|
357
|
-
addOfflineSection_() {
|
|
358
|
-
const docLink = this.resolveExternLink_('.OfflineConfiguration');
|
|
359
|
-
this.addSection_('Offline', docLink)
|
|
360
|
-
.addBoolInput_('Use Persistent Licenses',
|
|
361
|
-
'offline.usePersistentLicense')
|
|
362
|
-
.addNumberInput_('Number of Parallel Downloads',
|
|
363
|
-
'offline.numberOfParallelDownloads');
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/** @private */
|
|
367
|
-
addStreamingSection_() {
|
|
368
|
-
const docLink = this.resolveExternLink_('.StreamingConfiguration');
|
|
369
|
-
this.addSection_('Streaming', docLink)
|
|
370
|
-
.addNumberInput_('Gap detection threshold',
|
|
371
|
-
'streaming.gapDetectionThreshold',
|
|
372
|
-
/* canBeDecimal= */ true)
|
|
373
|
-
.addNumberInput_('Gap Jump Timer Time', 'streaming.gapJumpTimerTime',
|
|
374
|
-
/* canBeDecimal= */ true)
|
|
375
|
-
.addNumberInput_('Buffering Goal', 'streaming.bufferingGoal',
|
|
376
|
-
/* canBeDecimal= */ true)
|
|
377
|
-
.addNumberInput_('Duration Backoff', 'streaming.durationBackoff',
|
|
378
|
-
/* canBeDecimal= */ true)
|
|
379
|
-
.addNumberInput_('Rebuffering Goal', 'streaming.rebufferingGoal',
|
|
380
|
-
/* canBeDecimal= */ true)
|
|
381
|
-
.addNumberInput_('Buffer Behind', 'streaming.bufferBehind',
|
|
382
|
-
/* canBeDecimal= */ true)
|
|
383
|
-
.addNumberInput_('Safe Seek Offset', 'streaming.safeSeekOffset',
|
|
384
|
-
/* canBeDecimal= */ true)
|
|
385
|
-
.addNumberInput_('Stall Threshold', 'streaming.stallThreshold',
|
|
386
|
-
/* canBeDecimal= */ true)
|
|
387
|
-
.addNumberInput_('Safe Skip Distance', 'streaming.stallSkip',
|
|
388
|
-
/* canBeDecimal= */ true)
|
|
389
|
-
.addNumberInput_('Inaccurate Manifest Tolerance',
|
|
390
|
-
'streaming.inaccurateManifestTolerance',
|
|
391
|
-
/* canBeDecimal= */ true)
|
|
392
|
-
.addBoolInput_('Low Latency Mode', 'streaming.lowLatencyMode')
|
|
393
|
-
.addBoolInput_('Auto Low Latency Mode', 'streaming.autoLowLatencyMode')
|
|
394
|
-
.addBoolInput_('Force HTTPS', 'streaming.forceHTTPS')
|
|
395
|
-
.addBoolInput_('Prefer native HLS playback when available',
|
|
396
|
-
'streaming.preferNativeHls')
|
|
397
|
-
.addNumberInput_('Update interval seconds',
|
|
398
|
-
'streaming.updateIntervalSeconds',
|
|
399
|
-
/* canBeDecimal= */ true)
|
|
400
|
-
.addBoolInput_('Dispatch all emsg boxes',
|
|
401
|
-
'streaming.dispatchAllEmsgBoxes')
|
|
402
|
-
.addBoolInput_('Observe media quality changes',
|
|
403
|
-
'streaming.observeQualityChanges')
|
|
404
|
-
.addNumberInput_('Max Variant Disabled Time',
|
|
405
|
-
'streaming.maxDisabledTime')
|
|
406
|
-
.addBoolInput_('Parse PRFT box',
|
|
407
|
-
'streaming.parsePrftBox')
|
|
408
|
-
.addNumberInput_('Segment Prefetch Limit',
|
|
409
|
-
'streaming.segmentPrefetchLimit')
|
|
410
|
-
.addBoolInput_('Live Sync', 'streaming.liveSync')
|
|
411
|
-
.addNumberInput_('Max latency for live sync',
|
|
412
|
-
'streaming.liveSyncMaxLatency',
|
|
413
|
-
/* canBeDecimal= */ true,
|
|
414
|
-
/* canBeZero= */ true)
|
|
415
|
-
.addNumberInput_('Playback rate for live sync',
|
|
416
|
-
'streaming.liveSyncPlaybackRate',
|
|
417
|
-
/* canBeDecimal= */ true,
|
|
418
|
-
/* canBeZero= */ false)
|
|
419
|
-
.addNumberInput_('Min latency for live sync',
|
|
420
|
-
'streaming.liveSyncMinLatency',
|
|
421
|
-
/* canBeDecimal= */ true,
|
|
422
|
-
/* canBeZero= */ true)
|
|
423
|
-
.addNumberInput_('Min playback rate for live sync',
|
|
424
|
-
'streaming.liveSyncMinPlaybackRate',
|
|
425
|
-
/* canBeDecimal= */ true,
|
|
426
|
-
/* canBeZero= */ false);
|
|
427
|
-
|
|
428
|
-
if (!shakaDemoMain.getNativeControlsEnabled()) {
|
|
429
|
-
this.addBoolInput_('Always Stream Text', 'streaming.alwaysStreamText');
|
|
430
|
-
} else {
|
|
431
|
-
// Add a fake custom fixed "input" that warns the users not to change it.
|
|
432
|
-
const noop = (input) => {};
|
|
433
|
-
this.addCustomBoolInput_('Always Stream Text', noop,
|
|
434
|
-
'Text must always be streamed while native controls are enabled, ' +
|
|
435
|
-
'for captions to work.');
|
|
436
|
-
this.latestInput_.input().disabled = true;
|
|
437
|
-
this.latestInput_.input().checked = true;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
const hdrLevels = {
|
|
441
|
-
'': '',
|
|
442
|
-
'AUTO': 'AUTO',
|
|
443
|
-
'SDR': 'SDR',
|
|
444
|
-
'PQ': 'PQ',
|
|
445
|
-
'HLG': 'HLG',
|
|
446
|
-
};
|
|
447
|
-
const hdrLevelNames = {
|
|
448
|
-
'AUTO': 'Auto Detect',
|
|
449
|
-
'SDR': 'SDR',
|
|
450
|
-
'PQ': 'PQ',
|
|
451
|
-
'HLG': 'HLG',
|
|
452
|
-
'': 'No Preference',
|
|
453
|
-
};
|
|
454
|
-
this.addSelectInput_('Preferred HDR Level', 'preferredVideoHdrLevel',
|
|
455
|
-
hdrLevels, hdrLevelNames);
|
|
456
|
-
|
|
457
|
-
const videoLayouts = {
|
|
458
|
-
'': '',
|
|
459
|
-
'CH-STEREO': 'CH-STEREO',
|
|
460
|
-
'CH-MONO': 'CH-MONO',
|
|
461
|
-
};
|
|
462
|
-
const videoLayoutsNames = {
|
|
463
|
-
'CH-STEREO': 'Stereoscopic',
|
|
464
|
-
'CH-MONO': 'Monoscopic',
|
|
465
|
-
'': 'No Preference',
|
|
466
|
-
};
|
|
467
|
-
this.addSelectInput_('Preferred video layout', 'preferredVideoLayout',
|
|
468
|
-
videoLayouts, videoLayoutsNames);
|
|
469
|
-
|
|
470
|
-
this.addBoolInput_('Start At Segment Boundary',
|
|
471
|
-
'streaming.startAtSegmentBoundary')
|
|
472
|
-
.addBoolInput_('Ignore Text Stream Failures',
|
|
473
|
-
'streaming.ignoreTextStreamFailures')
|
|
474
|
-
.addBoolInput_('Stall Detector Enabled', 'streaming.stallEnabled')
|
|
475
|
-
.addBoolInput_('Use native HLS on Safari',
|
|
476
|
-
'streaming.useNativeHlsOnSafari');
|
|
477
|
-
this.addRetrySection_('streaming', 'Streaming Retry Parameters');
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/** @private */
|
|
481
|
-
addMediaSourceSection_() {
|
|
482
|
-
const strategyOptions = shaka.config.CodecSwitchingStrategy;
|
|
483
|
-
const strategyOptionsNames = {
|
|
484
|
-
'RELOAD': 'reload',
|
|
485
|
-
'SMOOTH': 'smooth',
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
const docLink = this.resolveExternLink_('.MediaSourceConfiguration');
|
|
489
|
-
this.addSection_('Media source', docLink)
|
|
490
|
-
.addTextInput_('Source buffer extra features',
|
|
491
|
-
'mediaSource.sourceBufferExtraFeatures')
|
|
492
|
-
.addBoolInput_('Force Transmux', 'mediaSource.forceTransmux')
|
|
493
|
-
.addBoolInput_('Insert fake encryption in init segments when needed ' +
|
|
494
|
-
'by the platform.', 'mediaSource.insertFakeEncryptionInInit')
|
|
495
|
-
.addSelectInput_(
|
|
496
|
-
'Codec Switching Strategy',
|
|
497
|
-
'mediaSource.codecSwitchingStrategy',
|
|
498
|
-
strategyOptions,
|
|
499
|
-
strategyOptionsNames);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/** @private */
|
|
503
|
-
addLanguageSection_() {
|
|
504
|
-
const docLink = this.resolveExternLink_('.PlayerConfiguration');
|
|
505
|
-
|
|
506
|
-
const autoShowTextOptions = shaka.config.AutoShowText;
|
|
507
|
-
const autoShowTextOptionNames = {
|
|
508
|
-
'NEVER': 'Never',
|
|
509
|
-
'ALWAYS': 'Always',
|
|
510
|
-
'IF_PREFERRED_TEXT_LANGUAGE': 'If preferred text language',
|
|
511
|
-
'IF_SUBTITLES_MAY_BE_NEEDED': 'If subtitles may be needed',
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
this.addSection_('Language', docLink)
|
|
515
|
-
.addTextInput_('Preferred Audio Language', 'preferredAudioLanguage')
|
|
516
|
-
.addTextInput_('Preferred Audio Label', 'preferredAudioLabel')
|
|
517
|
-
.addTextInput_('Preferred Variant Role', 'preferredVariantRole')
|
|
518
|
-
.addTextInput_('Preferred Text Language', 'preferredTextLanguage')
|
|
519
|
-
.addTextInput_('Preferred Text Role', 'preferredTextRole')
|
|
520
|
-
.addSelectInput_('Auto-Show Text',
|
|
521
|
-
'autoShowText',
|
|
522
|
-
autoShowTextOptions,
|
|
523
|
-
autoShowTextOptionNames);
|
|
524
|
-
const onChange = (input) => {
|
|
525
|
-
shakaDemoMain.setUILocale(input.value);
|
|
526
|
-
shakaDemoMain.remakeHash();
|
|
527
|
-
};
|
|
528
|
-
this.addCustomTextInput_('Preferred UI Locale', onChange);
|
|
529
|
-
this.latestInput_.input().value = shakaDemoMain.getUILocale();
|
|
530
|
-
this.addNumberInput_('Preferred Audio Channel Count',
|
|
531
|
-
'preferredAudioChannelCount');
|
|
532
|
-
this.addBoolInput_('Prefer Forced Subs', 'preferForcedSubs');
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/** @private */
|
|
536
|
-
addMetaSection_() {
|
|
537
|
-
this.addSection_(/* name= */ null, /* docLink= */ null);
|
|
538
|
-
|
|
539
|
-
this.addCustomBoolInput_('Shaka Controls', (input) => {
|
|
540
|
-
shakaDemoMain.setNativeControlsEnabled(!input.checked);
|
|
541
|
-
if (input.checked) {
|
|
542
|
-
// Forcibly set |streaming.alwaysStreamText| to true.
|
|
543
|
-
shakaDemoMain.configure('streaming.alwaysStreamText', true);
|
|
544
|
-
shakaDemoMain.remakeHash();
|
|
545
|
-
}
|
|
546
|
-
// Enabling/disabling Shaka Controls will change how other controls in
|
|
547
|
-
// the config work, so reload the page.
|
|
548
|
-
this.reloadAndSaveState_();
|
|
549
|
-
});
|
|
550
|
-
// TODO: Re-add the tooltipMessage of 'Takes effect next load.' once we
|
|
551
|
-
// are ready to add ALL of the tooltip messages.
|
|
552
|
-
if (!shakaDemoMain.getNativeControlsEnabled()) {
|
|
553
|
-
this.latestInput_.input().checked = true;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
if (!shakaDemoMain.getNativeControlsEnabled()) {
|
|
557
|
-
this.addCustomBoolInput_('Enabled Trick Play Controls', (input) => {
|
|
558
|
-
shakaDemoMain.setTrickPlayControlsEnabled(input.checked);
|
|
559
|
-
});
|
|
560
|
-
if (shakaDemoMain.getTrickPlayControlsEnabled()) {
|
|
561
|
-
this.latestInput_.input().checked = true;
|
|
562
|
-
}
|
|
563
|
-
} else {
|
|
564
|
-
// Add a fake custom fixed "input" that warns the users not to change it.
|
|
565
|
-
const noop = (input) => {};
|
|
566
|
-
this.addCustomBoolInput_('Enabled Trick Play Controls',
|
|
567
|
-
noop, 'Trick Play controls require the Shaka UI.');
|
|
568
|
-
this.latestInput_.input().disabled = true;
|
|
569
|
-
this.latestInput_.input().checked = false;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
// shaka.log is not set if logging isn't enabled.
|
|
573
|
-
// I.E. if using the release version of shaka.
|
|
574
|
-
if (!shaka['log']) {
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
// Access shaka.log using bracket syntax because shaka.log is not exported.
|
|
579
|
-
// Exporting the logging methods proved to be a bad solution, both in terms
|
|
580
|
-
// of difficulty and in terms of what changes it would require of the
|
|
581
|
-
// architectural design of Shaka Player, so this non-type-safe solution is
|
|
582
|
-
// the best remaining way to get the Closure compiler to compile this
|
|
583
|
-
// method.
|
|
584
|
-
const Level = shaka['log']['Level'];
|
|
585
|
-
const setLevel = shaka['log']['setLevel'];
|
|
586
|
-
|
|
587
|
-
const logLevels = {
|
|
588
|
-
'info': 'Info',
|
|
589
|
-
'debug': 'Debug',
|
|
590
|
-
'v': 'Verbose',
|
|
591
|
-
'vv': 'Very Verbose',
|
|
592
|
-
};
|
|
593
|
-
const onChange = (input) => {
|
|
594
|
-
switch (input.value) {
|
|
595
|
-
case 'info':
|
|
596
|
-
setLevel(Level['INFO']);
|
|
597
|
-
break;
|
|
598
|
-
case 'debug':
|
|
599
|
-
setLevel(Level['DEBUG']);
|
|
600
|
-
break;
|
|
601
|
-
case 'vv':
|
|
602
|
-
setLevel(Level['V2']);
|
|
603
|
-
break;
|
|
604
|
-
case 'v':
|
|
605
|
-
setLevel(Level['V1']);
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
shakaDemoMain.remakeHash();
|
|
609
|
-
};
|
|
610
|
-
this.addCustomSelectInput_('Log Level', logLevels, onChange);
|
|
611
|
-
const input = this.latestInput_.input();
|
|
612
|
-
switch (shaka['log']['currentLevel']) {
|
|
613
|
-
case Level['DEBUG']:
|
|
614
|
-
input.value = 'debug';
|
|
615
|
-
break;
|
|
616
|
-
case Level['V2']:
|
|
617
|
-
input.value = 'vv';
|
|
618
|
-
break;
|
|
619
|
-
case Level['V1']:
|
|
620
|
-
input.value = 'v';
|
|
621
|
-
break;
|
|
622
|
-
default:
|
|
623
|
-
input.value = 'info';
|
|
624
|
-
break;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* @param {string} suffix
|
|
630
|
-
* @return {string}
|
|
631
|
-
* @private
|
|
632
|
-
*/
|
|
633
|
-
resolveExternLink_(suffix) {
|
|
634
|
-
return '../docs/api/shaka.extern.html#' + suffix;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* @param {?string} name
|
|
639
|
-
* @param {?string} docLink
|
|
640
|
-
* @return {!shakaDemo.Config}
|
|
641
|
-
* @private
|
|
642
|
-
*/
|
|
643
|
-
addSection_(name, docLink) {
|
|
644
|
-
const style = name ?
|
|
645
|
-
shakaDemo.InputContainer.Style.ACCORDION :
|
|
646
|
-
shakaDemo.InputContainer.Style.VERTICAL;
|
|
647
|
-
this.sections_.push(new shakaDemo.InputContainer(
|
|
648
|
-
this.container_, name, style, docLink));
|
|
649
|
-
|
|
650
|
-
return this;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @param {string} name
|
|
655
|
-
* @param {string} valueName
|
|
656
|
-
* @param {string=} tooltipMessage
|
|
657
|
-
* @return {!shakaDemo.Config}
|
|
658
|
-
* @private
|
|
659
|
-
*/
|
|
660
|
-
addBoolInput_(name, valueName, tooltipMessage) {
|
|
661
|
-
const onChange = (input) => {
|
|
662
|
-
shakaDemoMain.configure(valueName, input.checked);
|
|
663
|
-
shakaDemoMain.remakeHash();
|
|
664
|
-
};
|
|
665
|
-
this.addCustomBoolInput_(name, onChange, tooltipMessage);
|
|
666
|
-
if (shakaDemoMain.getCurrentConfigValue(valueName)) {
|
|
667
|
-
this.latestInput_.input().checked = true;
|
|
668
|
-
}
|
|
669
|
-
return this;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* @param {string} name
|
|
674
|
-
* @param {function(!HTMLInputElement)} onChange
|
|
675
|
-
* @param {string=} tooltipMessage
|
|
676
|
-
* @return {!shakaDemo.Config}
|
|
677
|
-
* @private
|
|
678
|
-
*/
|
|
679
|
-
addCustomBoolInput_(name, onChange, tooltipMessage) {
|
|
680
|
-
this.createRow_(name, tooltipMessage);
|
|
681
|
-
this.latestInput_ = new shakaDemo.BoolInput(
|
|
682
|
-
this.getLatestSection_(), name, onChange);
|
|
683
|
-
return this;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* @param {!string} name
|
|
688
|
-
* @param {string} valueName
|
|
689
|
-
* @param {string=} tooltipMessage
|
|
690
|
-
* @return {!shakaDemo.Config}
|
|
691
|
-
* @private
|
|
692
|
-
*/
|
|
693
|
-
addTextInput_(name, valueName, tooltipMessage) {
|
|
694
|
-
const onChange = (input) => {
|
|
695
|
-
shakaDemoMain.configure(valueName, input.value);
|
|
696
|
-
shakaDemoMain.remakeHash();
|
|
697
|
-
};
|
|
698
|
-
this.addCustomTextInput_(name, onChange, tooltipMessage);
|
|
699
|
-
this.latestInput_.input().value =
|
|
700
|
-
shakaDemoMain.getCurrentConfigValue(valueName);
|
|
701
|
-
return this;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* @param {string} name
|
|
706
|
-
* @param {function(!HTMLInputElement)} onChange
|
|
707
|
-
* @param {string=} tooltipMessage
|
|
708
|
-
* @return {!shakaDemo.Config}
|
|
709
|
-
* @private
|
|
710
|
-
*/
|
|
711
|
-
addCustomTextInput_(name, onChange, tooltipMessage) {
|
|
712
|
-
this.createRow_(name, tooltipMessage);
|
|
713
|
-
this.latestInput_ = new shakaDemo.TextInput(
|
|
714
|
-
this.getLatestSection_(), name, onChange);
|
|
715
|
-
return this;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* @param {string} name
|
|
720
|
-
* @param {string} valueName
|
|
721
|
-
* @param {boolean=} canBeDecimal
|
|
722
|
-
* @param {boolean=} canBeZero
|
|
723
|
-
* @param {boolean=} canBeUnset
|
|
724
|
-
* @param {string=} tooltipMessage
|
|
725
|
-
* @return {!shakaDemo.Config}
|
|
726
|
-
* @private
|
|
727
|
-
*/
|
|
728
|
-
addNumberInput_(name, valueName, canBeDecimal = false, canBeZero = true,
|
|
729
|
-
canBeUnset = false, tooltipMessage) {
|
|
730
|
-
const onChange = (input) => {
|
|
731
|
-
shakaDemoMain.resetConfiguration(valueName);
|
|
732
|
-
shakaDemoMain.remakeHash();
|
|
733
|
-
if (input.value == 'Infinity') {
|
|
734
|
-
shakaDemoMain.configure(valueName, Infinity);
|
|
735
|
-
shakaDemoMain.remakeHash();
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
if (input.value == '' && canBeUnset) {
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
const valueAsNumber = Number(input.value);
|
|
742
|
-
if (valueAsNumber == 0 && !canBeZero) {
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
if (!isNaN(valueAsNumber)) {
|
|
746
|
-
if (Math.floor(valueAsNumber) != valueAsNumber && !canBeDecimal) {
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
shakaDemoMain.configure(valueName, valueAsNumber);
|
|
750
|
-
shakaDemoMain.remakeHash();
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
|
-
this.createRow_(name, tooltipMessage);
|
|
754
|
-
this.latestInput_ = new shakaDemo.NumberInput(
|
|
755
|
-
this.getLatestSection_(), name, onChange, canBeDecimal, canBeZero,
|
|
756
|
-
canBeUnset);
|
|
757
|
-
this.latestInput_.input().value =
|
|
758
|
-
shakaDemoMain.getCurrentConfigValue(valueName);
|
|
759
|
-
if (isNaN(Number(this.latestInput_.input().value)) && canBeUnset) {
|
|
760
|
-
this.latestInput_.input().value = '';
|
|
761
|
-
}
|
|
762
|
-
return this;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* @param {string} name
|
|
767
|
-
* @param {!Array.<string>} values
|
|
768
|
-
* @param {function(!HTMLInputElement)} onChange
|
|
769
|
-
* @param {string=} tooltipMessage
|
|
770
|
-
* @return {!shakaDemo.Config}
|
|
771
|
-
* @private
|
|
772
|
-
*/
|
|
773
|
-
addDatalistInput_(name, values, onChange, tooltipMessage) {
|
|
774
|
-
this.createRow_(name, tooltipMessage);
|
|
775
|
-
this.latestInput_ = new shakaDemo.DatalistInput(
|
|
776
|
-
this.getLatestSection_(), name, onChange, values);
|
|
777
|
-
return this;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* @param {string} name
|
|
782
|
-
* @param {!Object.<string, string>} values
|
|
783
|
-
* @param {function(!HTMLInputElement)} onChange
|
|
784
|
-
* @param {string=} tooltipMessage
|
|
785
|
-
* @return {!shakaDemo.Config}
|
|
786
|
-
* @private
|
|
787
|
-
*/
|
|
788
|
-
addCustomSelectInput_(name, values, onChange, tooltipMessage) {
|
|
789
|
-
this.createRow_(name, tooltipMessage);
|
|
790
|
-
// The input is not provided a name, as (in this enclosed space) it makes
|
|
791
|
-
// the actual field unreadable.
|
|
792
|
-
this.latestInput_ = new shakaDemo.SelectInput(
|
|
793
|
-
this.getLatestSection_(), null, onChange, values);
|
|
794
|
-
return this;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* @param {string} name
|
|
799
|
-
* @param {string} valueName
|
|
800
|
-
* @param {!Object.<string, ?>} options
|
|
801
|
-
* @param {!Object.<string, string>} optionNames
|
|
802
|
-
* @param {string=} tooltipMessage
|
|
803
|
-
* @return {!shakaDemo.Config}
|
|
804
|
-
* @private
|
|
805
|
-
*/
|
|
806
|
-
addSelectInput_(name, valueName, options, optionNames, tooltipMessage) {
|
|
807
|
-
const onChange = (input) => {
|
|
808
|
-
shakaDemoMain.configure(valueName, options[input.value]);
|
|
809
|
-
shakaDemoMain.remakeHash();
|
|
810
|
-
};
|
|
811
|
-
|
|
812
|
-
// If there are any translations missing for option names, fill in the
|
|
813
|
-
// constant from the enum. This ensures new enum values are usable in the
|
|
814
|
-
// demo in some form, even if they are forgotten in the demo config.
|
|
815
|
-
for (const key in options) {
|
|
816
|
-
if (!(key in optionNames)) {
|
|
817
|
-
optionNames[key] = key;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
this.addCustomSelectInput_(name, optionNames, onChange, tooltipMessage);
|
|
822
|
-
|
|
823
|
-
const initialValue = shakaDemoMain.getCurrentConfigValue(valueName);
|
|
824
|
-
for (const key in options) {
|
|
825
|
-
if (options[key] == initialValue) {
|
|
826
|
-
this.latestInput_.input().value = key;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
return this;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* @param {string} name
|
|
835
|
-
* @param {string=} tooltipMessage
|
|
836
|
-
* @private
|
|
837
|
-
*/
|
|
838
|
-
createRow_(name, tooltipMessage) {
|
|
839
|
-
this.getLatestSection_().addRow(name, tooltipMessage || null);
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Gets the latest section. Results in a failed assert if there is no latest
|
|
844
|
-
* section.
|
|
845
|
-
* @return {!shakaDemo.InputContainer}
|
|
846
|
-
* @private
|
|
847
|
-
*/
|
|
848
|
-
getLatestSection_() {
|
|
849
|
-
goog.asserts.assert(this.sections_.length > 0,
|
|
850
|
-
'Must have at least one section.');
|
|
851
|
-
return this.sections_[this.sections_.length - 1];
|
|
852
|
-
}
|
|
853
|
-
};
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
document.addEventListener('shaka-main-loaded', shakaDemo.Config.init);
|
|
857
|
-
document.addEventListener('shaka-main-cleanup', () => {
|
|
858
|
-
shakaDemoConfig = null;
|
|
859
|
-
});
|