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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
WEBVTT
|
|
2
|
-
|
|
3
|
-
00:04.000 --> 00:07.300
|
|
4
|
-
Journal de bord du capitaine.
|
|
5
|
-
Date stellaire 41636.9.
|
|
6
|
-
|
|
7
|
-
00:07.500 --> 00:11.800
|
|
8
|
-
Comme nous le craignions, l'épave
|
|
9
|
-
du cargo Odin de la Fédération,
|
|
10
|
-
|
|
11
|
-
00:12.100 --> 00:16.400
|
|
12
|
-
percuté par un astéroïde,
|
|
13
|
-
ne révèle aucun signe de vie.
|
|
14
|
-
|
|
15
|
-
00:16.700 --> 00:19.000
|
|
16
|
-
Mais trois nacelles
|
|
17
|
-
de sauvetage manquaient,
|
|
18
|
-
|
|
19
|
-
00:19.300 --> 00:21.900
|
|
20
|
-
laissant supposer
|
|
21
|
-
qu'il y aurait des survivants.
|
|
22
|
-
|
|
23
|
-
00:22.700 --> 00:27.700
|
|
24
|
-
- Mise sur orbite Angel One, paré.
|
|
25
|
-
- Quel genre d'endroit, Data ?
|
|
26
|
-
|
|
27
|
-
00:28.200 --> 00:31.600
|
|
28
|
-
Planète de Classe-M.
|
|
29
|
-
Faune et flore à base de carbone.
|
|
30
|
-
|
|
31
|
-
00:31.900 --> 00:34.300
|
|
32
|
-
Population éparse
|
|
33
|
-
et forme de vie intelligente.
|
|
34
|
-
|
|
35
|
-
00:34.600 --> 00:38.400
|
|
36
|
-
Développement technique équivalent
|
|
37
|
-
au milieu du 20ème siècle terrien.
|
|
38
|
-
|
|
39
|
-
00:38.800 --> 00:41.000
|
|
40
|
-
C'est presque un retour aux sources.
|
|
41
|
-
|
|
42
|
-
00:41.300 --> 00:43.600
|
|
43
|
-
Si jamais des survivants
|
|
44
|
-
ont pu aller si loin,
|
|
45
|
-
|
|
46
|
-
00:43.800 --> 00:49.000
|
|
47
|
-
c'était la planète la plus proche.
|
|
48
|
-
La distance qui nous a pris 2 jours
|
|
49
|
-
|
|
50
|
-
00:49.500 --> 00:52.400
|
|
51
|
-
aurait pris 5 mois aux nacelles
|
|
52
|
-
de sauvetage du Odin.
|
|
53
|
-
|
|
54
|
-
00:52.600 --> 00:54.700
|
|
55
|
-
Cinq mois, six jours, onze heures,
|
|
56
|
-
deux min...
|
|
57
|
-
|
|
58
|
-
00:54.900 --> 00:58.400
|
|
59
|
-
- Merci, Data.
|
|
60
|
-
- ..et 57 secondes.
|
|
61
|
-
|
|
62
|
-
00:58.600 --> 01:01.300
|
|
63
|
-
Signal audio provenant d'Angel One.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
WEBVTT
|
|
2
|
-
|
|
3
|
-
00:03.837 --> 00:07.297
|
|
4
|
-
Captain's log, stardate 41636.9.
|
|
5
|
-
|
|
6
|
-
00:07.466 --> 00:11.846
|
|
7
|
-
As feared, our examination of the
|
|
8
|
-
overdue Federation freighter Odin,
|
|
9
|
-
|
|
10
|
-
00:12.012 --> 00:16.472
|
|
11
|
-
disabled by an asteroid collision,
|
|
12
|
-
revealed no life signs.
|
|
13
|
-
|
|
14
|
-
00:16.642 --> 00:19.022
|
|
15
|
-
However three escape pods
|
|
16
|
-
were missing,
|
|
17
|
-
|
|
18
|
-
00:19.186 --> 00:21.936
|
|
19
|
-
suggesting
|
|
20
|
-
the possibility of survivors.
|
|
21
|
-
|
|
22
|
-
00:22.606 --> 00:27.866
|
|
23
|
-
- Ready to orbit Angel One.
|
|
24
|
-
- What kind of place is this, Data?
|
|
25
|
-
|
|
26
|
-
00:28.028 --> 00:31.618
|
|
27
|
-
A Class-M planet supporting
|
|
28
|
-
carbon-based flora and fauna,
|
|
29
|
-
|
|
30
|
-
00:31.782 --> 00:34.322
|
|
31
|
-
sparsely populated
|
|
32
|
-
with intelligent life.
|
|
33
|
-
|
|
34
|
-
00:34.493 --> 00:38.493
|
|
35
|
-
Similar in technological development
|
|
36
|
-
to mid-20th century Earth.
|
|
37
|
-
|
|
38
|
-
00:38.664 --> 00:41.004
|
|
39
|
-
Kinda like being marooned at home.
|
|
40
|
-
|
|
41
|
-
00:41.166 --> 00:43.586
|
|
42
|
-
Assuming any survivors
|
|
43
|
-
made it this far.
|
|
44
|
-
|
|
45
|
-
00:43.794 --> 00:49.174
|
|
46
|
-
It is the closest planet, but to
|
|
47
|
-
go the distance we did in two days,
|
|
48
|
-
|
|
49
|
-
00:49.341 --> 00:52.341
|
|
50
|
-
would've taken the Odin escape pod
|
|
51
|
-
five months.
|
|
52
|
-
|
|
53
|
-
00:52.511 --> 00:54.681
|
|
54
|
-
Five months, six days, 11 hours,
|
|
55
|
-
two min...
|
|
56
|
-
|
|
57
|
-
00:54.847 --> 00:58.397
|
|
58
|
-
- Thank you, Data.
|
|
59
|
-
- ...and 57 seconds.
|
|
60
|
-
|
|
61
|
-
00:58.559 --> 01:01.349
|
|
62
|
-
Receiving an audio signal
|
|
63
|
-
from Angel One.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test/test/boot.js
DELETED
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
/*! @license
|
|
2
|
-
* Shaka Player
|
|
3
|
-
* Copyright 2016 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Gets the value of an argument passed from karma.
|
|
9
|
-
* @param {string} name
|
|
10
|
-
* @return {?}
|
|
11
|
-
*/
|
|
12
|
-
function getClientArg(name) {
|
|
13
|
-
if (window.__karma__ && __karma__.config.args.length) {
|
|
14
|
-
return __karma__.config.args[0][name] || null;
|
|
15
|
-
} else {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function failTestsOnFailedAssertions() {
|
|
21
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
-
const realAssert = console.assert.bind(console);
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* A version of assert() which hooks into jasmine and converts all failed
|
|
26
|
-
* assertions into failed tests.
|
|
27
|
-
* @param {*} condition
|
|
28
|
-
* @param {string=} message
|
|
29
|
-
*/
|
|
30
|
-
function jasmineAssert(condition, message) {
|
|
31
|
-
realAssert(condition, message);
|
|
32
|
-
if (!condition) {
|
|
33
|
-
message = message || 'Assertion failed.';
|
|
34
|
-
console.error(message);
|
|
35
|
-
fail(message);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
goog.asserts.assert = jasmineAssert;
|
|
39
|
-
console.assert = /** @type {?} */(jasmineAssert);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Patches a function on Element to fail an assertion if we use a namespaced
|
|
44
|
-
* name on it. We should use the namespace-aware versions instead.
|
|
45
|
-
*/
|
|
46
|
-
function failTestsOnNamespacedElementOrAttributeNames() {
|
|
47
|
-
const patchElementNamespaceFunction = (name) => {
|
|
48
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
49
|
-
const real = Element.prototype[name];
|
|
50
|
-
/** @this {Element} */
|
|
51
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
52
|
-
Element.prototype[name] = function(arg) {
|
|
53
|
-
// Ignore xml: namespaces since it's builtin.
|
|
54
|
-
if (!arg.startsWith('xml:') && !arg.startsWith('xmlns:') &&
|
|
55
|
-
arg.includes(':')) {
|
|
56
|
-
fail('Use namespace-aware ' + name);
|
|
57
|
-
}
|
|
58
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
59
|
-
return real.apply(this, arguments);
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
patchElementNamespaceFunction('getAttribute');
|
|
64
|
-
patchElementNamespaceFunction('hasAttribute');
|
|
65
|
-
patchElementNamespaceFunction('getElementsByTagName');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Fail the current test on a given error, constructed with a given header and
|
|
70
|
-
* the full stack trace of the error.
|
|
71
|
-
*
|
|
72
|
-
* @param {string} messageHeader
|
|
73
|
-
* @param {!Error} error
|
|
74
|
-
*/
|
|
75
|
-
function failOnError(messageHeader, error) {
|
|
76
|
-
let message = `${messageHeader}: ${error}`;
|
|
77
|
-
// Shaka errors have the stack trace in their toString() already, so don't
|
|
78
|
-
// add it again. For native errors, we need to see where it came from.
|
|
79
|
-
if (error && error.stack && !(error instanceof shaka.util.Error)) {
|
|
80
|
-
message += '\n' + error.stack;
|
|
81
|
-
}
|
|
82
|
-
fail(message);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Listen for unhandled errors and Promise rejections (which may occur after a
|
|
87
|
-
* test) and convert them into test failures.
|
|
88
|
-
*/
|
|
89
|
-
function failTestsOnUnhandledErrors() {
|
|
90
|
-
// https://developer.mozilla.org/en-US/docs/Web/Events/unhandledrejection
|
|
91
|
-
window.addEventListener('unhandledrejection', (event) => {
|
|
92
|
-
/** @type {?} */
|
|
93
|
-
const error = event.reason;
|
|
94
|
-
failOnError('Unhandled rejection in Promise', error);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/error_event
|
|
98
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent
|
|
99
|
-
window.addEventListener('error', (event) => {
|
|
100
|
-
/** @type {?} */
|
|
101
|
-
const error = event['error'];
|
|
102
|
-
failOnError('Unhandled error', error);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Scrollbars ruin our screenshots, in particular on Safari. Disable all
|
|
108
|
-
* scrollbars in CSS to ensure consistent screenshots.
|
|
109
|
-
*/
|
|
110
|
-
function disableScrollbars() {
|
|
111
|
-
// In the past, we had applied fixed offsets to the width on Safari to account
|
|
112
|
-
// for scrollbars and correct the scaling factor, but this was a hack and
|
|
113
|
-
// inconsistent. The best thing to do is completely disable scrollbars
|
|
114
|
-
// through CSS. This ensures that neither the inner iframe nor the top-level
|
|
115
|
-
// window have scrollbars, which makes screenshots on Safari consistent across
|
|
116
|
-
// versions.
|
|
117
|
-
|
|
118
|
-
// Disable scrolling on the inner document, the execution context.
|
|
119
|
-
const innerStyle = document.createElement('style');
|
|
120
|
-
innerStyle.innerText = '::-webkit-scrollbar { display: none; }\n';
|
|
121
|
-
innerStyle.innerText += 'body { overflow: hidden }\n';
|
|
122
|
-
document.head.appendChild(innerStyle);
|
|
123
|
-
|
|
124
|
-
try {
|
|
125
|
-
// Disable scrolling on the outer document, the host context.
|
|
126
|
-
const outerStyle = document.createElement('style');
|
|
127
|
-
outerStyle.innerText = innerStyle.innerText;
|
|
128
|
-
top.document.head.appendChild(outerStyle);
|
|
129
|
-
|
|
130
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
131
|
-
} catch (error) {
|
|
132
|
-
// On some platforms (Chromecast, Tizen), we are prevented from accessing
|
|
133
|
-
// the host context, even though it should be in the same origin. Ignore
|
|
134
|
-
// errors here, so that the rest of the critical boot sequence can complete.
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Work around issues with legacy Edge's Promise implementation.
|
|
140
|
-
*/
|
|
141
|
-
function workAroundLegacyEdgePromiseIssues() {
|
|
142
|
-
// Jasmine's clock mocks seem to interfere with legacy Edge's Promise
|
|
143
|
-
// implementation. This is only the case if Promises are first used after
|
|
144
|
-
// installing the mock. As long as a then() callback on a Promise has
|
|
145
|
-
// happened once beforehand, it seems to be OK. I suspect Edge's Promise
|
|
146
|
-
// implementation is actually not in native code, but rather something like a
|
|
147
|
-
// polyfill that binds to timer calls the first time it needs to schedule
|
|
148
|
-
// something.
|
|
149
|
-
Promise.resolve().then(() => {});
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Returns a Jasmine callback which shims the real callback and checks for
|
|
154
|
-
* a certain condition. The test will only be run if the condition is true.
|
|
155
|
-
*
|
|
156
|
-
* @param {jasmine.Callback} callback The test callback.
|
|
157
|
-
* @param {function():*} cond
|
|
158
|
-
* @param {?string} skipMessage The message used when skipping a test; or
|
|
159
|
-
* null to not use pending(). This should only be null for before/after
|
|
160
|
-
* blocks.
|
|
161
|
-
* @return {jasmine.Callback}
|
|
162
|
-
*/
|
|
163
|
-
function filterShim(callback, cond, skipMessage) {
|
|
164
|
-
return async () => {
|
|
165
|
-
const val = await cond();
|
|
166
|
-
if (!val) {
|
|
167
|
-
if (skipMessage) {
|
|
168
|
-
pending(skipMessage);
|
|
169
|
-
}
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
if (callback.length) {
|
|
174
|
-
// If this has a done callback, wrap in a Promise so we can await it.
|
|
175
|
-
await new Promise((resolve) => callback(resolve));
|
|
176
|
-
} else {
|
|
177
|
-
// If this is an async test, this will wait for it to complete; if this
|
|
178
|
-
// is a synchronous test, await will do nothing.
|
|
179
|
-
await callback();
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Run a test that uses a DRM license server.
|
|
186
|
-
*
|
|
187
|
-
* @param {string} name
|
|
188
|
-
* @param {jasmine.Callback} callback
|
|
189
|
-
*/
|
|
190
|
-
window.drmIt = (name, callback) => {
|
|
191
|
-
const shim = filterShim(
|
|
192
|
-
callback, () => getClientArg('drm'),
|
|
193
|
-
'Skipping tests that use a DRM license server.');
|
|
194
|
-
it(name, shim);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Run a test that has been quarantined.
|
|
199
|
-
*
|
|
200
|
-
* @param {string} name
|
|
201
|
-
* @param {jasmine.Callback} callback
|
|
202
|
-
*/
|
|
203
|
-
window.quarantinedIt = (name, callback) => {
|
|
204
|
-
const shim = filterShim(
|
|
205
|
-
callback, () => getClientArg('quarantined'),
|
|
206
|
-
'Skipping tests that are quarantined.');
|
|
207
|
-
it(name, shim);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Run contained tests when the condition is true.
|
|
212
|
-
*
|
|
213
|
-
* @param {string} describeName The name of the describe() block.
|
|
214
|
-
* @param {function():*} cond A function for the condition; if this returns
|
|
215
|
-
* a truthy value, the tests will run, falsy will skip the tests.
|
|
216
|
-
* @param {function()} describeBody The body of the describe() block. This
|
|
217
|
-
* function will call before/after/it functions to define tests.
|
|
218
|
-
*/
|
|
219
|
-
window.filterDescribe = (describeName, cond, describeBody) => {
|
|
220
|
-
describe(describeName, () => {
|
|
221
|
-
const old = {};
|
|
222
|
-
for (const methodName of ['fit', 'it']) {
|
|
223
|
-
old[methodName] = window[methodName];
|
|
224
|
-
window[methodName] = (testName, testBody, ...rest) => {
|
|
225
|
-
const shim = filterShim(
|
|
226
|
-
testBody, cond, 'Skipping test due to platform support');
|
|
227
|
-
return old[methodName](testName, shim, ...rest);
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
const otherNames = ['afterAll', 'afterEach', 'beforeAll', 'beforeEach'];
|
|
231
|
-
for (const methodName of otherNames) {
|
|
232
|
-
old[methodName] = window[methodName];
|
|
233
|
-
window[methodName] = (body, ...rest) => {
|
|
234
|
-
const shim = filterShim(body, cond, null);
|
|
235
|
-
return old[methodName](shim, ...rest);
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
describeBody();
|
|
240
|
-
|
|
241
|
-
for (const methodName in old) {
|
|
242
|
-
window[methodName] = old[methodName];
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Unconditionally skip contained tests that would normally be run
|
|
249
|
-
* conditionally. Used to temporarily disable tests that use filterDescribe.
|
|
250
|
-
* See filterDescribe above.
|
|
251
|
-
*
|
|
252
|
-
* @param {string} describeName
|
|
253
|
-
* @param {function():*} cond
|
|
254
|
-
* @param {function()} describeBody
|
|
255
|
-
*/
|
|
256
|
-
window.xfilterDescribe = (describeName, cond, describeBody) => {
|
|
257
|
-
const oldDescribe = window['describe'];
|
|
258
|
-
window['describe'] = window['xdescribe'];
|
|
259
|
-
filterDescribe(describeName, cond, describeBody);
|
|
260
|
-
window['describe'] = oldDescribe;
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* A very short alias for filtering offline integration tests.
|
|
265
|
-
*
|
|
266
|
-
* @return {boolean}
|
|
267
|
-
*/
|
|
268
|
-
window.offlineSupported = () => {
|
|
269
|
-
return shaka.offline.StorageMuxer.support();
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Load node modules used in testing and install them into window.
|
|
274
|
-
* @return {!Promise}
|
|
275
|
-
*/
|
|
276
|
-
function loadNodeModules() {
|
|
277
|
-
return new Promise((resolve) => {
|
|
278
|
-
// Configure AMD modules and their dependencies.
|
|
279
|
-
require.config({
|
|
280
|
-
baseUrl: '/base/node_modules',
|
|
281
|
-
packages: [
|
|
282
|
-
{
|
|
283
|
-
name: 'sprintf-js',
|
|
284
|
-
main: 'src/sprintf',
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: 'less',
|
|
288
|
-
main: 'dist/less',
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: 'fontfaceonload',
|
|
292
|
-
main: 'dist/fontfaceonload',
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
// Load required AMD modules, then proceed with tests.
|
|
298
|
-
require(['sprintf-js', 'less', 'fontfaceonload'],
|
|
299
|
-
(sprintfJs, less, FontFaceOnload) => {
|
|
300
|
-
// These external interfaces are declared as "const" in the externs.
|
|
301
|
-
// Avoid "const"-ness complaints from the compiler by assigning these
|
|
302
|
-
// using bracket notation.
|
|
303
|
-
window['sprintf'] = sprintfJs.sprintf;
|
|
304
|
-
window['less'] = less;
|
|
305
|
-
window['FontFaceOnload'] = FontFaceOnload;
|
|
306
|
-
|
|
307
|
-
resolve();
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Apply Jasmine settings and set up anything else needed by the testing
|
|
314
|
-
* environment.
|
|
315
|
-
*/
|
|
316
|
-
function configureJasmineEnvironment() {
|
|
317
|
-
const timeout = getClientArg('testTimeout');
|
|
318
|
-
if (timeout) {
|
|
319
|
-
jasmine.DEFAULT_TIMEOUT_INTERVAL = Number(timeout);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
const logLevel = getClientArg('logLevel');
|
|
323
|
-
if (logLevel) {
|
|
324
|
-
shaka.log.setLevel(Number(logLevel));
|
|
325
|
-
} else {
|
|
326
|
-
shaka.log.setLevel(shaka.log.Level.INFO);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Ensure node modules are loaded before any tests execute.
|
|
330
|
-
beforeAll(async () => {
|
|
331
|
-
await loadNodeModules();
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
const originalSetTimeout = window.setTimeout;
|
|
335
|
-
const delayTests = getClientArg('delayTests');
|
|
336
|
-
if (delayTests) {
|
|
337
|
-
afterEach((done) => { // eslint-disable-line no-restricted-syntax
|
|
338
|
-
console.log('Delaying test by ' + delayTests + ' seconds...');
|
|
339
|
-
originalSetTimeout(done, delayTests * 1000);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Work-around: allow the Tizen media pipeline to cool down.
|
|
344
|
-
// Without this, Tizen's pipeline seems to hang in subsequent tests.
|
|
345
|
-
// TODO: file a bug on Tizen
|
|
346
|
-
if (shaka.util.Platform.isTizen()) {
|
|
347
|
-
afterEach((done) => { // eslint-disable-line no-restricted-syntax
|
|
348
|
-
originalSetTimeout(done, /* ms= */ 100);
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
// Reset decoding config cache after each test.
|
|
353
|
-
afterEach(/** @suppress {accessControls} */ () => {
|
|
354
|
-
shaka.util.StreamUtils.decodingConfigCache_ = {};
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
// Code in karma-jasmine's adapter will malform test failures when the
|
|
358
|
-
// expectation message contains a stack trace, losing the failure message and
|
|
359
|
-
// mixing up the stack trace of the failure. To avoid this, we modify
|
|
360
|
-
// shaka.util.Error not to create a stack trace. There is never any need for
|
|
361
|
-
// this trace in the tests.
|
|
362
|
-
// Shimming shaka.util.Error proved too complicated because of a combination
|
|
363
|
-
// of compiler restrictions and ES6 language features, so this is by far the
|
|
364
|
-
// simpler answer.
|
|
365
|
-
shaka.util.Error.createStack = false;
|
|
366
|
-
|
|
367
|
-
// Shim Jasmine's execute function. The karma-jasmine adapter will configure
|
|
368
|
-
// jasmine in a way that prevents us from setting our own specFilter config.
|
|
369
|
-
// There is no configuration that will stop karma-jasmine from doing this.
|
|
370
|
-
// So we hook into Jasmine's execute function (the last step of
|
|
371
|
-
// karma-jasmine's startup) to set our own config first.
|
|
372
|
-
// See also https://github.com/karma-runner/karma-jasmine/issues/273
|
|
373
|
-
/** @type {!jasmine.Env} */
|
|
374
|
-
const jasmineEnv = jasmine.getEnv();
|
|
375
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
376
|
-
const originalJasmineExecute = jasmineEnv.execute.bind(jasmineEnv);
|
|
377
|
-
jasmineEnv.execute = () => {
|
|
378
|
-
// Use a RegExp if --filter is set, else empty string will match all.
|
|
379
|
-
const specFilterRegExp = new RegExp(getClientArg('filter') || '');
|
|
380
|
-
const isBrowserSupported = shaka.Player.isBrowserSupported();
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* A filter over all Jasmine specs.
|
|
384
|
-
* @param {jasmine.Spec} spec
|
|
385
|
-
* @return {boolean}
|
|
386
|
-
*/
|
|
387
|
-
function specFilter(spec) {
|
|
388
|
-
// If the browser is not supported, don't run the tests.
|
|
389
|
-
// If the user specified a RegExp, only run the matched tests.
|
|
390
|
-
// Running zero tests is considered an error so the test run will fail on
|
|
391
|
-
// unsupported browsers or if the filter doesn't match any specs.
|
|
392
|
-
return isBrowserSupported && specFilterRegExp.test(spec.getFullName());
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
// Set jasmine config.
|
|
396
|
-
const jasmineConfig = {
|
|
397
|
-
specFilter,
|
|
398
|
-
random: !!getClientArg('random'),
|
|
399
|
-
seed: getClientArg('seed'),
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
jasmineEnv.configure(jasmineConfig);
|
|
403
|
-
originalJasmineExecute();
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Set up the Shaka Player test environment.
|
|
409
|
-
*/
|
|
410
|
-
function setupTestEnvironment() {
|
|
411
|
-
failTestsOnFailedAssertions();
|
|
412
|
-
failTestsOnNamespacedElementOrAttributeNames();
|
|
413
|
-
failTestsOnUnhandledErrors();
|
|
414
|
-
disableScrollbars();
|
|
415
|
-
workAroundLegacyEdgePromiseIssues();
|
|
416
|
-
|
|
417
|
-
// The spec filter callback occurs before calls to beforeAll, so we need to
|
|
418
|
-
// install polyfills here to ensure that browser support is correctly
|
|
419
|
-
// detected.
|
|
420
|
-
shaka.polyfill.installAll();
|
|
421
|
-
|
|
422
|
-
configureJasmineEnvironment();
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Load a script dynamically and await completion.
|
|
427
|
-
*
|
|
428
|
-
* @param {string} file
|
|
429
|
-
* @return {!Promise}
|
|
430
|
-
*/
|
|
431
|
-
function loadScript(file) {
|
|
432
|
-
return new Promise((resolve, reject) => {
|
|
433
|
-
const script = /** @type {!HTMLScriptElement} */(
|
|
434
|
-
document.createElement('script'));
|
|
435
|
-
script.defer = false;
|
|
436
|
-
script['async'] = false;
|
|
437
|
-
script.onload = resolve;
|
|
438
|
-
script.onerror = reject;
|
|
439
|
-
script.setAttribute('src', '/base/' + file);
|
|
440
|
-
document.head.appendChild(script);
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Load all test scripts and await completion.
|
|
446
|
-
*
|
|
447
|
-
* @return {!Promise}
|
|
448
|
-
*/
|
|
449
|
-
function loadTests() {
|
|
450
|
-
const loadPromises = [];
|
|
451
|
-
for (const file of getClientArg('testFiles')) {
|
|
452
|
-
loadPromises.push(loadScript(file));
|
|
453
|
-
}
|
|
454
|
-
return Promise.all(loadPromises);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
// Hijack Karma's start() method and start things our way.
|
|
458
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
459
|
-
const originalStart = window.__karma__.start.bind(window.__karma__);
|
|
460
|
-
window.__karma__.start = async () => {
|
|
461
|
-
// Executed when Karma has finished loading everything it loads for us.
|
|
462
|
-
// Those things were all loaded in parallel, and had no interdependencies
|
|
463
|
-
// other than those in the Shaka Player library, tracked by the Closure
|
|
464
|
-
// library's goog.require/goog.provide.
|
|
465
|
-
|
|
466
|
-
// Now we load the tests from here, rather than letting Karma do it. This
|
|
467
|
-
// give us control over the order, so that everything else is loaded and
|
|
468
|
-
// complete before any tests are requested. Then we may reference test
|
|
469
|
-
// utilities and library namespaces in the body of describe() blocks, which
|
|
470
|
-
// are executed synchronously as the test scripts are loaded. Without this
|
|
471
|
-
// ordering, we would have to either:
|
|
472
|
-
// 1. very carefully avoid references in describe() and defer them to
|
|
473
|
-
// beforeAll()
|
|
474
|
-
// or 2. strictly adopt goog.provide/goog.require throughout our tests
|
|
475
|
-
// In those scenarios, failure to do so would only manifest some of the time
|
|
476
|
-
// and on certain platforms. So this seems to be the more robust solution.
|
|
477
|
-
|
|
478
|
-
// See https://github.com/shaka-project/shaka-player/issues/4094
|
|
479
|
-
|
|
480
|
-
try {
|
|
481
|
-
setupTestEnvironment();
|
|
482
|
-
console.log('Set up test environment.');
|
|
483
|
-
await loadTests();
|
|
484
|
-
console.log('Loaded all tests.');
|
|
485
|
-
|
|
486
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
487
|
-
} catch (error) {
|
|
488
|
-
console.error('Error during setup:', error);
|
|
489
|
-
window.__karma__.error(error);
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// Finally, start the tests.
|
|
494
|
-
originalStart();
|
|
495
|
-
};
|