shaka-player 4.6.3 → 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 +13 -9
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.d.ts +47 -4
- package/dist/shaka-player.compiled.debug.d.ts +47 -4
- package/dist/shaka-player.compiled.debug.externs.js +50 -2
- package/dist/shaka-player.compiled.debug.js +408 -376
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +50 -2
- package/dist/shaka-player.compiled.js +1134 -1118
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +69 -5
- package/dist/shaka-player.ui.debug.d.ts +69 -5
- package/dist/shaka-player.ui.debug.externs.js +82 -2
- package/dist/shaka-player.ui.debug.js +457 -420
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +82 -2
- package/dist/shaka-player.ui.js +1305 -1289
- 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/ads/client_side_ad_manager.js +4 -0
- package/lib/ads/media_tailor_ad_manager.js +5 -0
- package/lib/ads/server_side_ad_manager.js +4 -0
- 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/hls/hls_parser.js +17 -5
- package/lib/media/adaptation_set_criteria.js +76 -10
- package/lib/media/drm_engine.js +0 -3
- package/lib/media/media_source_engine.js +42 -18
- package/lib/media/segment_reference.js +12 -0
- package/lib/media/streaming_engine.js +58 -5
- package/lib/media/video_wrapper.js +4 -3
- package/lib/player.js +95 -11
- package/lib/text/simple_text_displayer.js +8 -7
- package/lib/text/text_utils.js +39 -13
- package/lib/text/ui_text_displayer.js +20 -11
- package/lib/text/web_vtt_generator.js +1 -1
- 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 -5764
- 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 -511
- package/demo/common/assets.js +0 -1635
- 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 -230
- 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 -2778
- 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 -434
- 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
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Generate png with: dot -Tpng -O after.gv
|
|
2
|
-
digraph storage_after {
|
|
3
|
-
subgraph cluster_0 {
|
|
4
|
-
label="Shaka Player";
|
|
5
|
-
parse[label="Download and parse manifest (parseManifest)"];
|
|
6
|
-
drm[label="Make DRM engine and load keys (createDrmEngine)"]
|
|
7
|
-
filter[label="Filter manifest (filterManifest_)"];
|
|
8
|
-
segments[label="Download segments (downloadSegments_)"];
|
|
9
|
-
store[label="Store manifest (cell.addManifests)"];
|
|
10
|
-
parse -> drm;
|
|
11
|
-
drm -> filter;
|
|
12
|
-
filter -> store;
|
|
13
|
-
store -> segments[label="BG Fetch Not Available"];
|
|
14
|
-
}
|
|
15
|
-
subgraph cluster_1 {
|
|
16
|
-
label="Service Worker";
|
|
17
|
-
bgSegments[label="Download segments in background (backgroundFetch.fetch)"]
|
|
18
|
-
store -> bgSegments[label="BG Fetch Available"];
|
|
19
|
-
}
|
|
20
|
-
subgraph cluster_2 {
|
|
21
|
-
label="Shaka Player Static Methods";
|
|
22
|
-
storeSeg[label="Store segments one-by-one (assignStreamToManifest)"]
|
|
23
|
-
remove[label="Clean up (cleanStoredManifest)"];
|
|
24
|
-
segments -> remove[label="On Fail"];
|
|
25
|
-
segments -> storeSeg;
|
|
26
|
-
bgSegments -> storeSeg;
|
|
27
|
-
bgSegments -> remove[label="On Fail"];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Generate png with: dot -Tpng -O before.gv
|
|
2
|
-
digraph storage_before {
|
|
3
|
-
subgraph cluster_0 {
|
|
4
|
-
label="Shaka Player";
|
|
5
|
-
parse[label="Download and parse manifest (parseManifest)"];
|
|
6
|
-
drm[label="Make DRM engine and load keys (createDrmEngine)"]
|
|
7
|
-
filter[label="Filter manifest (filterManifest_)"];
|
|
8
|
-
segments[label="Download and store segments (downloadManifest_)"];
|
|
9
|
-
store[label="Store manifest (cell.addManifests)"];
|
|
10
|
-
remove[label="Clean up (cell.removeSegments)"];
|
|
11
|
-
parse -> drm;
|
|
12
|
-
drm -> filter;
|
|
13
|
-
filter -> segments;
|
|
14
|
-
segments -> store;
|
|
15
|
-
segments -> remove[label="On Fail"];
|
|
16
|
-
store -> remove[label="On Fail"];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
Binary file
|
package/docs/design/bg-fetch.md
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# Shaka Player Background Fetch Support
|
|
2
|
-
|
|
3
|
-
last update: 2021-7-12
|
|
4
|
-
|
|
5
|
-
by: [theodab@google.com](mailto:theodab@google.com)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
The feature of background fetch has been in Shaka Player’s backlog [since 2017].
|
|
11
|
-
At the time it was added to the backlog, the feature was not quite ready for
|
|
12
|
-
use. Since then, it has matured, and now is something we could feasibly use, but
|
|
13
|
-
it has still been a low-priority feature.
|
|
14
|
-
|
|
15
|
-
[since 2017]: https://github.com/shaka-project/shaka-player/issues/879
|
|
16
|
-
|
|
17
|
-
## Design Concept
|
|
18
|
-
|
|
19
|
-
This design attempts to reuse existing code whenever possible, in order to
|
|
20
|
-
minimize the amount of new code that has to be tested. The code will be made in
|
|
21
|
-
two main stages:
|
|
22
|
-
1. Refactor the offline download process to change the order that the asset is
|
|
23
|
-
downloaded. The manifest should be downloaded and stored first, and then every
|
|
24
|
-
segment should be downloaded. As a segment is downloaded, it should be stored.
|
|
25
|
-
The code for storing a segment, in particular, should be broken out into an
|
|
26
|
-
exported static (e.g. stateless) function.
|
|
27
|
-
1. Modify the Shaka Player wrapper to add the appropriate background fetch event
|
|
28
|
-
listeners if the environment is detected to be a service worker, so that a
|
|
29
|
-
compiled Shaka Player bundle can be used as a service worker. If background
|
|
30
|
-
fetch is used, the segment downloading step should be passed to this service
|
|
31
|
-
worker. When each segment is downloaded, it should be passed to the static
|
|
32
|
-
storage functions added in stage 1.
|
|
33
|
-
|
|
34
|
-
By restructuring the offline storage code in this way, switching between
|
|
35
|
-
foreground and background fetch will just be a matter of calling a different
|
|
36
|
-
segment-downloading function. In addition, it is possible that, in the future, a
|
|
37
|
-
plugin interface could be made for this. That probably won’t be necessary unless
|
|
38
|
-
another browser makes a competing API for downloading in the background (which
|
|
39
|
-
is admittedly a possibility, as background fetch [is not yet a W3C standard]).
|
|
40
|
-
|
|
41
|
-
[is not yet a W3C standard]: https://wicg.github.io/background-fetch/
|
|
42
|
-
|
|
43
|
-
### Storage System Process: Before
|
|
44
|
-
|
|
45
|
-

|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Storage System Process: After
|
|
49
|
-
|
|
50
|
-

|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Implementation
|
|
54
|
-
|
|
55
|
-
### Changes to shaka.offline.Storage
|
|
56
|
-
|
|
57
|
-
1. Change createOfflineManifest_ to leave the storage indexes on the segments
|
|
58
|
-
null at first. With this change, downloadManifest_ will now only be downloading
|
|
59
|
-
the encryption keys (which cannot be downloaded via background fetch, as they
|
|
60
|
-
require request bodies).
|
|
61
|
-
1. Create a new step within store_, after the manifest is stored, called
|
|
62
|
-
“downloadSegments_” that makes a Set of SegmentReference objects that need to be
|
|
63
|
-
downloaded.
|
|
64
|
-
1. We use SegmentReference objects in order to contain the URI, startByte,
|
|
65
|
-
and endByte.
|
|
66
|
-
1. This change also means we will no longer need an internal cache for
|
|
67
|
-
downloaded segments, as they will be deduplicated by the use of a Set.
|
|
68
|
-
1. If background fetch is not available, downloadSegments_ will simply download
|
|
69
|
-
the segments from this set as before, and then once they are all downloaded,
|
|
70
|
-
pass them all to assignStreamsToManifest.
|
|
71
|
-
1. If background fetch is available, this set will be turned into an array,
|
|
72
|
-
Request objects should be made for the individual uris (with appropriate headers
|
|
73
|
-
applied), and then that array will be passed to the service worker with a
|
|
74
|
-
background fetch call. The service worker will then, after everything is
|
|
75
|
-
downloaded and stored, call assignStreamsToManifest. An estimate of the total
|
|
76
|
-
download size will need to be computed here, and padded to avoid premature
|
|
77
|
-
cancellation for inaccurate manifests.
|
|
78
|
-
1. Create a new public static method, assignStreamToManifest. This is a static
|
|
79
|
-
method that requires no internal state, so that the service worker can call it.
|
|
80
|
-
It stores the data provided, loads the manifest from storage, applies the
|
|
81
|
-
storage id of the data to the appropriate segments (based on uri), and then
|
|
82
|
-
stores the modified manifest. It should have a mutex over the part that loads
|
|
83
|
-
and changes the manifest, to keep one invocation from overriding the manifest
|
|
84
|
-
changes of another. It should have the following parameters:
|
|
85
|
-
1. manifestStorageId
|
|
86
|
-
1. uri
|
|
87
|
-
1. data
|
|
88
|
-
1. throwIfAbortedFn
|
|
89
|
-
1. Create a second public static method, cleanStoredManifest. This method is
|
|
90
|
-
meant to be called by the service worker in the instance of the fetch operation
|
|
91
|
-
being aborted, and will simply clear the manifest away. It will also clear any
|
|
92
|
-
segments that have been stored already. This also means we will no longer need
|
|
93
|
-
the segmentsFromStore_ array, which we had previously been using to un-store
|
|
94
|
-
after canceled or failed downloads. It should have the following parameters:
|
|
95
|
-
1. manifestStorageId
|
|
96
|
-
1. When filling out shaka.extern.StoredContent entries for the list() method,
|
|
97
|
-
the storage system should be sure to set the offlineUri field to null if the
|
|
98
|
-
manifest is still “isIncomplete”, to mark that the asset has not yet finished
|
|
99
|
-
downloading. This will help developers detect that an asset is mid-download on
|
|
100
|
-
page load, so that they can set up progress indicators if they so wish.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### Service Worker Design
|
|
104
|
-
|
|
105
|
-
1. This code should go in, or at least be loaded in, the wrapper code. This will
|
|
106
|
-
let us access Shaka Player methods inside the service worker, without having to
|
|
107
|
-
coordinate how to load a compiled Shaka Player bundle from a service worker;
|
|
108
|
-
the user can simply load a Shaka Player bundle as a service worker.
|
|
109
|
-
1. When the background fetch message is called (see [the documentation]), the
|
|
110
|
-
“id” field should be set to the storage id of the manifest, with an added prefix
|
|
111
|
-
of “Shaka-”. The API does not provide any field for custom data, but this value
|
|
112
|
-
still needs to be provided to the service worker somehow. Luckily, this is the
|
|
113
|
-
only extra data the service worker needs, so it can just be the id of the fetch
|
|
114
|
-
operation.
|
|
115
|
-
1. When handling background fetch-related events, we can simply ignore any
|
|
116
|
-
event that does not start with the prefix. This will help prevent any
|
|
117
|
-
contamination with other service worker code from the developer.
|
|
118
|
-
1. As each segment is downloaded, the assignStreamToManifest method should be
|
|
119
|
-
called to store that data in the manifest.
|
|
120
|
-
1. If the download is canceled, call the cleanStoredManifest method, so that the
|
|
121
|
-
player doesn’t pollute indexedDb with unused segment data.
|
|
122
|
-
1. As a service worker is essentially just a collection of event listeners, one
|
|
123
|
-
can theoretically listen to the same event multiple times. This is relevant
|
|
124
|
-
because [a given scope] can only have a single service worker, so our service
|
|
125
|
-
worker code will have to be something that other people can load into their
|
|
126
|
-
existing service workers, if they have any.
|
|
127
|
-
1. Our system should use the message event to pass a specific identifying
|
|
128
|
-
message to the service worker, and the service worker will be expected to
|
|
129
|
-
respond with a specific response message. This way, we won’t mistake an
|
|
130
|
-
unrelated service worker for our own.
|
|
131
|
-
1. This message can also be used to make sure the versions are the same.
|
|
132
|
-
|
|
133
|
-
[the documentation]: https://developers.google.com/web/updates/2018/12/background-fetch#starting_a_background_fetch
|
|
134
|
-
[a given scope]: https://developers.google.com/web/fundamentals/primers/service-workers#register_a_service_worker
|
package/docs/design/cast.gv
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Generate png with: dot -Tpng -O cast.gv
|
|
2
|
-
|
|
3
|
-
digraph shaka2_cast {
|
|
4
|
-
label=<<u>Shaka 2 Cast Diagram</u>>
|
|
5
|
-
labelloc=t
|
|
6
|
-
node [ shape=rectangle ]
|
|
7
|
-
edge [ fontsize=10 ]
|
|
8
|
-
|
|
9
|
-
# Video tags are part of the local browser and remote Cast device
|
|
10
|
-
"local <video>" [ shape=oval ]
|
|
11
|
-
"remote <video>" [ shape=oval ]
|
|
12
|
-
|
|
13
|
-
# Controls are provided by the app
|
|
14
|
-
"video controls" [ shape=polygon ]
|
|
15
|
-
|
|
16
|
-
# The CastProxy class creates proxies for both Player and video tag
|
|
17
|
-
CastProxy -> "proxy Player" [ label=".getPlayer() " ]
|
|
18
|
-
CastProxy -> "proxy <video>" [ label=".getVideo() " ]
|
|
19
|
-
|
|
20
|
-
# Each Player owns its respective video tag
|
|
21
|
-
"local Player" -> "local <video>"
|
|
22
|
-
"remote Player" -> "remote <video>"
|
|
23
|
-
|
|
24
|
-
# The proxies forward/delegate to the correct instance based on casting state
|
|
25
|
-
"proxy Player" -> "local Player" [ style=dotted label="delegate" dir=both ]
|
|
26
|
-
"proxy Player" -> "remote Player" [ style=dotted label="delegate" dir=both ]
|
|
27
|
-
"proxy <video>" -> "local <video>" [ style=dotted label="delegate" dir=both ]
|
|
28
|
-
"proxy <video>" -> "remote <video>" [ style=dotted label="delegate" dir=both ]
|
|
29
|
-
|
|
30
|
-
# The app's controls go through the proxy and don't worry about cast state
|
|
31
|
-
"video controls" -> "proxy Player" [ label=".configure()\n.load()\nevents" dir=both ]
|
|
32
|
-
"video controls" -> "proxy <video>" [ label=".play()\n.pause()\n.currentTime\nevents" dir=both ]
|
|
33
|
-
# The app asks the proxy to cast
|
|
34
|
-
"video controls" -> CastProxy [ label=".cast()" ]
|
|
35
|
-
}
|
package/docs/design/cast.gv.png
DELETED
|
Binary file
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Shaka Player v2 Chromecast Design
|
|
2
|
-
|
|
3
|
-
last update: 2016-05-07
|
|
4
|
-
|
|
5
|
-
by: [joeyparrish@google.com](mailto:joeyparrish@google.com)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Shaka Player v2 will support Chromecast in the library for both sender and
|
|
11
|
-
receiver. This is in contrast to v1, where we demonstrated cast sending and
|
|
12
|
-
receiving in the demo app, but provided no direct Chromecast support in the
|
|
13
|
-
library.
|
|
14
|
-
|
|
15
|
-
Senders will use a `shaka.cast.CastProxy` object which wraps both `shaka.Player`
|
|
16
|
-
and `HTMLMediaElement`. The proxy will delegate to either local or remote
|
|
17
|
-
objects based on the current cast state. Senders must also load the Cast Sender
|
|
18
|
-
API JavaScript library in addition to Shaka. Applications can be quickly
|
|
19
|
-
modified to use a `CastProxy` without changing their use of `Player` and
|
|
20
|
-
`HTMLMediaElement` APIs.
|
|
21
|
-
|
|
22
|
-
Receivers will use a `shaka.cast.CastReceiver` object which wraps both
|
|
23
|
-
`shaka.Player` and `HTMLMediaElement` on the Chromecast. The `CastReceiver`
|
|
24
|
-
will receive commands from the sender and update the sender with the status of
|
|
25
|
-
the `Player` and `HTMLMediaElement` objects. Receiver apps only have to worry
|
|
26
|
-
about their UI, while the `CastReceiver` takes care of playback and
|
|
27
|
-
communication.
|
|
28
|
-
|
|
29
|
-
To enable an Android (TV) receiver apps set `androidReceiverCompatible` to true.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
#### `CastProxy` API sketch
|
|
33
|
-
|
|
34
|
-
```js
|
|
35
|
-
new shaka.cast.CastProxy(video, player, receiverAppId, androidReceiverCompatible)
|
|
36
|
-
|
|
37
|
-
// Also destroys the underlying local Player object
|
|
38
|
-
shaka.cast.CastProxy.prototype.destroy() => Promise
|
|
39
|
-
|
|
40
|
-
// Looks like shaka.Player, proxies to local or remote player based on cast
|
|
41
|
-
// state
|
|
42
|
-
shaka.cast.CastProxy.prototype.getPlayer() => shaka.Player
|
|
43
|
-
|
|
44
|
-
// Looks like HTMLMediaElement, proxies to local or remote video based on cast
|
|
45
|
-
// state
|
|
46
|
-
shaka.cast.CastProxy.prototype.getVideo() => HTMLMediaElement
|
|
47
|
-
|
|
48
|
-
// True if there are cast receivers available
|
|
49
|
-
shaka.cast.CastProxy.prototype.canCast() => boolean
|
|
50
|
-
|
|
51
|
-
// True if we are currently casting
|
|
52
|
-
shaka.cast.CastProxy.prototype.isCasting() => boolean
|
|
53
|
-
|
|
54
|
-
// Fired when either canCast or isCasting changes
|
|
55
|
-
shaka.cast.CastProxy.CastStatusChangedEvent
|
|
56
|
-
|
|
57
|
-
// Resolved when connected to a receiver, rejected if the connection fails
|
|
58
|
-
shaka.cast.CastProxy.prototype.cast() => Promise
|
|
59
|
-
|
|
60
|
-
// Transmits application-specific data to the receiver (now or on later connect)
|
|
61
|
-
shaka.cast.CastProxy.prototype.setAppData(appData)
|
|
62
|
-
|
|
63
|
-
// Disconnect from the receiver
|
|
64
|
-
shaka.cast.CastProxy.prototype.disconnect()
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
#### `CastReceiver` API sketch
|
|
69
|
-
|
|
70
|
-
```js
|
|
71
|
-
new shaka.cast.CastReceiver(video, player, appDataCallback)
|
|
72
|
-
|
|
73
|
-
// True if there are cast senders connected
|
|
74
|
-
shaka.cast.CastReceiver.prototype.isConnected() => boolean
|
|
75
|
-
|
|
76
|
-
// Fired when isConnected changes
|
|
77
|
-
shaka.cast.CastReceiver.CastStatusChangedEvent
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
#### Implementation
|
|
82
|
-
|
|
83
|
-
`CastProxy` in local mode will pass all attribute and method accesses directly
|
|
84
|
-
to the local objects. In cast mode, it will have to implement certain
|
|
85
|
-
attributes and methods differently from others.
|
|
86
|
-
|
|
87
|
-
In cast mode, reads of attributes and calls to synchronous getter methods will
|
|
88
|
-
be backed by a cache of attribute values pushed by the `CastReceiver`. They
|
|
89
|
-
will synchronously return the most recent value sent by the receiver. Writes to
|
|
90
|
-
attributes and calls to methods without a return value will be proxied to the
|
|
91
|
-
remote objects and treated as synchronous. Attribute writes will replace the
|
|
92
|
-
most recent values pushed by the receiver. Methods which return a `Promise`
|
|
93
|
-
will return a Promise which is resolved when the `CastReceiver` pushes a return
|
|
94
|
-
value back.
|
|
95
|
-
|
|
96
|
-
`CastProxy` and `CastReceiver` must share a list of events, attributes, getter
|
|
97
|
-
methods, void methods, and methods which return a `Promise`. If a key is not
|
|
98
|
-
explicitly listed, its type is not known and it is not supported by the proxy.
|
|
99
|
-
|
|
100
|
-
`CastReceiver` will periodically push values of attributes and getters to the
|
|
101
|
-
`CastProxy` on the sender. It will also push events to the `CastProxy`. As of
|
|
102
|
-
our first draft, `CastReceiver` pushes attribute updates every 500ms. Based on
|
|
103
|
-
experiments, this seems to be a good balance between performance and UI
|
|
104
|
-
responsiveness.
|
|
105
|
-
|
|
106
|
-
`CastProxy` will have to have a special handler to simulate `TimeRanges`, since
|
|
107
|
-
the object cannot be pushed directly by `CastReceiver`. `CastReceiver` will
|
|
108
|
-
read out the values of each range and push an anonymous object containing the
|
|
109
|
-
information. `CastProxy` will provide an object that looks and acts like
|
|
110
|
-
`TimeRanges`, but which is backed by the anonymous object pushed by
|
|
111
|
-
`CastReceiver`.
|
|
112
|
-
|
|
113
|
-
`CastReceiver` will have to connect `volume` and `muted` attributes to the
|
|
114
|
-
system volume, not the video volume. The ChromeCast documentation states:
|
|
115
|
-
|
|
116
|
-
> All user-initiated actions on volume should impact the system volume, not the
|
|
117
|
-
> stream volume.
|
|
118
|
-
|
|
119
|
-
When we first cast, `CastProxy` will send its initial state to `CastReceiver`,
|
|
120
|
-
including its configuration, manifest URI, selected tracks, text visibility,
|
|
121
|
-
side-loaded text tracks, current timestamp, and any custom app data from the
|
|
122
|
-
sender application. `CastReceiver` will invoke a receiver app callback to
|
|
123
|
-
process any custom app data before initiating playback.
|
|
124
|
-
|
|
125
|
-
Custom app data can be used to pass information that cannot be transferred from
|
|
126
|
-
the sender app's config to the receiver app's config. For example, network
|
|
127
|
-
filters, custom dash scheme callbacks, and custom ABR callbacks are all
|
|
128
|
-
functions defined in the sender app. These cannot be serialized and transferred
|
|
129
|
-
to the receiver without security risks, because the receiver would have to use
|
|
130
|
-
`eval()` to deserialize them. Instead, the sender app must send whatever data
|
|
131
|
-
is necessary for the receiver to construct equivalent callbacks if needed. For
|
|
132
|
-
example, if network filters are used to attach auth tokens to license requests,
|
|
133
|
-
the app data would include the user's auth token.
|
|
134
|
-
|
|
135
|
-
Sender apps must listen for `CastStatusChangedEvent`s because a receiver can be
|
|
136
|
-
disconnected without going through the app's UI.
|
|
137
|
-
|
|
138
|
-
Receiver apps must listen for `CastStatusChangedEvent`s because senders can
|
|
139
|
-
disconnect at any time, and because Chromecast UI guidelines say that receiver
|
|
140
|
-
apps should show a different UI while idle.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
#### Error conditions
|
|
144
|
-
|
|
145
|
-
Errors during `cast()`:
|
|
146
|
-
- Cast API unavailable
|
|
147
|
-
- No cast receivers available
|
|
148
|
-
- Already casting
|
|
149
|
-
- Cast canceled by user
|
|
150
|
-
- Cast connection timed out
|
|
151
|
-
- Requested cast receiver app ID is unavailable or does not exist
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Shaka Player Codec Preferences Upgrade Design
|
|
2
|
-
|
|
3
|
-
last update: 2021-03-04
|
|
4
|
-
|
|
5
|
-
by: [michellezhuo@google.com](mailto:michellezhuo@google.com)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Objective
|
|
9
|
-
|
|
10
|
-
Allow the applications to make smarter, dynamic and configurable decisions to
|
|
11
|
-
choose codecs and DRM key systems in Shaka Player.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Overview
|
|
15
|
-
|
|
16
|
-
By adopting the [MediaCapabilities API][] in Shaka Player, we can leverage the
|
|
17
|
-
decoding information, and select the most appropriate codec and resolution of
|
|
18
|
-
the media content dynamically for the user’s device to play.
|
|
19
|
-
|
|
20
|
-
This project allows us to:
|
|
21
|
-
- Determine not only whether media assets are playable, but also whether they
|
|
22
|
-
are playable in an efficient and performant manner
|
|
23
|
-
- Simplify the logic of determining the DRM key system compatibility
|
|
24
|
-
|
|
25
|
-
Besides leveraging the decoding information from MediaCapabilities, we are
|
|
26
|
-
offering a few new configurations for the applications to specify their codec
|
|
27
|
-
preferences. The new configurations include:
|
|
28
|
-
- `drm.preferredKeySystems`
|
|
29
|
-
- `preferredDecodingAttributes`
|
|
30
|
-
- `preferredCodecs`
|
|
31
|
-
|
|
32
|
-
[MediaCapabilities API]: https://developer.mozilla.org/en-US/docs/Web/API/Media_Capabilities_API
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## API changes
|
|
36
|
-
|
|
37
|
-
### Asynchronous `StreamUtils.filterManifest`
|
|
38
|
-
|
|
39
|
-
Previously, all of the manifest filtering happens within the
|
|
40
|
-
`StreamUtils.filterManifest`. Now `StreamUtils.filterManifest` will call
|
|
41
|
-
`MediaCapabilities.decodingInfo` to get the decoding information for manifest
|
|
42
|
-
filtering and then codec choosing.
|
|
43
|
-
|
|
44
|
-
Since the `MediaCapabilities.decodingInfo` happens asynchronously, the
|
|
45
|
-
`StreamUtils.filterManifest` will be changed to asynchronous.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## New Configurations
|
|
49
|
-
|
|
50
|
-
### Configurable codec preferences
|
|
51
|
-
|
|
52
|
-
The MediaCapabilities API provides the Player with whether decoding the media
|
|
53
|
-
is:
|
|
54
|
-
- supported
|
|
55
|
-
- smooth
|
|
56
|
-
- power efficient
|
|
57
|
-
|
|
58
|
-
We want to allow applications to choose the ideal codec based on the decoding
|
|
59
|
-
information of the codecs dynamically. The application can specify by
|
|
60
|
-
the following attributes:
|
|
61
|
-
- smooth
|
|
62
|
-
- power efficient
|
|
63
|
-
- lowest bandwidth
|
|
64
|
-
|
|
65
|
-
The `preferredDecodingAttributes` configuration allows the application to
|
|
66
|
-
specify choosing the ideal codec based on which attributes. It takes an array
|
|
67
|
-
of enum strings as its value. The order of the values in the array specifies
|
|
68
|
-
the priorities of the attributes.
|
|
69
|
-
|
|
70
|
-
For example, the application can set the configuration as:
|
|
71
|
-
|
|
72
|
-
```js
|
|
73
|
-
player.configure('preferredDecodingAttributes', [
|
|
74
|
-
'smooth',
|
|
75
|
-
'bandwidth',
|
|
76
|
-
]);
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Based on the configuration, Shaka Player will:
|
|
80
|
-
1. Choose the codec with the smooth variants (unless there are none)
|
|
81
|
-
2. If more than one codecs have smooth variants, choose the codec with the
|
|
82
|
-
lowest bandwidth.
|
|
83
|
-
|
|
84
|
-
### Configurable codec priorities
|
|
85
|
-
|
|
86
|
-
If more than one codec are supported and available for choosing, and
|
|
87
|
-
`preferredDecodingAttributes` is not configured, an application can specify
|
|
88
|
-
which codecs it prefers via the `preferredCodecs` config.
|
|
89
|
-
|
|
90
|
-
```js
|
|
91
|
-
player.configure('preferredCodecs', ['avc1', 'vp09']);
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Configurable key system priorities
|
|
95
|
-
|
|
96
|
-
A platform may support multiple DRM key systems, (for example, Widevine and
|
|
97
|
-
PlayReady). The `drm.preferredKeySystems` configuration allows the application
|
|
98
|
-
to specify which key systems it wants to choose.
|
|
99
|
-
|
|
100
|
-
[Github issue](https://github.com/shaka-project/shaka-player/issues/3002)
|
|
101
|
-
|
|
102
|
-
Previously, Shaka Player chose a DRM key system based on:
|
|
103
|
-
1. Only use the key systems supported by the platform.
|
|
104
|
-
2. Only use the key systems with configured license server urls.
|
|
105
|
-
3. Choose based on the order of the key systems in the manifest. We try the
|
|
106
|
-
first one, then the second one, until we get a valid keySystemAccess.
|
|
107
|
-
|
|
108
|
-
Now the application can set the configuration as:
|
|
109
|
-
|
|
110
|
-
```js
|
|
111
|
-
player.configure('drm.preferredKeySystems', [
|
|
112
|
-
'com.widevine.alpha',
|
|
113
|
-
'com.microsoft.playready',
|
|
114
|
-
]);
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
With `drm.preferredKeySystems` configured, Shaka Player would:
|
|
118
|
-
1. Based on the preference order specified with the `drm.preferredKeySystems`,
|
|
119
|
-
try to find the matching key systems. In the example above, the Player looks
|
|
120
|
-
for the codec with 'com.widevine.alpha' key system first. If none is
|
|
121
|
-
available, the Player looks for a codec with 'com.microsoft.playready'.
|
|
122
|
-
2. If no preferred key system in the config is available in the manifest, we
|
|
123
|
-
fall back to the old behavior.
|
|
124
|
-
3. If no such configuration is given, we fall back to the old behavior.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## Codec Preferences Algorithm
|
|
128
|
-
|
|
129
|
-
With the new configurations, the Player takes the following steps to choose a
|
|
130
|
-
codec:
|
|
131
|
-
1. Choose the supported variants
|
|
132
|
-
2. If the content is encrypted:
|
|
133
|
-
1. If `drm.preferredKeySystems` is configured, choose the key system based on
|
|
134
|
-
the order of the preferred key systems.
|
|
135
|
-
2. Otherwise, fall back to the default behavior:
|
|
136
|
-
1. Use the key systems that we have a license server for.
|
|
137
|
-
2. Choose the first key system with the order in the manifest.
|
|
138
|
-
4. If `preferredDecodingAttributes` is configured, sort the codecs by the
|
|
139
|
-
`preferredDecodingAttributes` in order.
|
|
140
|
-
5. If `preferredDecodingAttributes` is not configured and more than one codecs
|
|
141
|
-
are available for choosing:
|
|
142
|
-
1. If `preferredAudioChannelCount` is configured, choose the variants with
|
|
143
|
-
the audio channel count equal to `preferredAudioChannelCount`.
|
|
144
|
-
2. If the `preferredCodecs` is configured, choose the codecs equal to the
|
|
145
|
-
preferred codec.
|
|
146
|
-
3. If the `preferredCodecs` is not configured, choose the codec with the
|
|
147
|
-
lowest bandwidth by default.
|
|
148
|
-
|
|
149
|
-
If the new configurations are not specified, the codec preferences algorithm is
|
|
150
|
-
consistent with the current Player behavior.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## Challenges
|
|
154
|
-
|
|
155
|
-
Currently the filtering, sorting and choosing algorithms are in various places
|
|
156
|
-
in our code base, including `StreamUtils.filterManifest`, `DrmEngine`, and
|
|
157
|
-
`StreamUtils.chooseCodecsAndFilterManifest`. To simplify the code and improve
|
|
158
|
-
readability, we’ll conduct the new codec preferences algorithm in one place.
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# Counting DASH Audio Channels
|
|
2
|
-
|
|
3
|
-
Shaka Player parses channel count information from HLS manifests, but not yet
|
|
4
|
-
from DASH manifests. We have had an [open request][dash_channels_request] to
|
|
5
|
-
do this for a year.
|
|
6
|
-
|
|
7
|
-
[dash_channels_request]: https://github.com/shaka-project/shaka-player/issues/424
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## The DASH Spec
|
|
11
|
-
|
|
12
|
-
A DASH manifest does not contain a simple count of audio channels. Instead, it
|
|
13
|
-
has a more general description of the audio channel "configuration", including
|
|
14
|
-
the desired speaker layout. Further, the way this is described is extensible,
|
|
15
|
-
and there is no single format for this metadata.
|
|
16
|
-
|
|
17
|
-
The DASH spec says this of the <AudioChannelConfiguration> element:
|
|
18
|
-
|
|
19
|
-
> For the element AudioChannelConfiguration the @schemeIdUri attribute is used
|
|
20
|
-
> to identify the audio channel configuration scheme employed. Multiple
|
|
21
|
-
> AudioChannelConfiguration elements may be present indicating that the
|
|
22
|
-
> Representation supports multiple audio channel configurations. For example, it
|
|
23
|
-
> may describe a Representation that includes MPEG Surround audio supporting
|
|
24
|
-
> stereo and multichannel. If the scheme or the value for this descriptor is not
|
|
25
|
-
> recognized the DASH client is expected to ignore the descriptor.
|
|
26
|
-
>
|
|
27
|
-
> The descriptor may carry audio channel configuration using the URN label and
|
|
28
|
-
> values defined for OutputChannelPosition in ISO/IEC 23001-8.
|
|
29
|
-
>
|
|
30
|
-
> NOTE: A scheme for audio channel configuration is also defined in 5.8.5.4 of
|
|
31
|
-
> this part of ISO/IEC 23009. This scheme is maintained for
|
|
32
|
-
> backward-compatibility, but it recommended to use the signalling as defined in
|
|
33
|
-
> ISO/IEC 23001-8.
|
|
34
|
-
|
|
35
|
-
> 5.8.5.4 Audio channel configuration schemes
|
|
36
|
-
>
|
|
37
|
-
> The following defines a URI that identifies channel configuration signalling
|
|
38
|
-
> for Representations that contain an audio component. The URI
|
|
39
|
-
> 'urn:mpeg:dash:23003:3:audio\_channel\_configuration:2011' is defined to
|
|
40
|
-
> indicate the channel configuration as defined by Table 68 (Channel
|
|
41
|
-
> Configurations, meaning of channelConfigurationIndex, mapping of channel
|
|
42
|
-
> elements to loudspeaker positions') of ISO/IEC 23003-3. The @value shall be
|
|
43
|
-
> the value as defined for OutputChannelPosition in ISO/IEC 23001-8.
|
|
44
|
-
>
|
|
45
|
-
> The URN 'urn:mpeg:dash:outputChannelPositionList:2012' defines a list of
|
|
46
|
-
> output channel positions to signal individual speaker positions. The @value
|
|
47
|
-
> shall be a space-delimited list of values as defined of the
|
|
48
|
-
> OutputChannelPosition as defined in ISO/IEC 23001-8. For example, the @value
|
|
49
|
-
> for the 7.1 channel configuration 2 high as 2/0/0, 5 mid as 3/0/2 and 0.1 low,
|
|
50
|
-
> where a/b/c indicates speaker count in front, side and back, respectively and
|
|
51
|
-
> 0.1 indicates a subwoofer channel), is '2 0 1 4 5 3 17 1'.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Schemes
|
|
55
|
-
|
|
56
|
-
### urn:mpeg:dash:outputChannelPositionList:2012
|
|
57
|
-
|
|
58
|
-
This is described in the DASH spec as a list of OutputPosition values from
|
|
59
|
-
ISO/IEC 23001-8:2016. That spec gives a table in which 43 explicit speaker
|
|
60
|
-
positions are given numerical values. It would seem that when using this scheme
|
|
61
|
-
in DASH, the @value attribute is a space-separated list of these speaker
|
|
62
|
-
position values. Therefore the number of channels is the length of this list.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
### urn:mpeg:dash:23003:3:audio\_channel\_configuration:2011
|
|
66
|
-
|
|
67
|
-
The DASH spec says this is "the channel configuration as defined by Table 68 ...
|
|
68
|
-
of ISO/IEC 23003-3. The @value shall be the value as defined for
|
|
69
|
-
OutputChannelPosition in ISO/IEC 23001-8."
|
|
70
|
-
|
|
71
|
-
The statement about OutputChannelPosition and 23001-8 conflicts with available
|
|
72
|
-
evidence. Both Shaka Packager and the [open source DASH encoder from Cast
|
|
73
|
-
Labs][cast_labs_23003] use [the number of channels in the @value
|
|
74
|
-
attribute][shaka_packager_23003]. Therefore, we assume that 23003-3 defines this
|
|
75
|
-
very simply as the number of channels, and that the second statement about
|
|
76
|
-
23001-8 was added to that paragraph in error.
|
|
77
|
-
|
|
78
|
-
Neither 23003-3 nor the DASH spec corrigenda were freely available at the time
|
|
79
|
-
of this writing, so we have not confirmed these assumptions.
|
|
80
|
-
|
|
81
|
-
[cast_labs_23003]: https://github.com/castlabs/dashencrypt/blob/1d604896/dash.fragmencrypter/src/main/java/com/castlabs/dash/helpers/DashHelper.java#L193
|
|
82
|
-
[shaka_packager_23003]: https://github.com/shaka-project/shaka-packager/blob/4ba5bec6/packager/mpd/base/xml/xml_node.cc#L378
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### tag:dolby.com,2014:dash:audio\_channel\_configuration:2011
|
|
86
|
-
|
|
87
|
-
The [DASH-IF website][dash_if_audio_config] also lists the
|
|
88
|
-
"tag:dolby.com,2014:dash:audio\_channel\_configuration:2011" scheme, with the
|
|
89
|
-
description:
|
|
90
|
-
|
|
91
|
-
> Dolby audio channel configuration information. The @value attribute shall
|
|
92
|
-
> contain a four digit hexadecimal representation of the 16 bit field that
|
|
93
|
-
> describes the channel assignment as defined by table E.5 in ETSI TS 102 366
|
|
94
|
-
> where left channel is MSB. For example, for a stream with L, C, R, Ls, Rs,
|
|
95
|
-
> LFE, the value shall be 'F801' (hexadecimal equivalent of the binary value
|
|
96
|
-
> 1111 1000 0000 0001).
|
|
97
|
-
|
|
98
|
-
From the example, it would appear that each channel is represented by a single
|
|
99
|
-
bit, so we could count the number of one-bits. [An enumeration in Shaka
|
|
100
|
-
Packager][shaka_packager_ec3_enum] supports this interpretation. This has not
|
|
101
|
-
been confirmed from primary sources.
|
|
102
|
-
|
|
103
|
-
[dash_if_audio_config]: http://dashif.org/identifiers/audio-source-data/
|
|
104
|
-
[shaka_packager_ec3_enum]: https://github.com/shaka-project/shaka-packager/blob/47363dd0/packager/media/codecs/ec3_audio_util.cc#L34
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### urn:dts:dash:audio\_channel\_configuration:2012
|
|
108
|
-
|
|
109
|
-
The DASH encoder from Cast Labs also supports
|
|
110
|
-
"urn:dts:dash:audio\_channel\_configuration:2012" for DTS, which [seems to be a
|
|
111
|
-
simple channel count][cast_labs_dash_2012].
|
|
112
|
-
|
|
113
|
-
[cast_labs_dash_2012]: https://github.com/castlabs/dashencrypt/blob/1d604896/dash.fragmencrypter/src/main/java/com/castlabs/dash/helpers/DashHelper.java#L321
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### urn:dolby:dash:audio\_channel\_configuration:2011
|
|
117
|
-
|
|
118
|
-
The DASH encoder from Cast Labs also supports
|
|
119
|
-
"urn:dolby:dash:audio\_channel\_configuration:2011" for AC3 and EC3, which
|
|
120
|
-
[seems to be identical to the hex string][cast_labs_dolby] used in the
|
|
121
|
-
"tag:dolby.com,2014:dash:audio\_channel\_configuration:2011" scheme above.
|
|
122
|
-
|
|
123
|
-
[cast_labs_dolby]: https://github.com/castlabs/dashencrypt/blob/1d604896/dash.fragmencrypter/src/main/java/com/castlabs/dash/helpers/DashHelper.java#L100
|