shaka-player 4.4.3 → 4.6.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/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/workflows/release-please.yaml +2 -27
- package/AUTHORS +2 -0
- package/CHANGELOG.md +156 -39
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTORS +2 -0
- package/README.md +54 -42
- package/demo/asset_card.js +18 -21
- package/demo/cast_receiver/index.html +0 -1
- package/demo/close_button.js +0 -3
- package/demo/common/asset.js +33 -22
- package/demo/common/assets.js +249 -60
- package/demo/config.js +219 -253
- package/demo/custom.js +88 -133
- package/demo/front.js +7 -10
- package/demo/index.html +19 -22
- package/demo/input.js +6 -11
- package/demo/input_container.js +8 -9
- package/demo/main.js +62 -126
- package/demo/search.js +29 -34
- package/demo/service_worker.js +0 -3
- package/demo/tooltip.js +3 -5
- package/demo/visualizer.js +3 -5
- package/demo/visualizer_button.js +1 -20
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +211 -228
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +211 -228
- package/dist/demo.compiled.map +4 -4
- package/dist/deps.js +42 -37
- package/dist/locales.js +34 -30
- package/dist/receiver.compiled.debug.js +64 -77
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +64 -77
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +343 -151
- package/dist/shaka-player.compiled.debug.d.ts +343 -151
- package/dist/shaka-player.compiled.debug.externs.js +356 -117
- package/dist/shaka-player.compiled.debug.js +952 -811
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +356 -117
- package/dist/shaka-player.compiled.js +1165 -1078
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +359 -153
- package/dist/shaka-player.ui.debug.d.ts +359 -153
- package/dist/shaka-player.ui.debug.externs.js +382 -117
- package/dist/shaka-player.ui.debug.js +1084 -918
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +382 -117
- package/dist/shaka-player.ui.js +1377 -1274
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/lcevc-integration.md +14 -14
- package/docs/tutorials/ad_monetization.md +54 -0
- package/docs/tutorials/basic-usage.md +2 -1
- package/docs/tutorials/errors.md +2 -1
- package/docs/tutorials/faq.md +27 -55
- package/docs/tutorials/index.json +2 -1
- package/docs/tutorials/lcevc.md +118 -0
- package/docs/tutorials/offline.md +10 -8
- package/docs/tutorials/plugins.md +5 -0
- package/docs/tutorials/ui-customization.md +17 -0
- package/docs/tutorials/ui.md +2 -1
- package/docs/tutorials/upgrade.md +3 -0
- package/externs/css_style_declaration.js +19 -0
- package/externs/lcevc.js +37 -13
- package/externs/managedmediasource.js +24 -0
- package/externs/media_remote.js +68 -0
- package/externs/mediatailor.js +193 -0
- package/externs/pictureinpicture.js +11 -0
- package/externs/shaka/abr_manager.js +6 -2
- package/externs/shaka/ads.js +27 -0
- package/externs/shaka/cea.js +7 -0
- package/externs/shaka/codecs.js +5 -3
- package/externs/shaka/manifest.js +31 -10
- package/externs/shaka/manifest_parser.js +24 -1
- package/externs/shaka/net.js +2 -2
- package/externs/shaka/offline.js +13 -2
- package/externs/shaka/player.js +65 -8
- package/externs/shaka/text.js +3 -1
- package/externs/shaka/transmuxer.js +1 -1
- package/karma.conf.js +7 -3
- package/lib/abr/simple_abr_manager.js +66 -9
- package/lib/ads/ad_manager.js +104 -50
- package/lib/ads/media_tailor_ad.js +297 -0
- package/lib/ads/media_tailor_ad_manager.js +839 -0
- package/lib/cast/cast_receiver.js +1 -1
- package/lib/cea/cea_decoder.js +28 -0
- package/lib/cea/dummy_caption_decoder.js +5 -0
- package/lib/cea/ts_cea_parser.js +15 -2
- package/lib/config/codec_switching_strategy.js +24 -0
- package/lib/dash/content_protection.js +120 -2
- package/lib/dash/dash_parser.js +322 -93
- package/lib/dash/mpd_utils.js +62 -37
- package/lib/dash/segment_base.js +17 -10
- package/lib/dash/segment_list.js +18 -9
- package/lib/dash/segment_template.js +122 -107
- package/lib/dependencies/all.js +8 -7
- package/lib/hls/hls_classes.js +28 -43
- package/lib/hls/hls_parser.js +798 -658
- package/lib/hls/hls_utils.js +64 -5
- package/lib/hls/manifest_text_parser.js +7 -11
- package/lib/lcevc/lcevc_dec.js +220 -0
- package/lib/media/adaptation_set.js +32 -14
- package/lib/media/adaptation_set_criteria.js +86 -16
- package/lib/media/closed_caption_parser.js +13 -0
- package/lib/media/content_workarounds.js +6 -0
- package/lib/media/drm_engine.js +8 -13
- package/lib/media/manifest_parser.js +8 -113
- package/lib/media/media_source_capabilities.js +10 -3
- package/lib/media/media_source_engine.js +286 -44
- package/lib/media/play_rate_controller.js +8 -38
- package/lib/media/presentation_timeline.js +7 -1
- package/lib/media/quality_observer.js +1 -1
- package/lib/media/segment_index.js +6 -6
- package/lib/media/segment_prefetch.js +92 -24
- package/lib/media/segment_reference.js +73 -7
- package/lib/media/segment_utils.js +343 -0
- package/lib/media/stall_detector.js +0 -3
- package/lib/media/streaming_engine.js +73 -38
- package/lib/mss/mss_parser.js +19 -2
- package/lib/net/networking_engine.js +67 -12
- package/lib/net/networking_utils.js +95 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +3 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +3 -0
- package/lib/offline/manifest_converter.js +3 -0
- package/lib/offline/offline_manifest_parser.js +10 -0
- package/lib/offline/storage.js +14 -7
- package/lib/player.js +1098 -1537
- package/lib/polyfill/mediasource.js +22 -1
- package/lib/text/cue.js +15 -0
- package/lib/text/mp4_ttml_parser.js +2 -2
- package/lib/text/srt_text_parser.js +2 -2
- package/lib/text/stub_text_displayer.js +51 -0
- package/lib/text/text_engine.js +3 -2
- package/lib/text/ttml_text_parser.js +45 -5
- package/lib/text/ui_text_displayer.js +8 -0
- package/lib/text/vtt_text_parser.js +40 -22
- package/lib/transmuxer/aac_transmuxer.js +1 -1
- package/lib/transmuxer/ac3_transmuxer.js +1 -1
- package/lib/transmuxer/ec3_transmuxer.js +1 -1
- package/lib/transmuxer/h264.js +5 -4
- package/lib/transmuxer/h265.js +863 -0
- package/lib/transmuxer/mp3_transmuxer.js +1 -1
- package/lib/transmuxer/mpeg_ts_transmuxer.js +4 -3
- package/lib/transmuxer/mss_transmuxer.js +1 -1
- package/lib/transmuxer/ts_transmuxer.js +187 -22
- package/lib/util/buffer_utils.js +26 -4
- package/lib/util/content_steering_manager.js +358 -0
- package/lib/util/error.js +30 -15
- package/lib/util/exp_golomb.js +30 -2
- package/lib/util/fairplay_utils.js +1 -1
- package/lib/util/fake_event.js +8 -1
- package/lib/util/id3_utils.js +50 -1
- package/lib/util/manifest_parser_utils.js +12 -8
- package/lib/util/mp4_generator.js +6 -8
- package/lib/util/mutex.js +59 -0
- package/lib/util/object_utils.js +1 -1
- package/lib/util/periods.js +156 -179
- package/lib/util/platform.js +44 -3
- package/lib/util/player_configuration.js +43 -6
- package/lib/util/state_history.js +6 -2
- package/lib/util/stream_utils.js +206 -283
- package/lib/util/ts_parser.js +335 -98
- package/lib/util/uint8array_utils.js +5 -1
- package/lib/util/xml_utils.js +5 -0
- package/maintained-branches.md +3 -2
- package/package.json +4 -6
- package/roadmap.md +25 -5
- package/shaka-player.uncompiled.js +2 -2
- package/support.html +0 -1
- package/test/abr/simple_abr_manager_unit.js +33 -33
- package/test/ads/ad_manager_unit.js +3 -2
- package/test/cast/cast_receiver_integration.js +50 -4
- package/test/cast/cast_utils_unit.js +2 -0
- package/test/cea/cea_decoder_unit.js +7 -0
- package/test/codec_switching/codec_switching_integration.js +182 -0
- package/test/dash/dash_parser_content_protection_unit.js +2 -0
- package/test/dash/dash_parser_integration.js +74 -0
- package/test/dash/dash_parser_live_unit.js +2 -19
- package/test/dash/dash_parser_manifest_unit.js +536 -2
- package/test/dash/dash_parser_segment_base_unit.js +2 -0
- package/test/dash/dash_parser_segment_list_unit.js +2 -0
- package/test/dash/dash_parser_segment_template_unit.js +2 -0
- package/test/dash/mpd_utils_unit.js +61 -30
- package/test/demo/demo_unit.js +0 -16
- package/test/hls/hls_live_unit.js +14 -3
- package/test/hls/hls_parser_unit.js +385 -33
- package/test/hls/manifest_text_parser_unit.js +32 -99
- package/test/media/adaptation_set_criteria_unit.js +284 -15
- package/test/media/adaptation_set_unit.js +2 -0
- package/test/media/content_workarounds_unit.js +1 -1
- package/test/media/drm_engine_unit.js +3 -3
- package/test/media/media_source_engine_unit.js +166 -2
- package/test/media/play_rate_controller_unit.js +0 -48
- package/test/media/segment_index_unit.js +5 -4
- package/test/media/segment_prefetch_unit.js +1 -1
- package/test/media/streaming_engine_unit.js +17 -17
- package/test/mss/mss_parser_unit.js +2 -0
- package/test/mss/mss_player_integration.js +3 -2
- package/test/net/networking_engine_unit.js +3 -3
- package/test/{media/manifest_parser_unit.js → net/networking_utils_unit.js} +2 -2
- package/test/offline/manifest_convert_unit.js +14 -0
- package/test/offline/offline_integration.js +2 -1
- package/test/offline/storage_integration.js +22 -13
- package/test/player_external.js +4 -2
- package/test/player_integration.js +15 -4
- package/test/player_load_graph_integration.js +47 -151
- package/test/player_src_equals_external.js +1 -0
- package/test/player_src_equals_integration.js +71 -4
- package/test/player_unit.js +182 -158
- 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 +18 -0
- package/test/test/assets/dash-aes-128/license +1 -0
- 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 +32 -0
- package/test/test/assets/dash-multi-codec/video_144p_108k_h264.mp4 +0 -0
- package/test/test/assets/hls-ts-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-h265/hevc.m3u8 +6 -0
- package/test/test/assets/hls-ts-h265/index.m3u8 +7 -0
- 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 +9 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/media.m3u8 +24 -0
- 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 +14 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/index.m3u8 +23 -0
- 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/util/dash_parser_util.js +4 -0
- package/test/test/util/fake_ad_manager.js +20 -0
- package/test/test/util/fake_media_source_engine.js +13 -2
- package/test/test/util/fake_networking_engine.js +9 -1
- package/test/test/util/fake_segment_prefetch.js +3 -0
- package/test/test/util/manifest_generator.js +11 -3
- package/test/test/util/manifest_parser_util.js +14 -2
- package/test/test/util/mss_parser_util.js +4 -0
- package/test/test/util/offline_utils.js +2 -0
- package/test/test/util/simple_fakes.js +2 -2
- package/test/test/util/streaming_engine_util.js +10 -4
- package/test/test/util/test_scheme.js +6 -0
- package/test/test/util/ui_utils.js +4 -3
- package/test/text/mp4_ttml_parser_unit.js +4 -4
- package/test/text/srt_text_parser_unit.js +1 -1
- package/test/text/text_displayer_layout_unit.js +1 -1
- package/test/text/text_engine_unit.js +6 -0
- package/test/text/ttml_text_parser_unit.js +85 -2
- package/test/text/vtt_text_parser_unit.js +103 -31
- package/test/transmuxer/transmuxer_engine_integration.js +9 -0
- package/test/transmuxer/transmuxer_integration.js +150 -3
- package/test/ui/ad_ui_unit.js +2 -2
- package/test/ui/ui_customization_unit.js +17 -16
- package/test/ui/ui_integration.js +30 -20
- package/test/ui/ui_unit.js +28 -29
- package/test/util/buffer_utils_unit.js +1 -1
- package/test/util/content_steering_manager_unit.js +427 -0
- package/test/util/id3_utils_unit.js +52 -0
- package/test/util/stream_utils_unit.js +207 -169
- package/test/util/ts_parser_unit.js +3 -3
- package/third_party/closure-uri/uri.js +13 -1
- package/ui/audio_language_selection.js +9 -2
- package/ui/controls.js +125 -0
- package/ui/externs/ui.js +24 -2
- package/ui/language_utils.js +43 -8
- package/ui/less/range_elements.less +33 -0
- package/ui/locales/en.json +1 -0
- package/ui/locales/es-419.json +1 -0
- package/ui/locales/es.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/localization.js +10 -0
- package/ui/pip_button.js +22 -120
- package/ui/remote_button.js +203 -0
- package/ui/resolution_selection.js +47 -10
- package/ui/seek_bar.js +296 -3
- package/ui/text_selection.js +2 -1
- package/ui/ui.js +11 -4
- package/demo/common/message_ids.js +0 -309
- package/demo/locales/en.json +0 -288
- package/demo/locales/source.json +0 -1146
- package/externs/mux.js +0 -69
- package/lib/lcevc/lcevc_dil.js +0 -152
- package/lib/routing/node.js +0 -23
- package/lib/routing/payload.js +0 -43
- package/lib/routing/walker.js +0 -587
- package/lib/transmuxer/muxjs_transmuxer.js +0 -242
- package/test/routing/walker_unit.js +0 -504
- package/test/transmuxer/muxjs_transmuxer_integration.js +0 -177
package/demo/config.js
CHANGED
|
@@ -11,7 +11,6 @@ goog.require('goog.asserts');
|
|
|
11
11
|
goog.require('shakaDemo.BoolInput');
|
|
12
12
|
goog.require('shakaDemo.DatalistInput');
|
|
13
13
|
goog.require('shakaDemo.InputContainer');
|
|
14
|
-
goog.require('shakaDemo.MessageIds');
|
|
15
14
|
goog.require('shakaDemo.NumberInput');
|
|
16
15
|
goog.require('shakaDemo.SelectInput');
|
|
17
16
|
goog.require('shakaDemo.TextInput');
|
|
@@ -58,11 +57,6 @@ shakaDemo.Config = class {
|
|
|
58
57
|
// changes based on the config changes.
|
|
59
58
|
this.reloadAndSaveState_();
|
|
60
59
|
});
|
|
61
|
-
document.addEventListener('shaka-main-locale-changed', () => {
|
|
62
|
-
// Respond to them by remaking. This is to avoid triggering any config
|
|
63
|
-
// changes based on the config changes.
|
|
64
|
-
this.reloadAndSaveState_();
|
|
65
|
-
});
|
|
66
60
|
document.addEventListener('shaka-main-drawer-state-change', () => {
|
|
67
61
|
this.setContentAvailability_(shakaDemoMain.getIsDrawerOpen());
|
|
68
62
|
});
|
|
@@ -94,8 +88,7 @@ shakaDemo.Config = class {
|
|
|
94
88
|
this.addStreamingSection_();
|
|
95
89
|
this.addMediaSourceSection_();
|
|
96
90
|
this.addManifestSection_();
|
|
97
|
-
this.addRetrictionsSection_('',
|
|
98
|
-
shakaDemo.MessageIds.RESTRICTIONS_SECTION_HEADER);
|
|
91
|
+
this.addRetrictionsSection_('', 'Restrictions');
|
|
99
92
|
this.addCmcdSection_();
|
|
100
93
|
this.addLcevcSection_();
|
|
101
94
|
this.addAdsSection_();
|
|
@@ -123,22 +116,21 @@ shakaDemo.Config = class {
|
|
|
123
116
|
|
|
124
117
|
/** @private */
|
|
125
118
|
addDrmSection_() {
|
|
126
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
127
119
|
const docLink = this.resolveExternLink_('.DrmConfiguration');
|
|
128
|
-
this.addSection_(
|
|
129
|
-
.addBoolInput_(
|
|
120
|
+
this.addSection_('DRM', docLink)
|
|
121
|
+
.addBoolInput_('Delay License Request Until Played',
|
|
130
122
|
'drm.delayLicenseRequestUntilPlayed')
|
|
131
|
-
.addBoolInput_(
|
|
132
|
-
|
|
133
|
-
.addNumberInput_(MessageIds.UPDATE_EXPIRATION_TIME,
|
|
123
|
+
.addBoolInput_('Log license exchange data', 'drm.logLicenseExchange')
|
|
124
|
+
.addNumberInput_('Update expiration time',
|
|
134
125
|
'drm.updateExpirationTime',
|
|
135
126
|
/* canBeDecimal= */ true,
|
|
136
127
|
/* canBeZero= */ false,
|
|
137
128
|
/* canBeUnset= */ true)
|
|
138
|
-
.addBoolInput_(
|
|
129
|
+
.addBoolInput_('Parse inband "pssh" from media segments',
|
|
139
130
|
'drm.parseInbandPsshEnabled')
|
|
140
|
-
.addTextInput_(
|
|
141
|
-
|
|
131
|
+
.addTextInput_('Min HDCP version', 'drm.minHdcpVersion')
|
|
132
|
+
.addBoolInput_('Ignore duplicate init data',
|
|
133
|
+
'drm.ignoreDuplicateInitData');
|
|
142
134
|
const advanced = shakaDemoMain.getConfiguration().drm.advanced || {};
|
|
143
135
|
const addDRMAdvancedField = (name, valueName, suggestions) => {
|
|
144
136
|
// All advanced fields of a given type are set at once.
|
|
@@ -177,299 +169,266 @@ shakaDemo.Config = class {
|
|
|
177
169
|
const sessionTypeSuggestions = ['temporary', 'persistent-license'];
|
|
178
170
|
|
|
179
171
|
addDRMAdvancedField(
|
|
180
|
-
|
|
181
|
-
'videoRobustness',
|
|
182
|
-
robustnessSuggestions);
|
|
183
|
-
addDRMAdvancedField(
|
|
184
|
-
MessageIds.AUDIO_ROBUSTNESS,
|
|
185
|
-
'audioRobustness',
|
|
186
|
-
robustnessSuggestions);
|
|
172
|
+
'Video Robustness', 'videoRobustness', robustnessSuggestions);
|
|
187
173
|
addDRMAdvancedField(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
sessionTypeSuggestions);
|
|
174
|
+
'Audio Robustness', 'audioRobustness', robustnessSuggestions);
|
|
175
|
+
addDRMAdvancedField('Session Type', 'sessionType', sessionTypeSuggestions);
|
|
191
176
|
|
|
192
|
-
this.addRetrySection_('drm',
|
|
177
|
+
this.addRetrySection_('drm', 'DRM Retry Parameters');
|
|
193
178
|
}
|
|
194
179
|
|
|
195
180
|
/** @private */
|
|
196
181
|
addManifestSection_() {
|
|
197
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
198
182
|
const docLink = this.resolveExternLink_('.ManifestConfiguration');
|
|
199
|
-
this.addSection_(
|
|
200
|
-
.addBoolInput_(
|
|
201
|
-
|
|
202
|
-
.addBoolInput_(MessageIds.AUTO_CORRECT_DASH_DRIFT,
|
|
183
|
+
this.addSection_('Manifest', docLink)
|
|
184
|
+
.addBoolInput_('Ignore DASH DRM Info', 'manifest.dash.ignoreDrmInfo')
|
|
185
|
+
.addBoolInput_('Auto-Correct DASH Drift',
|
|
203
186
|
'manifest.dash.autoCorrectDrift')
|
|
204
|
-
.addBoolInput_(
|
|
187
|
+
.addBoolInput_('Disable Xlink processing',
|
|
205
188
|
'manifest.dash.disableXlinkProcessing')
|
|
206
|
-
.addBoolInput_(
|
|
189
|
+
.addBoolInput_('Xlink Should Fail Gracefully',
|
|
207
190
|
'manifest.dash.xlinkFailGracefully')
|
|
208
|
-
.addBoolInput_(
|
|
191
|
+
.addBoolInput_('Ignore DASH suggestedPresentationDelay',
|
|
209
192
|
'manifest.dash.ignoreSuggestedPresentationDelay')
|
|
210
|
-
.addBoolInput_(
|
|
193
|
+
.addBoolInput_('Ignore empty DASH AdaptationSets',
|
|
211
194
|
'manifest.dash.ignoreEmptyAdaptationSet')
|
|
212
|
-
.addBoolInput_(
|
|
195
|
+
.addBoolInput_('Ignore DASH maxSegmentDuration',
|
|
213
196
|
'manifest.dash.ignoreMaxSegmentDuration')
|
|
214
|
-
.addBoolInput_(
|
|
197
|
+
.addBoolInput_('Ignore HLS Text Stream Failures',
|
|
215
198
|
'manifest.hls.ignoreTextStreamFailures')
|
|
216
|
-
.addBoolInput_(
|
|
199
|
+
.addBoolInput_('Ignore HLS Image Stream Failures',
|
|
217
200
|
'manifest.hls.ignoreImageStreamFailures')
|
|
218
|
-
.addTextInput_(
|
|
219
|
-
|
|
220
|
-
.
|
|
221
|
-
'manifest.hls.defaultVideoCodec')
|
|
222
|
-
.addBoolInput_(MessageIds.IGNORE_MANIFEST_PROGRAM_DATE_TIME,
|
|
201
|
+
.addTextInput_('Default Audio Codec', 'manifest.hls.defaultAudioCodec')
|
|
202
|
+
.addTextInput_('Default Video Codec', 'manifest.hls.defaultVideoCodec')
|
|
203
|
+
.addBoolInput_('Ignore Program Date Time from manifest',
|
|
223
204
|
'manifest.hls.ignoreManifestProgramDateTime')
|
|
224
|
-
.addBoolInput_(
|
|
205
|
+
.addBoolInput_('Use Safari behavior for live',
|
|
225
206
|
'manifest.hls.useSafariBehaviorForLive')
|
|
226
|
-
.addNumberInput_(
|
|
207
|
+
.addNumberInput_('Live segments delay',
|
|
227
208
|
'manifest.hls.liveSegmentsDelay')
|
|
228
|
-
.addBoolInput_(
|
|
229
|
-
|
|
230
|
-
.addBoolInput_(MessageIds.IGNORE_MANIFEST_TIMESTAMPS_IN_SEGMENTS_MODE,
|
|
209
|
+
.addBoolInput_('Enable HLS sequence mode', 'manifest.hls.sequenceMode')
|
|
210
|
+
.addBoolInput_('Ignore Manifest Timestamps in Segments Mode',
|
|
231
211
|
'manifest.hls.ignoreManifestTimestampsInSegmentsMode')
|
|
232
|
-
.
|
|
212
|
+
.addBoolInput_('Disable codec guessing',
|
|
213
|
+
'manifest.hls.disableCodecGuessing')
|
|
214
|
+
.addBoolInput_('Allow LL-HLS byterange optimization',
|
|
215
|
+
'manifest.hls.allowLowLatencyByteRangeOptimization')
|
|
216
|
+
.addNumberInput_('Availability Window Override',
|
|
233
217
|
'manifest.availabilityWindowOverride',
|
|
234
218
|
/* canBeDecimal= */ true,
|
|
235
219
|
/* canBeZero= */ false,
|
|
236
220
|
/* canBeUnset= */ true)
|
|
237
|
-
.addTextInput_(
|
|
238
|
-
.addNumberInput_(
|
|
221
|
+
.addTextInput_('Clock Sync URI', 'manifest.dash.clockSyncUri')
|
|
222
|
+
.addNumberInput_('Default Presentation Delay',
|
|
239
223
|
'manifest.defaultPresentationDelay')
|
|
240
|
-
.addBoolInput_(
|
|
224
|
+
.addBoolInput_('Enable Audio Groups', 'manifest.dash.enableAudioGroups')
|
|
225
|
+
.addBoolInput_('Ignore Min Buffer Time',
|
|
241
226
|
'manifest.dash.ignoreMinBufferTime')
|
|
242
|
-
.addNumberInput_(
|
|
227
|
+
.addNumberInput_('Initial Segment Limit',
|
|
243
228
|
'manifest.dash.initialSegmentLimit',
|
|
244
229
|
/* canBeDecimal= */ false,
|
|
245
230
|
/* canBeZero= */ false,
|
|
246
231
|
/* canBeUnset= */ true)
|
|
247
|
-
.addBoolInput_(
|
|
232
|
+
.addBoolInput_('Enable DASH sequence mode',
|
|
248
233
|
'manifest.dash.sequenceMode')
|
|
249
|
-
.addBoolInput_(
|
|
250
|
-
|
|
251
|
-
.addBoolInput_(
|
|
252
|
-
|
|
253
|
-
.addBoolInput_(
|
|
254
|
-
'manifest.disableText')
|
|
255
|
-
.addBoolInput_(MessageIds.DISABLE_THUMBNAILS,
|
|
256
|
-
'manifest.disableThumbnails')
|
|
257
|
-
.addBoolInput_(MessageIds.SEGMENT_RELATIVE_VTT_TIMING,
|
|
234
|
+
.addBoolInput_('Disable Audio', 'manifest.disableAudio')
|
|
235
|
+
.addBoolInput_('Disable Video', 'manifest.disableVideo')
|
|
236
|
+
.addBoolInput_('Disable Text', 'manifest.disableText')
|
|
237
|
+
.addBoolInput_('Disable Thumbnails', 'manifest.disableThumbnails')
|
|
238
|
+
.addBoolInput_('Enable segment-relative VTT Timing',
|
|
258
239
|
'manifest.segmentRelativeVttTiming')
|
|
259
|
-
.addBoolInput_(
|
|
260
|
-
'manifest.mss.sequenceMode');
|
|
240
|
+
.addBoolInput_('Enable MSS sequence mode', 'manifest.mss.sequenceMode');
|
|
261
241
|
|
|
262
|
-
this.addRetrySection_('manifest',
|
|
242
|
+
this.addRetrySection_('manifest', 'Manifest Retry Parameters');
|
|
263
243
|
}
|
|
264
244
|
|
|
265
245
|
/** @private */
|
|
266
246
|
addAbrSection_() {
|
|
267
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
268
247
|
const docLink = this.resolveExternLink_('.AbrConfiguration');
|
|
269
|
-
this.addSection_(
|
|
270
|
-
.addBoolInput_(
|
|
271
|
-
.addBoolInput_(
|
|
248
|
+
this.addSection_('Adaptation', docLink)
|
|
249
|
+
.addBoolInput_('Enabled', 'abr.enabled')
|
|
250
|
+
.addBoolInput_('Use Network Information API',
|
|
272
251
|
'abr.useNetworkInformation')
|
|
273
|
-
.addNumberInput_(
|
|
252
|
+
.addNumberInput_('Default Bandwidth EstimatZ',
|
|
274
253
|
'abr.defaultBandwidthEstimate')
|
|
275
|
-
.addNumberInput_(
|
|
254
|
+
.addNumberInput_('Bandwidth Downgrade Target',
|
|
276
255
|
'abr.bandwidthDowngradeTarget',
|
|
277
256
|
/* canBeDecimal= */ true)
|
|
278
|
-
.addNumberInput_(
|
|
257
|
+
.addNumberInput_('Bandwidth Upgrade Target',
|
|
279
258
|
'abr.bandwidthUpgradeTarget',
|
|
280
259
|
/* canBeDecimal= */ true)
|
|
281
|
-
.addNumberInput_(
|
|
282
|
-
'abr.switchInterval',
|
|
260
|
+
.addNumberInput_('Switch Interval', 'abr.switchInterval',
|
|
283
261
|
/* canBeDecimal= */ true)
|
|
284
|
-
.addNumberInput_(
|
|
285
|
-
|
|
286
|
-
.addNumberInput_(
|
|
287
|
-
'abr.advanced.minBytes')
|
|
288
|
-
.addNumberInput_(MessageIds.FAST_HALF_LIFE,
|
|
289
|
-
'abr.advanced.fastHalfLife',
|
|
262
|
+
.addNumberInput_('Min total Bytes', 'abr.advanced.minTotalBytes')
|
|
263
|
+
.addNumberInput_('Min Bytes', 'abr.advanced.minBytes')
|
|
264
|
+
.addNumberInput_('Fast half life', 'abr.advanced.fastHalfLife',
|
|
290
265
|
/* canBeDecimal= */ true)
|
|
291
|
-
.addNumberInput_(
|
|
292
|
-
'abr.advanced.slowHalfLife',
|
|
266
|
+
.addNumberInput_('Slow half life', 'abr.advanced.slowHalfLife',
|
|
293
267
|
/* canBeDecimal= */ true)
|
|
294
|
-
.addBoolInput_(
|
|
295
|
-
|
|
296
|
-
.addBoolInput_(
|
|
297
|
-
'abr.restrictToScreenSize')
|
|
298
|
-
.addBoolInput_(MessageIds.IGNORE_DEVICE_PIXEL_RATIO,
|
|
268
|
+
.addBoolInput_('Restrict to element size', 'abr.restrictToElementSize')
|
|
269
|
+
.addBoolInput_('Restrict to screen size', 'abr.restrictToScreenSize')
|
|
270
|
+
.addBoolInput_('Ignore device pixel ratio',
|
|
299
271
|
'abr.ignoreDevicePixelRatio')
|
|
300
|
-
.addBoolInput_(
|
|
272
|
+
.addBoolInput_('Clear video buffer on abr rendition switch',
|
|
301
273
|
'abr.clearBufferSwitch')
|
|
302
|
-
.addNumberInput_(
|
|
274
|
+
.addNumberInput_('Safe margin on abr switch rendition',
|
|
303
275
|
'abr.safeMarginSwitch',
|
|
304
276
|
/* canBeDecimal= */ true);
|
|
305
|
-
this.addRetrictionsSection_('abr',
|
|
306
|
-
MessageIds.ADAPTATION_RESTRICTIONS_SECTION_HEADER);
|
|
277
|
+
this.addRetrictionsSection_('abr', 'Adaptation Restrictions');
|
|
307
278
|
}
|
|
308
279
|
|
|
309
280
|
/** @private */
|
|
310
281
|
addCmcdSection_() {
|
|
311
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
312
282
|
const docLink = this.resolveExternLink_('.CmcdConfiguration');
|
|
313
|
-
this.addSection_(
|
|
314
|
-
.addBoolInput_(
|
|
315
|
-
.addTextInput_(
|
|
316
|
-
.addTextInput_(
|
|
317
|
-
.addBoolInput_(
|
|
283
|
+
this.addSection_('CMCD', docLink)
|
|
284
|
+
.addBoolInput_('Enabled', 'cmcd.enabled')
|
|
285
|
+
.addTextInput_('Session ID', 'cmcd.sessionId')
|
|
286
|
+
.addTextInput_('Content ID', 'cmcd.contentId')
|
|
287
|
+
.addBoolInput_('Use Headers', 'cmcd.useHeaders');
|
|
318
288
|
}
|
|
319
289
|
|
|
320
290
|
/** @private */
|
|
321
291
|
addLcevcSection_() {
|
|
322
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
323
292
|
const docLink = this.resolveExternLink_('.LcevcConfiguration');
|
|
324
|
-
this.addSection_(
|
|
325
|
-
.addBoolInput_(
|
|
326
|
-
.addBoolInput_(
|
|
293
|
+
this.addSection_('MPEG-5 Part-2 LCEVC', docLink)
|
|
294
|
+
.addBoolInput_('Enabled', 'lcevc.enabled')
|
|
295
|
+
.addBoolInput_('LCEVC Dynamic Performance scaling',
|
|
327
296
|
'lcevc.dynamicPerformanceScaling')
|
|
328
|
-
.addNumberInput_(
|
|
329
|
-
.addBoolInput_(
|
|
297
|
+
.addNumberInput_('LCEVC Log Level', 'lcevc.logLevel')
|
|
298
|
+
.addBoolInput_('Draw LCEVC Logo', 'lcevc.drawLogo');
|
|
330
299
|
}
|
|
331
300
|
|
|
332
301
|
/** @private */
|
|
333
302
|
addAdsSection_() {
|
|
334
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
335
303
|
const docLink = this.resolveExternLink_('.AdsConfiguration');
|
|
336
|
-
this.addSection_(
|
|
337
|
-
.addBoolInput_(
|
|
304
|
+
this.addSection_('Ads', docLink)
|
|
305
|
+
.addBoolInput_('Custom playhead tracker',
|
|
338
306
|
'ads.customPlayheadTracker');
|
|
339
307
|
}
|
|
340
308
|
|
|
341
309
|
/**
|
|
342
310
|
* @param {string} category
|
|
343
|
-
* @param {
|
|
311
|
+
* @param {string} sectionName
|
|
344
312
|
* @private
|
|
345
313
|
*/
|
|
346
314
|
addRetrictionsSection_(category, sectionName) {
|
|
347
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
348
315
|
const prefix = (category ? category + '.' : '') + 'restrictions.';
|
|
349
316
|
const docLink = this.resolveExternLink_('.Restrictions');
|
|
350
317
|
this.addSection_(sectionName, docLink)
|
|
351
|
-
.addNumberInput_(
|
|
352
|
-
.addNumberInput_(
|
|
353
|
-
.addNumberInput_(
|
|
354
|
-
.addNumberInput_(
|
|
355
|
-
.addNumberInput_(
|
|
356
|
-
.addNumberInput_(
|
|
357
|
-
.addNumberInput_(
|
|
358
|
-
.addNumberInput_(
|
|
359
|
-
.addNumberInput_(
|
|
360
|
-
.addNumberInput_(
|
|
318
|
+
.addNumberInput_('Min Width', prefix + 'minWidth')
|
|
319
|
+
.addNumberInput_('Max Width', prefix + 'maxWidth')
|
|
320
|
+
.addNumberInput_('Min Height', prefix + 'minHeight')
|
|
321
|
+
.addNumberInput_('Max Height', prefix + 'maxHeight')
|
|
322
|
+
.addNumberInput_('Min Pixels', prefix + 'minPixels')
|
|
323
|
+
.addNumberInput_('Max Pixels', prefix + 'maxPixels')
|
|
324
|
+
.addNumberInput_('Min Framerate', prefix + 'minFrameRate')
|
|
325
|
+
.addNumberInput_('Max Framerate', prefix + 'maxFrameRate')
|
|
326
|
+
.addNumberInput_('Min Bandwidth', prefix + 'minBandwidth')
|
|
327
|
+
.addNumberInput_('Max Bandwidth', prefix + 'maxBandwidth');
|
|
361
328
|
}
|
|
362
329
|
|
|
363
330
|
/**
|
|
364
331
|
* @param {string} category
|
|
365
|
-
* @param {
|
|
332
|
+
* @param {string} sectionName
|
|
366
333
|
* @private
|
|
367
334
|
*/
|
|
368
335
|
addRetrySection_(category, sectionName) {
|
|
369
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
370
336
|
const prefix = category + '.retryParameters.';
|
|
371
337
|
const docLink = this.resolveExternLink_('.RetryParameters');
|
|
372
338
|
this.addSection_(sectionName, docLink)
|
|
373
|
-
.addNumberInput_(
|
|
374
|
-
.addNumberInput_(
|
|
339
|
+
.addNumberInput_('Max Attempts', prefix + 'maxAttempts')
|
|
340
|
+
.addNumberInput_('Base Delay', prefix + 'baseDelay',
|
|
375
341
|
/* canBeDecimal= */ true)
|
|
376
|
-
.addNumberInput_(
|
|
342
|
+
.addNumberInput_('Backoff Factor', prefix + 'backoffFactor',
|
|
377
343
|
/* canBeDecimal= */ true)
|
|
378
|
-
.addNumberInput_(
|
|
344
|
+
.addNumberInput_('Fuzz Factor', prefix + 'fuzzFactor',
|
|
379
345
|
/* canBeDecimal= */ true)
|
|
380
|
-
.addNumberInput_(
|
|
346
|
+
.addNumberInput_('Timeout Factor', prefix + 'timeout',
|
|
381
347
|
/* canBeDecimal= */ true)
|
|
382
|
-
.addNumberInput_(
|
|
348
|
+
.addNumberInput_('Stall Timeout', prefix + 'stallTimeout',
|
|
383
349
|
/* canBeDecimal= */ true)
|
|
384
|
-
.addNumberInput_(
|
|
385
|
-
prefix + 'connectionTimeout',
|
|
350
|
+
.addNumberInput_('Connection Timeout', prefix + 'connectionTimeout',
|
|
386
351
|
/* canBeDecimal= */ true);
|
|
387
352
|
}
|
|
388
353
|
|
|
389
354
|
/** @private */
|
|
390
355
|
addOfflineSection_() {
|
|
391
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
392
356
|
const docLink = this.resolveExternLink_('.OfflineConfiguration');
|
|
393
|
-
this.addSection_(
|
|
394
|
-
.addBoolInput_(
|
|
357
|
+
this.addSection_('Offline', docLink)
|
|
358
|
+
.addBoolInput_('Use Persistent Licenses',
|
|
395
359
|
'offline.usePersistentLicense')
|
|
396
|
-
.addNumberInput_(
|
|
360
|
+
.addNumberInput_('Number of Parallel Downloads',
|
|
397
361
|
'offline.numberOfParallelDownloads');
|
|
398
362
|
}
|
|
399
363
|
|
|
400
364
|
/** @private */
|
|
401
365
|
addStreamingSection_() {
|
|
402
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
403
366
|
const docLink = this.resolveExternLink_('.StreamingConfiguration');
|
|
404
|
-
this.addSection_(
|
|
405
|
-
.addNumberInput_(
|
|
367
|
+
this.addSection_('Streaming', docLink)
|
|
368
|
+
.addNumberInput_('Gap detection threshold',
|
|
406
369
|
'streaming.gapDetectionThreshold',
|
|
407
370
|
/* canBeDecimal= */ true)
|
|
408
|
-
.addNumberInput_(
|
|
409
|
-
'streaming.gapJumpTimerTime',
|
|
371
|
+
.addNumberInput_('Gap Jump Timer Time', 'streaming.gapJumpTimerTime',
|
|
410
372
|
/* canBeDecimal= */ true)
|
|
411
|
-
.addNumberInput_(
|
|
412
|
-
'streaming.bufferingGoal',
|
|
373
|
+
.addNumberInput_('Buffering Goal', 'streaming.bufferingGoal',
|
|
413
374
|
/* canBeDecimal= */ true)
|
|
414
|
-
.addNumberInput_(
|
|
415
|
-
'streaming.durationBackoff',
|
|
375
|
+
.addNumberInput_('Duration Backoff', 'streaming.durationBackoff',
|
|
416
376
|
/* canBeDecimal= */ true)
|
|
417
|
-
.addNumberInput_(
|
|
418
|
-
'streaming.rebufferingGoal',
|
|
377
|
+
.addNumberInput_('Rebuffering Goal', 'streaming.rebufferingGoal',
|
|
419
378
|
/* canBeDecimal= */ true)
|
|
420
|
-
.addNumberInput_(
|
|
421
|
-
'streaming.bufferBehind',
|
|
379
|
+
.addNumberInput_('Buffer Behind', 'streaming.bufferBehind',
|
|
422
380
|
/* canBeDecimal= */ true)
|
|
423
|
-
.addNumberInput_(
|
|
424
|
-
'streaming.safeSeekOffset',
|
|
381
|
+
.addNumberInput_('Safe Seek Offset', 'streaming.safeSeekOffset',
|
|
425
382
|
/* canBeDecimal= */ true)
|
|
426
|
-
.addNumberInput_(
|
|
427
|
-
'streaming.stallThreshold',
|
|
383
|
+
.addNumberInput_('Stall Threshold', 'streaming.stallThreshold',
|
|
428
384
|
/* canBeDecimal= */ true)
|
|
429
|
-
.addNumberInput_(
|
|
430
|
-
'streaming.stallSkip',
|
|
385
|
+
.addNumberInput_('Safe Skip Distance', 'streaming.stallSkip',
|
|
431
386
|
/* canBeDecimal= */ true)
|
|
432
|
-
.addNumberInput_(
|
|
387
|
+
.addNumberInput_('Inaccurate Manifest Tolerance',
|
|
433
388
|
'streaming.inaccurateManifestTolerance',
|
|
434
389
|
/* canBeDecimal= */ true)
|
|
435
|
-
.addBoolInput_(
|
|
436
|
-
|
|
437
|
-
.addBoolInput_(
|
|
438
|
-
|
|
439
|
-
.addBoolInput_(MessageIds.FORCE_HTTPS,
|
|
440
|
-
'streaming.forceHTTPS')
|
|
441
|
-
.addBoolInput_(MessageIds.PREFER_NATIVE_HLS,
|
|
390
|
+
.addBoolInput_('Low Latency Mode', 'streaming.lowLatencyMode')
|
|
391
|
+
.addBoolInput_('Auto Low Latency Mode', 'streaming.autoLowLatencyMode')
|
|
392
|
+
.addBoolInput_('Force HTTPS', 'streaming.forceHTTPS')
|
|
393
|
+
.addBoolInput_('Prefer native HLS playback when available',
|
|
442
394
|
'streaming.preferNativeHls')
|
|
443
|
-
.addNumberInput_(
|
|
395
|
+
.addNumberInput_('Update interval seconds',
|
|
444
396
|
'streaming.updateIntervalSeconds',
|
|
445
397
|
/* canBeDecimal= */ true)
|
|
446
|
-
.addBoolInput_(
|
|
398
|
+
.addBoolInput_('Dispatch all emsg boxes',
|
|
447
399
|
'streaming.dispatchAllEmsgBoxes')
|
|
448
|
-
.addBoolInput_(
|
|
400
|
+
.addBoolInput_('Observe media quality changes',
|
|
449
401
|
'streaming.observeQualityChanges')
|
|
450
|
-
.addNumberInput_(
|
|
402
|
+
.addNumberInput_('Max Variant Disabled Time',
|
|
451
403
|
'streaming.maxDisabledTime')
|
|
452
|
-
.addNumberInput_(
|
|
404
|
+
.addNumberInput_('Segment Prefetch Limit',
|
|
453
405
|
'streaming.segmentPrefetchLimit')
|
|
454
|
-
.addBoolInput_(
|
|
455
|
-
|
|
456
|
-
.addNumberInput_(MessageIds.LIVE_SYNC_MAX_LATENCY,
|
|
406
|
+
.addBoolInput_('Live Sync', 'streaming.liveSync')
|
|
407
|
+
.addNumberInput_('Max latency for live sync',
|
|
457
408
|
'streaming.liveSyncMaxLatency',
|
|
458
409
|
/* canBeDecimal= */ true,
|
|
459
410
|
/* canBeZero= */ true)
|
|
460
|
-
.addNumberInput_(
|
|
411
|
+
.addNumberInput_('Playback rate for live sync',
|
|
461
412
|
'streaming.liveSyncPlaybackRate',
|
|
462
413
|
/* canBeDecimal= */ true,
|
|
414
|
+
/* canBeZero= */ false)
|
|
415
|
+
.addNumberInput_('Min latency for live sync',
|
|
416
|
+
'streaming.liveSyncMinLatency',
|
|
417
|
+
/* canBeDecimal= */ true,
|
|
418
|
+
/* canBeZero= */ true)
|
|
419
|
+
.addNumberInput_('Min playback rate for live sync',
|
|
420
|
+
'streaming.liveSyncMinPlaybackRate',
|
|
421
|
+
/* canBeDecimal= */ true,
|
|
463
422
|
/* canBeZero= */ false);
|
|
464
423
|
|
|
465
424
|
if (!shakaDemoMain.getNativeControlsEnabled()) {
|
|
466
|
-
this.addBoolInput_(
|
|
467
|
-
'streaming.alwaysStreamText');
|
|
425
|
+
this.addBoolInput_('Always Stream Text', 'streaming.alwaysStreamText');
|
|
468
426
|
} else {
|
|
469
427
|
// Add a fake custom fixed "input" that warns the users not to change it.
|
|
470
428
|
const noop = (input) => {};
|
|
471
|
-
this.addCustomBoolInput_(
|
|
472
|
-
|
|
429
|
+
this.addCustomBoolInput_('Always Stream Text', noop,
|
|
430
|
+
'Text must always be streamed while native controls are enabled, ' +
|
|
431
|
+
'for captions to work.');
|
|
473
432
|
this.latestInput_.input().disabled = true;
|
|
474
433
|
this.latestInput_.input().checked = true;
|
|
475
434
|
}
|
|
@@ -481,65 +440,79 @@ shakaDemo.Config = class {
|
|
|
481
440
|
'PQ': 'PQ',
|
|
482
441
|
'HLG': 'HLG',
|
|
483
442
|
};
|
|
484
|
-
const localize = (name) => shakaDemoMain.getLocalizedString(name);
|
|
485
443
|
const hdrLevelNames = {
|
|
486
|
-
'AUTO':
|
|
487
|
-
'SDR':
|
|
488
|
-
'PQ':
|
|
489
|
-
'HLG':
|
|
490
|
-
'':
|
|
444
|
+
'AUTO': 'Auto Detect',
|
|
445
|
+
'SDR': 'SDR',
|
|
446
|
+
'PQ': 'PQ',
|
|
447
|
+
'HLG': 'HLG',
|
|
448
|
+
'': 'No Preference',
|
|
491
449
|
};
|
|
492
|
-
this.addSelectInput_(
|
|
450
|
+
this.addSelectInput_('Preferred HDR Level', 'preferredVideoHdrLevel',
|
|
493
451
|
hdrLevels, hdrLevelNames);
|
|
494
452
|
|
|
495
|
-
|
|
453
|
+
const videoLayouts = {
|
|
454
|
+
'': '',
|
|
455
|
+
'CH-STEREO': 'CH-STEREO',
|
|
456
|
+
'CH-MONO': 'CH-MONO',
|
|
457
|
+
};
|
|
458
|
+
const videoLayoutsNames = {
|
|
459
|
+
'CH-STEREO': 'Stereoscopic',
|
|
460
|
+
'CH-MONO': 'Monoscopic',
|
|
461
|
+
'': 'No Preference',
|
|
462
|
+
};
|
|
463
|
+
this.addSelectInput_('Preferred video layout', 'preferredVideoLayout',
|
|
464
|
+
videoLayouts, videoLayoutsNames);
|
|
465
|
+
|
|
466
|
+
this.addBoolInput_('Start At Segment Boundary',
|
|
496
467
|
'streaming.startAtSegmentBoundary')
|
|
497
|
-
.addBoolInput_(
|
|
468
|
+
.addBoolInput_('Ignore Text Stream Failures',
|
|
498
469
|
'streaming.ignoreTextStreamFailures')
|
|
499
|
-
.addBoolInput_(
|
|
500
|
-
|
|
501
|
-
.addBoolInput_(MessageIds.USE_NATIVE_HLS_SAFARI,
|
|
470
|
+
.addBoolInput_('Stall Detector Enabled', 'streaming.stallEnabled')
|
|
471
|
+
.addBoolInput_('Use native HLS on Safari',
|
|
502
472
|
'streaming.useNativeHlsOnSafari');
|
|
503
|
-
this.addRetrySection_('streaming',
|
|
504
|
-
MessageIds.STREAMING_RETRY_SECTION_HEADER);
|
|
473
|
+
this.addRetrySection_('streaming', 'Streaming Retry Parameters');
|
|
505
474
|
}
|
|
506
475
|
|
|
507
476
|
/** @private */
|
|
508
477
|
addMediaSourceSection_() {
|
|
509
|
-
const
|
|
478
|
+
const strategyOptions = shaka.config.CodecSwitchingStrategy;
|
|
479
|
+
const strategyOptionsNames = {
|
|
480
|
+
'RELOAD': 'reload',
|
|
481
|
+
'SMOOTH': 'smooth',
|
|
482
|
+
};
|
|
483
|
+
|
|
510
484
|
const docLink = this.resolveExternLink_('.MediaSourceConfiguration');
|
|
511
|
-
this.addSection_(
|
|
512
|
-
.addTextInput_(
|
|
485
|
+
this.addSection_('Media source', docLink)
|
|
486
|
+
.addTextInput_('Source buffer extra features',
|
|
513
487
|
'mediaSource.sourceBufferExtraFeatures')
|
|
514
|
-
.addBoolInput_(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
488
|
+
.addBoolInput_('Force Transmux', 'mediaSource.forceTransmux')
|
|
489
|
+
.addBoolInput_('Insert fake encryption in init segments when needed ' +
|
|
490
|
+
'by the platform.', 'mediaSource.insertFakeEncryptionInInit')
|
|
491
|
+
.addSelectInput_(
|
|
492
|
+
'Codec Switching Strategy',
|
|
493
|
+
'mediaSource.codecSwitchingStrategy',
|
|
494
|
+
strategyOptions,
|
|
495
|
+
strategyOptionsNames);
|
|
518
496
|
}
|
|
519
497
|
|
|
520
498
|
/** @private */
|
|
521
499
|
addLanguageSection_() {
|
|
522
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
523
500
|
const docLink = this.resolveExternLink_('.PlayerConfiguration');
|
|
524
501
|
|
|
525
502
|
const autoShowTextOptions = shaka.config.AutoShowText;
|
|
526
|
-
const localize = (name) => shakaDemoMain.getLocalizedString(name);
|
|
527
503
|
const autoShowTextOptionNames = {
|
|
528
|
-
'NEVER':
|
|
529
|
-
'ALWAYS':
|
|
530
|
-
'IF_PREFERRED_TEXT_LANGUAGE':
|
|
531
|
-
|
|
532
|
-
'IF_SUBTITLES_MAY_BE_NEEDED':
|
|
533
|
-
localize(MessageIds.AUTO_SHOW_TEXT_IF_SUBTITLES_MAY_BE_NEEDED),
|
|
504
|
+
'NEVER': 'Never',
|
|
505
|
+
'ALWAYS': 'Always',
|
|
506
|
+
'IF_PREFERRED_TEXT_LANGUAGE': 'If preferred text language',
|
|
507
|
+
'IF_SUBTITLES_MAY_BE_NEEDED': 'If subtitles may be needed',
|
|
534
508
|
};
|
|
535
509
|
|
|
536
|
-
this.addSection_(
|
|
537
|
-
.addTextInput_(
|
|
538
|
-
.addTextInput_(
|
|
539
|
-
.addTextInput_(
|
|
540
|
-
.addTextInput_(
|
|
541
|
-
.addSelectInput_(
|
|
542
|
-
MessageIds.AUTO_SHOW_TEXT,
|
|
510
|
+
this.addSection_('Language', docLink)
|
|
511
|
+
.addTextInput_('Preferred Audio Language', 'preferredAudioLanguage')
|
|
512
|
+
.addTextInput_('Preferred Audio Label', 'preferredAudioLabel')
|
|
513
|
+
.addTextInput_('Preferred Text Language', 'preferredTextLanguage')
|
|
514
|
+
.addTextInput_('Preferred Text Role', 'preferredTextRole')
|
|
515
|
+
.addSelectInput_('Auto-Show Text',
|
|
543
516
|
'autoShowText',
|
|
544
517
|
autoShowTextOptions,
|
|
545
518
|
autoShowTextOptionNames);
|
|
@@ -547,20 +520,18 @@ shakaDemo.Config = class {
|
|
|
547
520
|
shakaDemoMain.setUILocale(input.value);
|
|
548
521
|
shakaDemoMain.remakeHash();
|
|
549
522
|
};
|
|
550
|
-
this.addCustomTextInput_(
|
|
523
|
+
this.addCustomTextInput_('Preferred UI Locale', onChange);
|
|
551
524
|
this.latestInput_.input().value = shakaDemoMain.getUILocale();
|
|
552
|
-
this.addNumberInput_(
|
|
525
|
+
this.addNumberInput_('Preferred Audio Channel Count',
|
|
553
526
|
'preferredAudioChannelCount');
|
|
554
|
-
this.addBoolInput_(
|
|
555
|
-
'preferForcedSubs');
|
|
527
|
+
this.addBoolInput_('Prefer Forced Subs', 'preferForcedSubs');
|
|
556
528
|
}
|
|
557
529
|
|
|
558
530
|
/** @private */
|
|
559
531
|
addMetaSection_() {
|
|
560
|
-
const MessageIds = shakaDemo.MessageIds;
|
|
561
532
|
this.addSection_(/* name= */ null, /* docLink= */ null);
|
|
562
533
|
|
|
563
|
-
this.addCustomBoolInput_(
|
|
534
|
+
this.addCustomBoolInput_('Shaka Controls', (input) => {
|
|
564
535
|
shakaDemoMain.setNativeControlsEnabled(!input.checked);
|
|
565
536
|
if (input.checked) {
|
|
566
537
|
// Forcibly set |streaming.alwaysStreamText| to true.
|
|
@@ -578,7 +549,7 @@ shakaDemo.Config = class {
|
|
|
578
549
|
}
|
|
579
550
|
|
|
580
551
|
if (!shakaDemoMain.getNativeControlsEnabled()) {
|
|
581
|
-
this.addCustomBoolInput_(
|
|
552
|
+
this.addCustomBoolInput_('Enabled Trick Play Controls', (input) => {
|
|
582
553
|
shakaDemoMain.setTrickPlayControlsEnabled(input.checked);
|
|
583
554
|
});
|
|
584
555
|
if (shakaDemoMain.getTrickPlayControlsEnabled()) {
|
|
@@ -587,8 +558,8 @@ shakaDemo.Config = class {
|
|
|
587
558
|
} else {
|
|
588
559
|
// Add a fake custom fixed "input" that warns the users not to change it.
|
|
589
560
|
const noop = (input) => {};
|
|
590
|
-
this.addCustomBoolInput_(
|
|
591
|
-
noop,
|
|
561
|
+
this.addCustomBoolInput_('Enabled Trick Play Controls',
|
|
562
|
+
noop, 'Trick Play controls require the Shaka UI.');
|
|
592
563
|
this.latestInput_.input().disabled = true;
|
|
593
564
|
this.latestInput_.input().checked = false;
|
|
594
565
|
}
|
|
@@ -608,12 +579,11 @@ shakaDemo.Config = class {
|
|
|
608
579
|
const Level = shaka['log']['Level'];
|
|
609
580
|
const setLevel = shaka['log']['setLevel'];
|
|
610
581
|
|
|
611
|
-
const localize = (name) => shakaDemoMain.getLocalizedString(name);
|
|
612
582
|
const logLevels = {
|
|
613
|
-
'info':
|
|
614
|
-
'debug':
|
|
615
|
-
'v':
|
|
616
|
-
'vv':
|
|
583
|
+
'info': 'Info',
|
|
584
|
+
'debug': 'Debug',
|
|
585
|
+
'v': 'Verbose',
|
|
586
|
+
'vv': 'Very Verbose',
|
|
617
587
|
};
|
|
618
588
|
const onChange = (input) => {
|
|
619
589
|
switch (input.value) {
|
|
@@ -632,7 +602,7 @@ shakaDemo.Config = class {
|
|
|
632
602
|
}
|
|
633
603
|
shakaDemoMain.remakeHash();
|
|
634
604
|
};
|
|
635
|
-
this.addCustomSelectInput_(
|
|
605
|
+
this.addCustomSelectInput_('Log Level', logLevels, onChange);
|
|
636
606
|
const input = this.latestInput_.input();
|
|
637
607
|
switch (shaka['log']['currentLevel']) {
|
|
638
608
|
case Level['DEBUG']:
|
|
@@ -660,7 +630,7 @@ shakaDemo.Config = class {
|
|
|
660
630
|
}
|
|
661
631
|
|
|
662
632
|
/**
|
|
663
|
-
* @param {?
|
|
633
|
+
* @param {?string} name
|
|
664
634
|
* @param {?string} docLink
|
|
665
635
|
* @return {!shakaDemo.Config}
|
|
666
636
|
* @private
|
|
@@ -676,9 +646,9 @@ shakaDemo.Config = class {
|
|
|
676
646
|
}
|
|
677
647
|
|
|
678
648
|
/**
|
|
679
|
-
* @param {
|
|
649
|
+
* @param {string} name
|
|
680
650
|
* @param {string} valueName
|
|
681
|
-
* @param {
|
|
651
|
+
* @param {string=} tooltipMessage
|
|
682
652
|
* @return {!shakaDemo.Config}
|
|
683
653
|
* @private
|
|
684
654
|
*/
|
|
@@ -695,24 +665,23 @@ shakaDemo.Config = class {
|
|
|
695
665
|
}
|
|
696
666
|
|
|
697
667
|
/**
|
|
698
|
-
* @param {
|
|
668
|
+
* @param {string} name
|
|
699
669
|
* @param {function(!HTMLInputElement)} onChange
|
|
700
|
-
* @param {
|
|
670
|
+
* @param {string=} tooltipMessage
|
|
701
671
|
* @return {!shakaDemo.Config}
|
|
702
672
|
* @private
|
|
703
673
|
*/
|
|
704
674
|
addCustomBoolInput_(name, onChange, tooltipMessage) {
|
|
705
675
|
this.createRow_(name, tooltipMessage);
|
|
706
|
-
const localized = shakaDemoMain.getLocalizedString(name);
|
|
707
676
|
this.latestInput_ = new shakaDemo.BoolInput(
|
|
708
|
-
this.getLatestSection_(),
|
|
677
|
+
this.getLatestSection_(), name, onChange);
|
|
709
678
|
return this;
|
|
710
679
|
}
|
|
711
680
|
|
|
712
681
|
/**
|
|
713
|
-
* @param {!
|
|
682
|
+
* @param {!string} name
|
|
714
683
|
* @param {string} valueName
|
|
715
|
-
* @param {
|
|
684
|
+
* @param {string=} tooltipMessage
|
|
716
685
|
* @return {!shakaDemo.Config}
|
|
717
686
|
* @private
|
|
718
687
|
*/
|
|
@@ -728,27 +697,26 @@ shakaDemo.Config = class {
|
|
|
728
697
|
}
|
|
729
698
|
|
|
730
699
|
/**
|
|
731
|
-
* @param {
|
|
700
|
+
* @param {string} name
|
|
732
701
|
* @param {function(!HTMLInputElement)} onChange
|
|
733
|
-
* @param {
|
|
702
|
+
* @param {string=} tooltipMessage
|
|
734
703
|
* @return {!shakaDemo.Config}
|
|
735
704
|
* @private
|
|
736
705
|
*/
|
|
737
706
|
addCustomTextInput_(name, onChange, tooltipMessage) {
|
|
738
707
|
this.createRow_(name, tooltipMessage);
|
|
739
|
-
const localized = shakaDemoMain.getLocalizedString(name);
|
|
740
708
|
this.latestInput_ = new shakaDemo.TextInput(
|
|
741
|
-
this.getLatestSection_(),
|
|
709
|
+
this.getLatestSection_(), name, onChange);
|
|
742
710
|
return this;
|
|
743
711
|
}
|
|
744
712
|
|
|
745
713
|
/**
|
|
746
|
-
* @param {
|
|
714
|
+
* @param {string} name
|
|
747
715
|
* @param {string} valueName
|
|
748
716
|
* @param {boolean=} canBeDecimal
|
|
749
717
|
* @param {boolean=} canBeZero
|
|
750
718
|
* @param {boolean=} canBeUnset
|
|
751
|
-
* @param {
|
|
719
|
+
* @param {string=} tooltipMessage
|
|
752
720
|
* @return {!shakaDemo.Config}
|
|
753
721
|
* @private
|
|
754
722
|
*/
|
|
@@ -778,9 +746,8 @@ shakaDemo.Config = class {
|
|
|
778
746
|
}
|
|
779
747
|
};
|
|
780
748
|
this.createRow_(name, tooltipMessage);
|
|
781
|
-
const localized = shakaDemoMain.getLocalizedString(name);
|
|
782
749
|
this.latestInput_ = new shakaDemo.NumberInput(
|
|
783
|
-
this.getLatestSection_(),
|
|
750
|
+
this.getLatestSection_(), name, onChange, canBeDecimal, canBeZero,
|
|
784
751
|
canBeUnset);
|
|
785
752
|
this.latestInput_.input().value =
|
|
786
753
|
shakaDemoMain.getCurrentConfigValue(valueName);
|
|
@@ -791,26 +758,25 @@ shakaDemo.Config = class {
|
|
|
791
758
|
}
|
|
792
759
|
|
|
793
760
|
/**
|
|
794
|
-
* @param {
|
|
761
|
+
* @param {string} name
|
|
795
762
|
* @param {!Array.<string>} values
|
|
796
763
|
* @param {function(!HTMLInputElement)} onChange
|
|
797
|
-
* @param {
|
|
764
|
+
* @param {string=} tooltipMessage
|
|
798
765
|
* @return {!shakaDemo.Config}
|
|
799
766
|
* @private
|
|
800
767
|
*/
|
|
801
768
|
addDatalistInput_(name, values, onChange, tooltipMessage) {
|
|
802
769
|
this.createRow_(name, tooltipMessage);
|
|
803
|
-
const localized = shakaDemoMain.getLocalizedString(name);
|
|
804
770
|
this.latestInput_ = new shakaDemo.DatalistInput(
|
|
805
|
-
this.getLatestSection_(),
|
|
771
|
+
this.getLatestSection_(), name, onChange, values);
|
|
806
772
|
return this;
|
|
807
773
|
}
|
|
808
774
|
|
|
809
775
|
/**
|
|
810
|
-
* @param {
|
|
776
|
+
* @param {string} name
|
|
811
777
|
* @param {!Object.<string, string>} values
|
|
812
778
|
* @param {function(!HTMLInputElement)} onChange
|
|
813
|
-
* @param {
|
|
779
|
+
* @param {string=} tooltipMessage
|
|
814
780
|
* @return {!shakaDemo.Config}
|
|
815
781
|
* @private
|
|
816
782
|
*/
|
|
@@ -824,11 +790,11 @@ shakaDemo.Config = class {
|
|
|
824
790
|
}
|
|
825
791
|
|
|
826
792
|
/**
|
|
827
|
-
* @param {
|
|
793
|
+
* @param {string} name
|
|
828
794
|
* @param {string} valueName
|
|
829
795
|
* @param {!Object.<string, ?>} options
|
|
830
796
|
* @param {!Object.<string, string>} optionNames
|
|
831
|
-
* @param {
|
|
797
|
+
* @param {string=} tooltipMessage
|
|
832
798
|
* @return {!shakaDemo.Config}
|
|
833
799
|
* @private
|
|
834
800
|
*/
|
|
@@ -860,8 +826,8 @@ shakaDemo.Config = class {
|
|
|
860
826
|
}
|
|
861
827
|
|
|
862
828
|
/**
|
|
863
|
-
* @param {
|
|
864
|
-
* @param {
|
|
829
|
+
* @param {string} name
|
|
830
|
+
* @param {string=} tooltipMessage
|
|
865
831
|
* @private
|
|
866
832
|
*/
|
|
867
833
|
createRow_(name, tooltipMessage) {
|