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
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
# Shaka Player Manifest Upgrade Guide (v3.0)
|
|
2
|
-
|
|
3
|
-
v3.0 introduced many changes to the `shaka.extern.Manifest` structure.
|
|
4
|
-
This is a detailed guide for upgrading `ManifestParser` plugins or applications
|
|
5
|
-
using `Player.getManifest()` to extract information about content. Any
|
|
6
|
-
application with a custom `ManifestParser` or which uses `Player.getManifest()`
|
|
7
|
-
MUST be upgraded for compatibility with v3.0.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
#### Registration
|
|
11
|
-
|
|
12
|
-
In addition to registering new parsers or overriding existing ones with
|
|
13
|
-
{@link shaka.media.ManifestParser.registerParserByMime}, you can now also
|
|
14
|
-
unregister them with {@link shaka.media.ManifestParser.unregisterParserByMime}.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#### Manifest and Period-flattening
|
|
18
|
-
|
|
19
|
-
The {@link shaka.extern.Manifest} structure has changed. The concept of
|
|
20
|
-
"Periods", based closely on DASH, has been removed. Many individual parts of
|
|
21
|
-
the manifest structure have changed to make this possible. In this section, we
|
|
22
|
-
will give a high-level view of the changes. In the sections below, you will
|
|
23
|
-
find details on the changes to the various parts of the `Manifest` structure and
|
|
24
|
-
the `ManifestParser` plugin interfaces.
|
|
25
|
-
|
|
26
|
-
If you have a custom `ManifestParser` plugin that parses multi-Period DASH
|
|
27
|
-
content, you will need to consider how `<Representation>`s connect across
|
|
28
|
-
`<Period>`s. Each {@link shaka.extern.Stream} now comprises the entire
|
|
29
|
-
presentation, and {@link shaka.media.SegmentReference} timestamps are no longer
|
|
30
|
-
Period-relative.
|
|
31
|
-
|
|
32
|
-
If you have a custom `ManifestParser` plugin that parses other formats, or if
|
|
33
|
-
your application reads the `Manifest` structure, you will just need to move a
|
|
34
|
-
few fields and make some relatively minor API updates as detailed below.
|
|
35
|
-
|
|
36
|
-
In v2.5, `Manifest` objects contained `Period`s, and each `Period` contained
|
|
37
|
-
fields named `variants` and `textStreams`. These fields are now part of the
|
|
38
|
-
top-level `Manifest` structure, and the `Stream` objects that make them up now
|
|
39
|
-
span all DASH Periods. `ManifestParser` plugins MUST be updated to move these
|
|
40
|
-
fields, and applications which read the `Manifest` object MUST be updated to
|
|
41
|
-
look for them in the new location.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
#### Filtering
|
|
45
|
-
|
|
46
|
-
The {@link shaka.extern.ManifestParser.PlayerInterface} structure has changed.
|
|
47
|
-
Instead of `filterNewPeriod` and `filterAllPeriods`, there is now a single
|
|
48
|
-
callback: {@link shaka.extern.ManifestParser.PlayerInterface#filter}. This
|
|
49
|
-
should be invoked any time new text streams or variants are added to the
|
|
50
|
-
manifest. `ManifestParser` plugins MUST be updated to use the new callback.
|
|
51
|
-
Keep in mind that the new `filter` method is asynchronous, and thus it should
|
|
52
|
-
probably be used in conjunction with `.then()` or `await`.
|
|
53
|
-
|
|
54
|
-
```js
|
|
55
|
-
// v2.5:
|
|
56
|
-
// Call this after the initial parsing
|
|
57
|
-
this.playerInterface_.filterAllPeriods(periods);
|
|
58
|
-
|
|
59
|
-
// Call this after any new periods are added
|
|
60
|
-
this.playerInterface_.filterNewPeriod(someNewPeriod);
|
|
61
|
-
|
|
62
|
-
// v3.0:
|
|
63
|
-
// Call this after the initial parsing or after any new streams are added
|
|
64
|
-
await this.playerInterface_.filter(manifest);
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
#### Embedded Captions
|
|
69
|
-
|
|
70
|
-
There is another new method inside the player interface,
|
|
71
|
-
`makeTextStreamsForClosedCaptions`.
|
|
72
|
-
This method must be called on the manifest initially, and after each time new
|
|
73
|
-
content is added, in order for embedded captions, such as CEA 608 captions,
|
|
74
|
-
to work.
|
|
75
|
-
|
|
76
|
-
```js
|
|
77
|
-
this.playerInterface_.makeTextStreamsForClosedCaptions(manifest);
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
#### PresentationTimeline
|
|
82
|
-
|
|
83
|
-
The API for {@link shaka.media.PresentationTimeline} has changed.
|
|
84
|
-
`ManifestParser` plugins that use these methods MUST be updated:
|
|
85
|
-
|
|
86
|
-
- {@link shaka.media.PresentationTimeline#notifySegments} now takes a
|
|
87
|
-
reference array only, instead of a reference array and a Period start time
|
|
88
|
-
or boolean flag.
|
|
89
|
-
|
|
90
|
-
```js
|
|
91
|
-
// v2.4:
|
|
92
|
-
timeline.notifySegments(segmentList, /* periodStart= */ 0);
|
|
93
|
-
|
|
94
|
-
// v2.5:
|
|
95
|
-
timeline.notifySegments(segmentList, /* isFirstPeriod= */ true);
|
|
96
|
-
|
|
97
|
-
// v3.0:
|
|
98
|
-
timeline.notifySegments(segmentList);
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
#### DrmInfo
|
|
103
|
-
|
|
104
|
-
The {@link shaka.extern.DrmInfo} structure has changed. The `keyIds` field is
|
|
105
|
-
now a `Set` of `string`s instead of an `Array`. `ManifestParser` plugins MUST
|
|
106
|
-
be updated to return the correct type, and applications which read this part of
|
|
107
|
-
the `Manifest` structure MUST be updated to interact with `Set` instead of an
|
|
108
|
-
`Array`.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
#### Variant
|
|
112
|
-
|
|
113
|
-
The {@link shaka.extern.Variant} structure has changed. The `drmInfos` field
|
|
114
|
-
has moved to {@link shaka.extern.Stream}. `ManifestParser` plugins MUST be
|
|
115
|
-
updated to output this field on the correct object.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
#### Stream
|
|
119
|
-
|
|
120
|
-
The {@link shaka.extern.Stream} structure has changed.
|
|
121
|
-
|
|
122
|
-
The `drmInfos` field that used to appear in {@link shaka.extern.Variant} has
|
|
123
|
-
been moved here. `ManifestParser` plugins MUST be updated to output this field
|
|
124
|
-
on the correct object.
|
|
125
|
-
|
|
126
|
-
The `findSegmentPosition` and `getSegmentReference` callbacks have been replaced
|
|
127
|
-
with `segmentIndex`, an instance of {@link shaka.media.SegmentIndex}.
|
|
128
|
-
`ManifestParser` plugins MUST be updated to output a `segmentIndex` instead of
|
|
129
|
-
these callbacks. (In many cases, you may have been basing these callbacks on a
|
|
130
|
-
`SegmentIndex` object's `find` and `get` methods already.)
|
|
131
|
-
|
|
132
|
-
The `initSegmentReference` and `presentationTimeOffset` fields are no longer
|
|
133
|
-
part of `Stream`. This information has moved to
|
|
134
|
-
{@link shaka.media.SegmentReference}. `ManifestParser` plugins MUST be updated
|
|
135
|
-
accordingly. See the section on `SegmentReference` for details.
|
|
136
|
-
|
|
137
|
-
The `keyId` field, a string, has been replaced with the `keyIds` field, a `Set`
|
|
138
|
-
of `string`s. `ManifestParser` plugins MUST be updated to output the new field.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
#### InitSegmentReference
|
|
142
|
-
|
|
143
|
-
The {@link shaka.media.InitSegmentReference} API has changed. The `createUris`
|
|
144
|
-
methods has been removed, as it was redundant. Applications with custom
|
|
145
|
-
`ManifestParser` plugins and applications which read `InitSegmentReference`s
|
|
146
|
-
MUST be updated to use `getUris` instead.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
#### SegmentReference
|
|
150
|
-
|
|
151
|
-
The {@link shaka.media.SegmentReference} API has changed. Applications with
|
|
152
|
-
custom `ManifestParser` plugins and applications which read `SegmentReference`s
|
|
153
|
-
MUST be updated to account for all changes below.
|
|
154
|
-
|
|
155
|
-
The `createUris` methods has also been removed, as it was redundant. Use
|
|
156
|
-
`getUris` instead.
|
|
157
|
-
|
|
158
|
-
`SegmentReference` objects no longer have any internal concept of "position".
|
|
159
|
-
The `getPosition` method has been removed, and the constructor no longer takes a
|
|
160
|
-
position parameter.
|
|
161
|
-
|
|
162
|
-
`SegmentReference` timestamps are no longer relative to the Period. Instead,
|
|
163
|
-
they are presentation timestamps. For example, if the Period starts at 100 and
|
|
164
|
-
the segment begins at time 5 within that Period, `startTime` will now be 105.
|
|
165
|
-
|
|
166
|
-
`SegmentReference` objects now contain their `InitSegmentReference`. This
|
|
167
|
-
allows the segments within a `Stream` to change init segments mid-stream, which
|
|
168
|
-
is used both for multi-Period DASH and for HLS discontinuities. If two segments
|
|
169
|
-
have the same initialization segment, their `SegmentReference`s MUST have the
|
|
170
|
-
same `InitSegmentReference` object at the same memory address.
|
|
171
|
-
`StreamingEngine` will compare `InitSegmentReference` objects to determine when
|
|
172
|
-
a new init segment must be fetched, and this will NOT be a deep comparison of
|
|
173
|
-
the contents of the object.
|
|
174
|
-
|
|
175
|
-
`SegmentReference` objects now contain an append window. This is used to trim
|
|
176
|
-
content in `MediaSource`. For multi-Period content, this is the start and end
|
|
177
|
-
of the Period from which the segment comes. For other content, the start is
|
|
178
|
-
usually 0 and the end is usually `Infinity`.
|
|
179
|
-
|
|
180
|
-
`SegmentReference` objects now contain a timestamp offset. `MediaSource` adds
|
|
181
|
-
this value to the timestamps in the media segment when it is parsed by the
|
|
182
|
-
browser. This should be the value which aligns the media timestamps (in the
|
|
183
|
-
segment) to the presentation timestamps (in the `SegmentReference`). This is
|
|
184
|
-
related to the `presentationTimeOffset` from v2.5 and earlier.
|
|
185
|
-
`timestampOffset` should be the period start time minus the
|
|
186
|
-
`presentationTimeOffset`. (In v2.5, this is how `MediaSource`'s
|
|
187
|
-
`timestampOffset` field was calculated. Now, we pass the `timestampOffset`
|
|
188
|
-
field from the `SegmentReference` directly to `MediaSource`.)
|
|
189
|
-
|
|
190
|
-
```js
|
|
191
|
-
// v2.5
|
|
192
|
-
const period = {
|
|
193
|
-
startTime: 100,
|
|
194
|
-
/* ... */
|
|
195
|
-
};
|
|
196
|
-
const initSegmentReference = /* ... */;
|
|
197
|
-
const stream = {
|
|
198
|
-
/* ... */
|
|
199
|
-
initSegmentReference,
|
|
200
|
-
presentationTimeOffset: 20,
|
|
201
|
-
};
|
|
202
|
-
const ref = new shaka.media.SegmentReference(
|
|
203
|
-
/* position= */ 0,
|
|
204
|
-
/* startTime= */ 0,
|
|
205
|
-
/* endTime= */ 10,
|
|
206
|
-
/* uris= */ () => [uri],
|
|
207
|
-
/* startByte= */ 0,
|
|
208
|
-
/* endByte= */ null);
|
|
209
|
-
|
|
210
|
-
// v3.0
|
|
211
|
-
const ref = new shaka.media.SegmentReference(
|
|
212
|
-
/* startTime= */ 100, // <-- period start 100 + period-relative timestamp 0
|
|
213
|
-
/* endTime= */ 110,
|
|
214
|
-
/* uris= */ () => [uri],
|
|
215
|
-
/* startByte= */ 0,
|
|
216
|
-
/* endByte= */ null,
|
|
217
|
-
initSegmentReference,
|
|
218
|
-
/* timestampOffset= */ 80, // <-- period start 100 - PTO 20
|
|
219
|
-
/* appendWindowStart= */ 100, // <-- period start
|
|
220
|
-
/* appendWindowEnd= */ Infinity); // <-- for the last period in live stream
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
#### SegmentIndex
|
|
225
|
-
|
|
226
|
-
The {@link shaka.media.SegmentIndex} API has changed. Applications with custom
|
|
227
|
-
`ManifestParser` plugins and applications which read `SegmentIndex`es MUST be
|
|
228
|
-
updated to account for all changes below.
|
|
229
|
-
|
|
230
|
-
The asynchronous `destroy` method has been replaced with the synchronous
|
|
231
|
-
`release` method. Applications which destroy `SegmentIndex` objects SHOULD be
|
|
232
|
-
updated to call `release` instead. Backward compatibility will be removed in
|
|
233
|
-
v4.0.
|
|
234
|
-
|
|
235
|
-
The `find` method still returns a position which can be passed to `get`, but
|
|
236
|
-
this position is no longer part of the underlying `SegmentReference` object.
|
|
237
|
-
(See changes to `SegmentReference` in the section above.) The value returned
|
|
238
|
-
from `find` is now abstract. This should be completely compatible with v2.5,
|
|
239
|
-
but the value can no longer be tied to a `SegmentReference`.
|
|
240
|
-
|
|
241
|
-
The `merge` method has been simplified. It was already documented to only
|
|
242
|
-
support extending the reference array without replacing anything or interleaving
|
|
243
|
-
new references into the old ones. Now it is actually a true statement about the
|
|
244
|
-
implementation. If your custom `ManifestParser` plugin was relying on the old
|
|
245
|
-
merge behavior rather than its documentation, you MUST update your plugin.
|
|
246
|
-
|
|
247
|
-
The `evict` method now takes a presentation timestamp. See related changes in
|
|
248
|
-
the `SegmentReference` section above.
|
|
249
|
-
|
|
250
|
-
The `fit` method now takes a window start and end time instead of a period
|
|
251
|
-
duration. See related changes in the `SegmentReference` section above.
|
|
252
|
-
|
|
253
|
-
The `updateEvery` method has been added. This allows `ManifestParser` plugins
|
|
254
|
-
to schedule callbacks to calculate additional `SegmentReference`s to be appended
|
|
255
|
-
to the reference array. This is useful, for example, in generating references
|
|
256
|
-
for `<SegmentTemplate>` content in DASH.
|
|
257
|
-
|
|
258
|
-
The static `forSingleSegment` method has been added. It will generate a
|
|
259
|
-
`SegmentIndex` for a single segment based on a start time, duration, and URIs.
|
|
260
|
-
This is useful for `ManifestParser` plugins creating non-segmented text
|
|
261
|
-
`Stream`s.
|
|
262
|
-
|
|
263
|
-
Finally, `SegmentIndex` now implements the `Iterable` protocol. This means
|
|
264
|
-
applications can now iterate through the index or convert it to an Array. For
|
|
265
|
-
example:
|
|
266
|
-
|
|
267
|
-
```js
|
|
268
|
-
for (const reference of stream.segmentIndex) {
|
|
269
|
-
// ...
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// OR
|
|
273
|
-
|
|
274
|
-
const listOfReferences = Array.from(stream.segmentIndex);
|
|
275
|
-
|
|
276
|
-
// OR
|
|
277
|
-
|
|
278
|
-
const firstReference = Array.from(stream.segmentIndex)[0];
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
This could be useful to applications which read the contents of a `Manifest`.
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Shaka Player Upgrade Guide
|
|
2
|
-
|
|
3
|
-
If you are upgrading from **v1 or v2**, these releases are no longer supported,
|
|
4
|
-
and upgrade guides are no longer maintained. You can use these old upgrades
|
|
5
|
-
guides to upgrade in stages:
|
|
6
|
-
|
|
7
|
-
- {@link https://v2-4-7-dot-shaka-player-demo.appspot.com/docs/api/tutorial-upgrade.html Upgrade to v2.4}
|
|
8
|
-
- {@link https://v2-5-23-dot-shaka-player-demo.appspot.com/docs/api/tutorial-upgrade-v2-4.html Upgrade v2.4 => v2.5}
|
|
9
|
-
- {@link https://v3-0-15-dot-shaka-player-demo.appspot.com/docs/api/tutorial-upgrade-v2-5.html Upgrade v2.5 => v3.0}
|
|
10
|
-
|
|
11
|
-
Since v3.0, Shaka Player has been following semantic versioning. (The
|
|
12
|
-
IE11 deprecation announced before v3.0 happened in v3.1, which technically
|
|
13
|
-
breaks semantic versioning guarantees. It is the only intentional exception.)
|
|
14
|
-
|
|
15
|
-
Upgrading from any v3 release to a newer v3 release should be backward
|
|
16
|
-
compatible. The same is true of all major version numbers (v4 => v4, etc).
|
|
17
|
-
|
|
18
|
-
Here is a summary of breaking changes that might require upgrades to your
|
|
19
|
-
application:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## v3.1
|
|
23
|
-
|
|
24
|
-
- New dependencies:
|
|
25
|
-
- TextDecoder/TextEncoder platform support or polyfill required (affects
|
|
26
|
-
Xbox One, but not evergreen browsers); we suggest the polyfill
|
|
27
|
-
[https://github.com/anonyco/FastestSmallestTextEncoderDecoder](fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js)
|
|
28
|
-
Fallback included by default in v4.2
|
|
29
|
-
|
|
30
|
-
- Support removed:
|
|
31
|
-
- IE11 support removed
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## v4.0
|
|
35
|
-
|
|
36
|
-
- Support removed:
|
|
37
|
-
- Older TVs and set-top boxes that do not support MediaSource sequence mode
|
|
38
|
-
can no longer play HLS content (since we now use sequence mode for that)
|
|
39
|
-
- Support for iOS 12 and Safari 12 has been removed
|
|
40
|
-
|
|
41
|
-
- Configuration changes:
|
|
42
|
-
- `manifest.dash.defaultPresentationDelay` has been replaced by
|
|
43
|
-
`manifest.defaultPresentationDelay` (deprecated in v3.0.0)
|
|
44
|
-
- Configuration of factories should be plain factory functions, not
|
|
45
|
-
constructors; these will not be invoked with `new` (deprecated in v3.1.0)
|
|
46
|
-
- `drm.initDataTransform` now defaults to a no-op
|
|
47
|
-
- `streaming.smallGapLimit` and `streaming.jumpLargeGaps` have been removed;
|
|
48
|
-
all gaps will now be jumped
|
|
49
|
-
- `manifest.hls.useFullSegmentsForStartTime` has been removed; this setting
|
|
50
|
-
is no longer necessary, as we no longer fetch segments for start times in
|
|
51
|
-
the HLS parser
|
|
52
|
-
|
|
53
|
-
- Player API changes:
|
|
54
|
-
- `shaka.Player.prototype.addTextTrack()` has been replaced by
|
|
55
|
-
`addTextTrackAsync()`, which returns a `Promise` (deprecated in v3.1.0)
|
|
56
|
-
|
|
57
|
-
- UI API changes:
|
|
58
|
-
- `shaka.ui.TrackLabelFormat` has been renamed to
|
|
59
|
-
`shaka.ui.Overlay.TrackLabelFormat` (deprecated in v3.1.0)
|
|
60
|
-
- `shaka.ui.FailReasonCode` has been renamed to
|
|
61
|
-
`shaka.ui.Overlay.FailReasonCode` (deprecated in v3.1.0)
|
|
62
|
-
|
|
63
|
-
- Offline API changes:
|
|
64
|
-
- `shaka.offline.Storage.prototype.store()` returns `AbortableOperation`
|
|
65
|
-
instead of `Promise`; callers should change `.then()` to
|
|
66
|
-
`.promise.then()` and `await rv` to `await rv.promise` (deprecated in
|
|
67
|
-
v3.0.0)
|
|
68
|
-
- `shaka.offline.Storage.prototype.getStoreInProgress()` has been removed;
|
|
69
|
-
concurrent operations are supported since v3, so callers don't need to
|
|
70
|
-
check this (deprecated in v3.0.0)
|
|
71
|
-
|
|
72
|
-
- Utility API changes:
|
|
73
|
-
- `shaka.util.Uint8ArrayUtils.equal` has been replaced by
|
|
74
|
-
`shaka.util.BufferUtils.equal`, which can handle multiple types of
|
|
75
|
-
buffers (deprecated in v3.0.0)
|
|
76
|
-
|
|
77
|
-
- Manifest API changes:
|
|
78
|
-
- `shaka.media.SegmentIndex.prototype.destroy()` has been replaced by
|
|
79
|
-
`release()`, which is synchronous (deprecated in v3.0.0)
|
|
80
|
-
- `shaka.media.SegmentIterator.prototype.seek()`, which mutates the
|
|
81
|
-
iterator, has been replaced by
|
|
82
|
-
`shaka.media.SegmentIndex.getIteratorForTime()` (deprecated in v3.1.0)
|
|
83
|
-
- `shaka.media.SegmentIndex.prototype.merge()` has become private; use
|
|
84
|
-
`mergeAndEvict()` instead (deprecated in v3.2.0)
|
|
85
|
-
|
|
86
|
-
- Plugin changes:
|
|
87
|
-
- `AbrManager` plugins must implement the `playbackRateChanged()` method
|
|
88
|
-
(deprecated in v3.0.0)
|
|
89
|
-
- `shaka.extern.Cue.prototype.spacer` has been replaced by the more
|
|
90
|
-
clearly-named `lineBreak` (deprecated in v3.1.0)
|
|
91
|
-
- `IUIElement` plugins must have a `release()` method (not `destroy()`)
|
|
92
|
-
(deprecated in v3.0.0)
|
|
93
|
-
|
|
94
|
-
## v5.0 (unreleased)
|
|
95
|
-
|
|
96
|
-
- Configuration changes:
|
|
97
|
-
- `streaming.forceTransmuxTS` has been renamed to `streaming.forceTransmux`
|
|
98
|
-
(deprecated in v4.3.0)
|
|
99
|
-
|
|
100
|
-
- Plugin changes:
|
|
101
|
-
- `Transmuxer` plugins now has three new parameters in `transmux()` method.
|
|
102
|
-
|
|
103
|
-
- Player API Changes:
|
|
104
|
-
- The constructor no longer takes `mediaElement` as a parameter; use the `attach` method to attach to a media element instead. (Deprecated in v4.6)
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Welcome to Shaka Player
|
|
2
|
-
|
|
3
|
-
Shaka Player is a JavaScript library for adaptive video streaming.
|
|
4
|
-
It plays [DASH][] content without browser plugins using
|
|
5
|
-
[MediaSource Extensions][] and [Encrypted Media Extensions][].
|
|
6
|
-
|
|
7
|
-
Shaka Player is meant to be deployed after being compiled. The tools you need
|
|
8
|
-
to compile the sources and documentation are included in the sources:
|
|
9
|
-
[Closure Compiler][], [Closure Linter][], and [JSDoc][].
|
|
10
|
-
|
|
11
|
-
If you are integrating Shaka Player into another Closure-based project, our
|
|
12
|
-
build process will generate externs for Shaka Player itself.
|
|
13
|
-
|
|
14
|
-
If you installed Shaka Player via npm, the source has been compiled and the
|
|
15
|
-
externs have been generated.
|
|
16
|
-
|
|
17
|
-
[DASH]: http://dashif.org/
|
|
18
|
-
[MediaSource Extensions]: http://w3c.github.io/media-source/
|
|
19
|
-
[Encrypted Media Extensions]: https://w3c.github.io/encrypted-media/
|
|
20
|
-
|
|
21
|
-
[Closure Compiler]: https://developers.google.com/closure/compiler/
|
|
22
|
-
[Closure Linter]: https://developers.google.com/closure/utilities/docs/linter_howto
|
|
23
|
-
[JSDoc]: http://usejsdoc.org/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#### Prerequisites
|
|
27
|
-
|
|
28
|
-
You can build Shaka on Linux, Windows, or Mac.
|
|
29
|
-
To get the sources and compile the library, you will need:
|
|
30
|
-
* {@link https://git-scm.com/downloads Git v1.9+}
|
|
31
|
-
* {@link https://www.python.org/downloads/ Python v2.7 or v3.5+}
|
|
32
|
-
* {@link https://learn.microsoft.com/en-us/java/openjdk/download Java Runtime Environment v14+}
|
|
33
|
-
* {@link https://nodejs.org/en/download/ NodeJS v14+}
|
|
34
|
-
* A local web server, such as {@link https://httpd.apache.org/ Apache}
|
|
35
|
-
* _NOTE: A local web server is required because browsers place restrictions
|
|
36
|
-
on applications from file:/// URLs._
|
|
37
|
-
|
|
38
|
-
If you just want to compile for export to other projects, you might consider compiling through a docker container. (see compile instructions)
|
|
39
|
-
|
|
40
|
-
To quickly install these prerequisites on Ubuntu or Debian, you can run this
|
|
41
|
-
script:
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
curl https://raw.githubusercontent.com/shaka-project/shaka-player/main/build/install-linux-prereqs.sh | bash
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
We do not provide detailed instructions or scripts for installing these
|
|
48
|
-
prerequisites on other operating systems or on non-Debian-based Linux
|
|
49
|
-
distributions. (We couldn't possibly document them all.) You can follow the
|
|
50
|
-
links above to download and install the prerequisites manually on any OS.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
#### Get the source
|
|
54
|
-
|
|
55
|
-
```sh
|
|
56
|
-
git clone https://github.com/shaka-project/shaka-player.git
|
|
57
|
-
cd shaka-player
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
#### Compile the library and generate the docs
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
python build/all.py
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Alternatively you can use a docker container:
|
|
68
|
-
```sh
|
|
69
|
-
docker build -t shaka-player-build build/docker
|
|
70
|
-
docker run -v $(pwd):/usr/src --user $(id -u):$(id -g) shaka-player-build
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
The output is:
|
|
74
|
-
* dist/shaka-player.compiled.js (compiled bundle)
|
|
75
|
-
* dist/shaka-player.compiled.debug.js (debug bundle)
|
|
76
|
-
* dist/shaka-player.compiled.externs.js
|
|
77
|
-
(generated externs, for Closure-based projects)
|
|
78
|
-
* docs/api/index.html (generated documentation)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
#### Run the tests
|
|
82
|
-
|
|
83
|
-
The tests depend on a few third-party tools, which are installed automatically
|
|
84
|
-
via `npm` when you run the tests. Nothing will be installed globally.
|
|
85
|
-
|
|
86
|
-
Run the tests in your platform's browsers using `./build/test.py`. You can
|
|
87
|
-
specify particular browsers with the `--browsers` argument. For example:
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
./build/test.py --browsers Opera
|
|
91
|
-
|
|
92
|
-
# or:
|
|
93
|
-
|
|
94
|
-
./build/test.py --browsers Chrome,Firefox,Edge
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
You can find a full list of available browsers with `--browsers help`, and you
|
|
98
|
-
can find a complete list of testing options with `--help`.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
#### Announcements
|
|
102
|
-
|
|
103
|
-
To subscribe to new releases on GitHub, you can follow
|
|
104
|
-
[instructions from this blog](https://www.jessesquires.com/blog/2020/07/30/github-tip-watching-releases/).
|
|
105
|
-
|
|
106
|
-
To receive infrequent announcements and surveys from us, you can join our
|
|
107
|
-
[mailing list](https://groups.google.com/forum/#!forum/shaka-player-users).
|
|
108
|
-
The list is very low volume, and can only be written to by us.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Widevine Service Certificates
|
|
2
|
-
|
|
3
|
-
With Widevine, you can eliminate one round-trip to your license server or proxy
|
|
4
|
-
per session by preloading a Widevine service certificate. You can either provide
|
|
5
|
-
it directly or set a URI and let Shaka fetch it for you. Do this before calling
|
|
6
|
-
`player.load()`. The values will persist across multiple calls to `load()` on
|
|
7
|
-
the same `shaka.Player` instance.
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
// This is an example of loading the certificate from your site at runtime.
|
|
11
|
-
// You could also choose to bundle it into your JavaScript as a Uint8Array.
|
|
12
|
-
const req = await fetch('https://example.com/service.cert');
|
|
13
|
-
const cert = new Uint8Array(await req.arrayBuffer());
|
|
14
|
-
|
|
15
|
-
// This is the short form for configuration of a certificate:
|
|
16
|
-
player.configure('drm.advanced.com\\.widevine\\.alpha.serverCertificate',
|
|
17
|
-
cert);
|
|
18
|
-
|
|
19
|
-
// This is the long form:
|
|
20
|
-
player.configure({
|
|
21
|
-
drm: {
|
|
22
|
-
advanced: {
|
|
23
|
-
'com.widevine.alpha': {
|
|
24
|
-
'serverCertificate': cert,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// This is the short form for configuration of a certificate URI:
|
|
32
|
-
player.configure('drm.advanced.com\\.widevine\\.alpha.serverCertificateUri',
|
|
33
|
-
'https://example.com/service.cert');
|
|
34
|
-
|
|
35
|
-
// This is the long form:
|
|
36
|
-
player.configure({
|
|
37
|
-
drm: {
|
|
38
|
-
advanced: {
|
|
39
|
-
'com.widevine.alpha': {
|
|
40
|
-
'serverCertificateUri': 'https://example.com/service.cert',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
```
|