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
|
@@ -8,51 +8,51 @@ This article describes the V-Nova LCEVC Shaka Player integration.
|
|
|
8
8
|
# LCEVC Integration
|
|
9
9
|
|
|
10
10
|
## Adding V-Nova required files
|
|
11
|
-
### Importing
|
|
11
|
+
### Importing LCEVC Decoder
|
|
12
12
|
|
|
13
|
-
V-Nova LCEVC
|
|
13
|
+
V-Nova LCEVC Decoder Libraries are included using the same approach that the other external libraries are currently using. The necessary V-Nova LCEVC Decoder files need to be imported in the HTML page that is going to be used by Shaka Player to decode LCEVC. Checks are inplace that make sure the necessary objects are available.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
NPM package : <https://www.npmjs.com/package/lcevc_dec.js>
|
|
16
16
|
|
|
17
17
|
```javascript
|
|
18
18
|
<!-- MPEG-5 Part2 LCEVC support is enabled by including this: -->
|
|
19
|
-
<script defer src="../node_modules/
|
|
19
|
+
<script defer src="../node_modules/lcevc_dec.js/dist/lcevc_dec.min.js"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
To allow the Closure compiler to use the objects and methods that are exported by the
|
|
22
|
+
To allow the Closure compiler to use the objects and methods that are exported by the LCEVCdec.js a new `extern` is created.
|
|
23
23
|
|
|
24
24
|
### Defining an Extern for LCEVC
|
|
25
25
|
|
|
26
|
-
`externs/lcevc.js` exposes the functions from the LCEVC
|
|
26
|
+
`externs/lcevc.js` exposes the functions from the LCEVC Decoder library required for LCEVC Decoding.
|
|
27
27
|
|
|
28
28
|
## Integration point
|
|
29
29
|
|
|
30
|
-
### The shaka.lcevc.
|
|
30
|
+
### The shaka.lcevc.Dec class - (DEC : Decoder)
|
|
31
31
|
|
|
32
|
-
The main logic of the LCEVC integration is located in the `lib/
|
|
32
|
+
The main logic of the LCEVC integration is located in the `lib/lcevc_dec.min.js` file. In this file the shaka.lcevc.Dec is exported to be used in the project. This class is in charge of creating the Dec object using the mentioned externs, checking if LCEVC Decoder library is available, etc.
|
|
33
33
|
|
|
34
34
|
### Modifications in the player
|
|
35
35
|
|
|
36
36
|
The shaka.Player class, defined in the `lib/player.js` file, is the main player object for Shaka Player. There is a setter function for setting up a `canvas` element that is received from the user.
|
|
37
37
|
If shaka.ui is used the `canvas` is created in line with the video element in the same container overlaying the video element. If user provides a custom canvas using the setter function, The user is responsible for placing the canvas element in the desired position and resizing it.
|
|
38
38
|
|
|
39
|
-
`shaka.externs.LcevcConfiguration` is added to the `playerConfiguration` that is used as configuration for the LCEVC
|
|
39
|
+
`shaka.externs.LcevcConfiguration` is added to the `playerConfiguration` that is used as configuration for the LCEVC Decoder Library.
|
|
40
40
|
|
|
41
|
-
The
|
|
41
|
+
The Dec object is created in the `onLoad_()` event that is triggered when a new video is loaded in Shaka Player. Attaching to a media element is defined as:
|
|
42
42
|
|
|
43
43
|
- Registering error listeners to the media element.
|
|
44
44
|
- Catching the video element for use outside of the load graph.
|
|
45
45
|
|
|
46
|
-
The
|
|
46
|
+
The LCEVC Decoder object is created only if LCEVC is supported (LCEVC libs are loaded on the page) and also when it was not already created in another `onLoad_()` event execution.
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
### Feeding the
|
|
49
|
+
### Feeding the Dec
|
|
50
50
|
|
|
51
51
|
The logic that Shaka Player uses to communicate with the Media Source Extensions (MSE) is located in the `media/media_source_engine.js` file.
|
|
52
52
|
|
|
53
53
|

|
|
54
54
|
|
|
55
|
-
`append_()` function that is used to feed the MSE Source Buffer is intercepted and modified to pass the video buffers to the LCEVC
|
|
55
|
+
`append_()` function that is used to feed the MSE Source Buffer is intercepted and modified to pass the video buffers and related time offsets to the LCEVC Decoder Libraries before appending to the MSE Source Buffers.
|
|
56
56
|
|
|
57
57
|
## Demo page
|
|
58
58
|
|
|
@@ -60,7 +60,7 @@ The relevant libraries are added in the Demo Page like so:
|
|
|
60
60
|
|
|
61
61
|
```javascript
|
|
62
62
|
<!-- MPEG-5 Part2 LCEVC support is enabled by including this: -->
|
|
63
|
-
<script defer src="../node_modules/
|
|
63
|
+
<script defer src="../node_modules/lcevc_dec.js/dist/lcevc_dec.min.js"></script>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
And a new video sample with enhancement data is added to the `demo/common/assets.js` file under a new source `MPEG-5 Part 2 LCEVC`.
|
|
@@ -7,6 +7,60 @@ other ad providers in v3.1+.
|
|
|
7
7
|
Please note that the current API is likely to undergo significant
|
|
8
8
|
changes as our support extends.
|
|
9
9
|
|
|
10
|
+
#### AWS Elemental MediaTailor Integration
|
|
11
|
+
|
|
12
|
+
Shaka Player provides an integration with the [AWS Elemental MediaTailor][].
|
|
13
|
+
We support Client Side, Server Side and overlays ad insertion.
|
|
14
|
+
|
|
15
|
+
[AWS Elemental MediaTailor]: https://aws.amazon.com/mediatailor/
|
|
16
|
+
|
|
17
|
+
All ad insertion experiences are available through the
|
|
18
|
+
{@linksource shaka.extern.IAdManager} object on the Player.
|
|
19
|
+
|
|
20
|
+
If you're not using Shaka's UI library, you will
|
|
21
|
+
also need to create a `<div>` over your video element to serve as an ad
|
|
22
|
+
container.
|
|
23
|
+
|
|
24
|
+
Start by initializing the server side logic.
|
|
25
|
+
With Shaka UI:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const video = document.getElementById('video');
|
|
29
|
+
const ui = video['ui'];
|
|
30
|
+
const controls = video.ui.getControls();
|
|
31
|
+
// If you're using a non-UI build, this is the div you'll need to create
|
|
32
|
+
// for your layout.
|
|
33
|
+
const container = controls.getServerSideAdContainer();
|
|
34
|
+
const player = controls.getPlayer();
|
|
35
|
+
const netEngine = player.getNetworkingEngine();
|
|
36
|
+
const adManager = player.getAdManager();
|
|
37
|
+
adManager.initMediaTailor(container, netEngine, video);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Requesting a Client Side stream:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
const mediaTailorUrl = 'https://d305rncpy6ne2q.cloudfront.net/v1/session/94063eadf7d8c56e9e2edd84fdf897826a70d0df/SFP-MediaTailor-VOD-HLS-DASH/out/v1/b94f3611978f419985a18335bac9d9cb/ddb73bf548a44551a0059c346226445a/eaa5485198bf497284559efb8172425e/index.mpd';
|
|
44
|
+
const mediaTailorAdsParams = {
|
|
45
|
+
adsParams: {
|
|
46
|
+
assetid: 'test2',
|
|
47
|
+
podduration: '15',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
const uri = await adManager.requestMediaTailorStream(mediaTailorUrl, mediaTailorAdsParams);
|
|
51
|
+
player.load(uri);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Requesting a Server Side stream:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
const mediaTailorUrl = 'https://ad391cc0d55b44c6a86d232548adc225.mediatailor.us-east-1.amazonaws.com/v1/session/d02fedbbc5a68596164208dd24e9b48aa60dadc7/singssai/master.m3u8';
|
|
58
|
+
const uri = await adManager.requestMediaTailorStream(mediaTailorUrl);
|
|
59
|
+
player.load(uri);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Note: overlays ad insertions is the same as server side.
|
|
63
|
+
|
|
10
64
|
#### IMA SDK Integration
|
|
11
65
|
|
|
12
66
|
Shaka Player provides an integration with the [Interactive Media Ads][] SDKs.
|
|
@@ -52,7 +52,8 @@ function initApp() {
|
|
|
52
52
|
async function initPlayer() {
|
|
53
53
|
// Create a Player instance.
|
|
54
54
|
const video = document.getElementById('video');
|
|
55
|
-
const player = new shaka.Player(
|
|
55
|
+
const player = new shaka.Player();
|
|
56
|
+
await player.attach(video);
|
|
56
57
|
|
|
57
58
|
// Attach player to the window to make it easy to access in the JS console.
|
|
58
59
|
window.player = player;
|
package/docs/tutorials/errors.md
CHANGED
package/docs/tutorials/faq.md
CHANGED
|
@@ -95,31 +95,6 @@ you see JSON, you will need to [unwrap the response][wrapping].
|
|
|
95
95
|
|
|
96
96
|
<hr>
|
|
97
97
|
|
|
98
|
-
**Q:** Why doesn't getStats() work in Safari?
|
|
99
|
-
|
|
100
|
-
**A:** To play HLS content on Safari, we default to using Apple's native src=
|
|
101
|
-
playback. Since the browser handles playback, we don't get much information.
|
|
102
|
-
|
|
103
|
-
If you want to disable native playback and use MediaSource playback instead,
|
|
104
|
-
configure {@link shaka.extern.StreamingConfiguration|
|
|
105
|
-
`.streaming.useNativeHlsOnSafari`} to false.
|
|
106
|
-
|
|
107
|
-
<hr>
|
|
108
|
-
|
|
109
|
-
**Q:** Why doesn't my HLS content work?
|
|
110
|
-
|
|
111
|
-
**A:** If your HLS content uses MPEG2-TS, you may need to enable transmuxing.
|
|
112
|
-
The only browsers capable of playing TS natively are Edge and Chromecast. You
|
|
113
|
-
will get a `CONTENT_UNSUPPORTED_BY_BROWSER` error on other browsers due to
|
|
114
|
-
their lack of TS support.
|
|
115
|
-
|
|
116
|
-
You can enable transmuxing by [including mux.js][] v5.6.3+ in your application.
|
|
117
|
-
If Shaka Player detects that mux.js has been loaded, we will use it to transmux
|
|
118
|
-
TS content into MP4 on-the-fly, so that the content can be played by the
|
|
119
|
-
browser.
|
|
120
|
-
|
|
121
|
-
<hr>
|
|
122
|
-
|
|
123
98
|
**Q:** Why does it take so long to switch to HD?
|
|
124
99
|
|
|
125
100
|
**A:** When Shaka Player's `AbrManager` makes a decision to adapt, we don't
|
|
@@ -158,26 +133,18 @@ shaka.net.NetworkingEngine.registerScheme('file', shaka.net.HttpXHRPlugin.parse)
|
|
|
158
133
|
|
|
159
134
|
<hr>
|
|
160
135
|
|
|
161
|
-
**Q:** Why are my CEA-708 captions not showing on Edge or Chromecast?
|
|
162
|
-
|
|
163
|
-
**A:** Our support for CEA-708 captions requires transmuxing the TS files that
|
|
164
|
-
contain said captions. Edge and Chromecast, however, have native TS support and
|
|
165
|
-
thus are not required to transmux.
|
|
166
|
-
In order to force those platforms to transmux, set the
|
|
167
|
-
{@link shaka.extern.StreamingConfiguration|`.streaming.forceTransmux`}
|
|
168
|
-
configuration to true.
|
|
169
|
-
|
|
170
|
-
<hr>
|
|
171
|
-
|
|
172
136
|
**Q:** Why do I get 404 errors with very large timescales?
|
|
173
137
|
|
|
174
|
-
**A:**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
138
|
+
**A:** Some content creates timestamps too large to be represented as Numbers
|
|
139
|
+
in JavaScript (2^53). Very large timescales require very large timestamps (in
|
|
140
|
+
timescale units), which means we are unable to substitute the correct values
|
|
141
|
+
for `$Time$` in a `<SegmentTemplate>`.
|
|
142
|
+
|
|
143
|
+
We can work around this for platforms that support [`BigInt`][], or in cases
|
|
144
|
+
where we can live with a rounding error (not `$Time$` in `<SegmentTemplate>`).
|
|
179
145
|
|
|
180
|
-
|
|
146
|
+
If you must use `$Time` in `<SegmentTemplate>` and you must play on devices
|
|
147
|
+
that do not support [`BigInt`][], we recommend reducing your timescale.
|
|
181
148
|
See discussion in [#1667][1667] for details.
|
|
182
149
|
|
|
183
150
|
<hr>
|
|
@@ -202,20 +169,23 @@ you can use the same top-level APIs; but we are dependent on the browser
|
|
|
202
169
|
handling the streaming. So we won't support DASH on iOS since the browser
|
|
203
170
|
doesn't support it.
|
|
204
171
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
supported. This supports both DASH and HLS manifests.
|
|
172
|
+
In a future version, we plan to support `ManagedMediaSource` on iOS to achieve
|
|
173
|
+
control over both DASH and HLS playback on iOS. See [#5271][] and the
|
|
174
|
+
[`ManagedMediaSource` W3C spec proposal][]
|
|
209
175
|
|
|
210
176
|
<hr>
|
|
211
177
|
|
|
212
178
|
**Q:** The Nightly Demo isn't loading for me!
|
|
213
179
|
|
|
214
180
|
**A:** Are you looking at the uncompiled build with an AdBlocker enabled?
|
|
215
|
-
|
|
216
|
-
requests for some of our source files
|
|
181
|
+
|
|
182
|
+
Some ad blockers decide to block requests for some of our source files simply
|
|
183
|
+
because they have `ad` in the file name. This only affects the uncompiled
|
|
184
|
+
build.
|
|
185
|
+
|
|
217
186
|
Switch to the compiled build (add "build=compiled" to the url) or temporarily
|
|
218
|
-
disable your ad blocker to see the nightly uncompiled mode.
|
|
187
|
+
disable your ad blocker to see the nightly in uncompiled mode.
|
|
188
|
+
|
|
219
189
|
Please note that if you want to test our ad logic, you might have to disable
|
|
220
190
|
the ad blocker in compiled mode as well.
|
|
221
191
|
|
|
@@ -243,11 +213,11 @@ an HLS manifest, we do our best to guess what the codecs might be, but those
|
|
|
243
213
|
guesses might not always be accurate. If an HLS manifest has no codec
|
|
244
214
|
information provided, we default to guessing that the video codec is
|
|
245
215
|
`avc1.42E01E` and the audio codec is `mp4a.40.2`, which can cause problems if
|
|
246
|
-
the stream is actually video-only or audio-only.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
216
|
+
the stream is actually video-only or audio-only.
|
|
217
|
+
|
|
218
|
+
To change our default assumptions about codecs in HLS, please see
|
|
219
|
+
{@link shaka.extern.HlsManifestConfiguration|`.manifest.hls`} in the player
|
|
220
|
+
config.
|
|
251
221
|
|
|
252
222
|
<hr>
|
|
253
223
|
|
|
@@ -269,8 +239,10 @@ proxy them.
|
|
|
269
239
|
[887]: https://github.com/shaka-project/shaka-player/issues/887
|
|
270
240
|
[999]: https://github.com/shaka-project/shaka-player/issues/999
|
|
271
241
|
[1667]: https://github.com/shaka-project/shaka-player/issues/1667
|
|
272
|
-
[
|
|
242
|
+
[#5271]: https://github.com/shaka-project/shaka-player/issues/5271
|
|
243
|
+
[BigInt]: https://caniuse.com/bigint
|
|
273
244
|
[CORS]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
|
245
|
+
[`ManagedMediaSource` W3C spec proposal]: https://github.com/w3c/media-source/issues/320
|
|
274
246
|
[Shaka Player Embedded]: https://github.com/shaka-project/shaka-player-embedded
|
|
275
247
|
[auth]: https://shaka-player-demo.appspot.com/docs/api/tutorial-license-server-auth.html
|
|
276
248
|
[buffering]: https://shaka-player-demo.appspot.com/docs/api/tutorial-network-and-buffering-config.html
|
|
@@ -24,5 +24,6 @@
|
|
|
24
24
|
{ "selenium-grid-config": { "title": "Selenium Grid Config" } },
|
|
25
25
|
{ "faq": { "title": "Frequently Asked Questions" } },
|
|
26
26
|
{ "upgrade": { "title": "Upgrade Guide" } },
|
|
27
|
-
{ "upgrade-manifest": { "title": "ManifestParser Upgrade Guide" } }
|
|
27
|
+
{ "upgrade-manifest": { "title": "ManifestParser Upgrade Guide" } },
|
|
28
|
+
{ "lcevc": { "title": "LCEVC Quick Start" } }
|
|
28
29
|
]
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# LCEVC Quick Start
|
|
2
|
+
|
|
3
|
+
#### Requirements
|
|
4
|
+
|
|
5
|
+
- Only supported on browsers with Media Source Extensions SourceBuffer support
|
|
6
|
+
|
|
7
|
+
- MPEG-5 Part2 LCEVC decoding support (decoding provided by [lcevc_dec.js][],
|
|
8
|
+
must be separately included)
|
|
9
|
+
|
|
10
|
+
##### Integration documentation : [docs](../design/lcevc-integration.md)
|
|
11
|
+
|
|
12
|
+
##### More on [MPEG-5 Part2 LCEVC][]
|
|
13
|
+
|
|
14
|
+
[lcevc_dec.js]: https://www.npmjs.com/package/lcevc_dec.js?activeTab=readme
|
|
15
|
+
[MPEG-5 Part2 LCEVC]: https://www.lcevc.org
|
|
16
|
+
|
|
17
|
+
#### Configure LCEVC
|
|
18
|
+
|
|
19
|
+
LCEVC Decoder library needs to be included in the HTML page:
|
|
20
|
+
|
|
21
|
+
- Local `npm install lcevc_dec.js`
|
|
22
|
+
```html
|
|
23
|
+
<script src="../node_modules/lcevc_dec.js/dist/lcevc_dec.min.js"></script>
|
|
24
|
+
```
|
|
25
|
+
- Or use `unpkg.com` for latest LCEVC Decoder libraries.
|
|
26
|
+
```html
|
|
27
|
+
<script src="https://unpkg.com/lcevc_dec.js@1.0.0/dist/lcevc_dec.min.js"></script>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Configuration to enable LCEVC enhancement:
|
|
31
|
+
```js
|
|
32
|
+
player.configure('lcevc.enabled', true);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### LCEVC setup via UI library
|
|
36
|
+
|
|
37
|
+
Sample setup using the Shaka Player UI library:
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<!DOCTYPE html>
|
|
41
|
+
<html>
|
|
42
|
+
<head>
|
|
43
|
+
<!-- Shaka Player UI compiled library and default CSS for player controls: -->
|
|
44
|
+
<script src="dist/shaka-player.ui.js"></script>
|
|
45
|
+
<link rel="stylesheet" href="dist/controls.css" />
|
|
46
|
+
|
|
47
|
+
<!-- LCEVC decoder compiled library -->
|
|
48
|
+
<script src="https://unpkg.com/lcevc_dec.js@1.0.0/dist/lcevc_dec.min.js"></script>
|
|
49
|
+
|
|
50
|
+
<!-- Application source: -->
|
|
51
|
+
<script src="app.js"></script>
|
|
52
|
+
</head>
|
|
53
|
+
|
|
54
|
+
<body>
|
|
55
|
+
<!-- The data-shaka-player-container tag will make the UI library place the controls in this div. -->
|
|
56
|
+
<div data-shaka-player-container style="max-width:40em">
|
|
57
|
+
<!-- The data-shaka-player tag will make the UI library use this video element. -->
|
|
58
|
+
<video data-shaka-player id="video" style="width:100%;height:100%"></video>
|
|
59
|
+
</div>
|
|
60
|
+
</body>
|
|
61
|
+
</html>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
// app.js
|
|
66
|
+
|
|
67
|
+
const manifestUri = 'https://dyctis843rxh5.cloudfront.net/vnIAZIaowG1K7qOt/master.m3u8';
|
|
68
|
+
|
|
69
|
+
// Initialise Shaka Player with LCEVC enhancement.
|
|
70
|
+
async function init() {
|
|
71
|
+
// When using the UI, the player is made automatically by the UI object.
|
|
72
|
+
const video = document.getElementById('video');
|
|
73
|
+
const ui = video['ui'];
|
|
74
|
+
const controls = ui.getControls();
|
|
75
|
+
const player = controls.getPlayer();
|
|
76
|
+
|
|
77
|
+
// Enable the LCEVC enhancement.
|
|
78
|
+
player.configure('lcevc.enabled', true);
|
|
79
|
+
|
|
80
|
+
// Listen for error events.
|
|
81
|
+
player.addEventListener('error', onError);
|
|
82
|
+
controls.addEventListener('error', onError);
|
|
83
|
+
|
|
84
|
+
// Try to load a manifest.
|
|
85
|
+
// This is an asynchronous process.
|
|
86
|
+
try {
|
|
87
|
+
await player.load(manifestUri);
|
|
88
|
+
// This runs if the asynchronous load is successful.
|
|
89
|
+
console.log('The video has now been loaded!');
|
|
90
|
+
} catch (error) {
|
|
91
|
+
onError(error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Handle errors.
|
|
96
|
+
function onError(error) {
|
|
97
|
+
console.error('Error', error);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Listen to the custom shaka-ui-loaded event, to wait until the UI is loaded.
|
|
101
|
+
document.addEventListener('shaka-ui-loaded', init);
|
|
102
|
+
// Listen to the custom shaka-ui-load-failed event, in case Shaka Player fails
|
|
103
|
+
// to load (e.g. due to lack of browser support).
|
|
104
|
+
document.addEventListener('shaka-ui-load-failed', onError);
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### User provided canvas
|
|
109
|
+
|
|
110
|
+
User can also provide a canvas to the player though `attachCanvas` function:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
player.attachCanvas(canvas);
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Note: If external canvas is used, user is responsible for managing
|
|
117
|
+
the canvas. If no canvas is provided for Shaka UI library, the player
|
|
118
|
+
will generate and manage the canvas.
|
|
@@ -79,14 +79,14 @@ the end of the tutorial.
|
|
|
79
79
|
```js
|
|
80
80
|
// myapp.js
|
|
81
81
|
|
|
82
|
-
function initApp() {
|
|
82
|
+
async function initApp() {
|
|
83
83
|
// Install built-in polyfills to patch browser incompatibilities.
|
|
84
84
|
shaka.polyfill.installAll();
|
|
85
85
|
|
|
86
86
|
// Check to see if the browser supports the basic APIs Shaka needs.
|
|
87
87
|
if (shaka.Player.isBrowserSupported()) {
|
|
88
88
|
// Everything looks good!
|
|
89
|
-
initPlayer();
|
|
89
|
+
await initPlayer();
|
|
90
90
|
} else {
|
|
91
91
|
// This browser does not have the minimum set of APIs we need.
|
|
92
92
|
console.error('Browser not supported!');
|
|
@@ -99,10 +99,11 @@ function initApp() {
|
|
|
99
99
|
window.addEventListener('offline', updateOnlineStatus);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function initPlayer() {
|
|
102
|
+
async function initPlayer() {
|
|
103
103
|
// Create a Player instance.
|
|
104
104
|
const video = document.getElementById('video');
|
|
105
|
-
const player = new shaka.Player(
|
|
105
|
+
const player = new shaka.Player();
|
|
106
|
+
await player.attach(video);
|
|
106
107
|
|
|
107
108
|
// Attach player and storage to the window to make it easy to access
|
|
108
109
|
// in the JS console and so we can access it in other methods.
|
|
@@ -437,14 +438,14 @@ That’s it! For your convenience, here is the completed code:
|
|
|
437
438
|
```js
|
|
438
439
|
// myapp.js
|
|
439
440
|
|
|
440
|
-
function initApp() {
|
|
441
|
+
async function initApp() {
|
|
441
442
|
// Install built-in polyfills to patch browser incompatibilities.
|
|
442
443
|
shaka.polyfill.installAll();
|
|
443
444
|
|
|
444
445
|
// Check to see if the browser supports the basic APIs Shaka needs.
|
|
445
446
|
if (shaka.Player.isBrowserSupported()) {
|
|
446
447
|
// Everything looks good!
|
|
447
|
-
initPlayer();
|
|
448
|
+
await initPlayer();
|
|
448
449
|
} else {
|
|
449
450
|
// This browser does not have the minimum set of APIs we need.
|
|
450
451
|
console.error('Browser not supported!');
|
|
@@ -457,10 +458,11 @@ function initApp() {
|
|
|
457
458
|
window.addEventListener('offline', updateOnlineStatus);
|
|
458
459
|
}
|
|
459
460
|
|
|
460
|
-
function initPlayer() {
|
|
461
|
+
async function initPlayer() {
|
|
461
462
|
// Create a Player instance.
|
|
462
463
|
const video = document.getElementById('video');
|
|
463
|
-
const player = new shaka.Player(
|
|
464
|
+
const player = new shaka.Player();
|
|
465
|
+
await player.attach(video);
|
|
464
466
|
|
|
465
467
|
// Attach player and storage to the window to make it easy to access
|
|
466
468
|
// in the JS console and so we can access it in other methods.
|
|
@@ -29,6 +29,7 @@ __Manifest parsers__
|
|
|
29
29
|
- Default manifest parser plugins:
|
|
30
30
|
- DASH: {@linksource shaka.dash.DashParser}
|
|
31
31
|
- HLS: {@linksource shaka.hls.HlsParser}
|
|
32
|
+
- MSS: {@linksource shaka.mss.MssParser}
|
|
32
33
|
|
|
33
34
|
__Subtitle/caption parsers__
|
|
34
35
|
- Selected by MIME type
|
|
@@ -38,6 +39,10 @@ __Subtitle/caption parsers__
|
|
|
38
39
|
{@linksource shaka.text.Mp4VttParser}
|
|
39
40
|
- TTML: {@linksource shaka.text.TtmlTextParser} and
|
|
40
41
|
{@linksource shaka.text.Mp4TtmlParser}
|
|
42
|
+
- SubRip (SRT): {@linksource shaka.text.SrtTextParser}
|
|
43
|
+
- LyRiCs (LRC): {@linksource shaka.text.LrcTextParser}
|
|
44
|
+
- SubStation Alpha (SSA, ASS): {@linksource shaka.text.SsaTextParser}
|
|
45
|
+
- SubViewer (SBV): {@linksource shaka.text.SbvTextParser}
|
|
41
46
|
|
|
42
47
|
__Subtitle/caption displayers__
|
|
43
48
|
- Configured at runtime on a Player instance
|
|
@@ -68,6 +68,8 @@ The following elements can be added to the UI bar using this configuration value
|
|
|
68
68
|
supports AirPlay.
|
|
69
69
|
* cast: adds a button that opens a Chromecast dialog. The button is visible only if there is
|
|
70
70
|
at least one Chromecast device on the same network available for casting.
|
|
71
|
+
* remote: adds a button that opens a Remote Playback dialog. The button is visible only if the
|
|
72
|
+
browser supports Remote Playback API.
|
|
71
73
|
* quality: adds a button that controls enabling/disabling of abr and video resolution selection.
|
|
72
74
|
* language: adds a button that controls audio language selection.
|
|
73
75
|
* playback_rate: adds a button that controls the playback rate selection.
|
|
@@ -91,6 +93,8 @@ The following buttons can be added to the overflow menu:
|
|
|
91
93
|
* playback_rate: adds a button that controls the playback rate selection.
|
|
92
94
|
* airplay: adds a button that opens a AirPlay dialog. The button is visible only if the browser
|
|
93
95
|
supports AirPlay.
|
|
96
|
+
* remote: adds a button that opens a Remote Playback dialog. The button is visible only if the
|
|
97
|
+
browser supports Remote Playback API.
|
|
94
98
|
* Statistics: adds a button that displays statistics of the video.
|
|
95
99
|
<!-- TODO: If we add more buttons that can be put in the order this way, list them here. -->
|
|
96
100
|
|
|
@@ -184,6 +188,19 @@ const config = {
|
|
|
184
188
|
ui.configure(config);
|
|
185
189
|
```
|
|
186
190
|
|
|
191
|
+
If you've chosen to display chapters, you can specify the color for the chapter markers on
|
|
192
|
+
the timeline and the text color of the chapter titles that popup on hover:
|
|
193
|
+
```js
|
|
194
|
+
const config = {
|
|
195
|
+
displayChapters: true,
|
|
196
|
+
seekBarColors: {
|
|
197
|
+
chapterMarks: 'rgb(27, 27, 27)',
|
|
198
|
+
chapterLabels: 'rgb(255, 255, 255)'
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
ui.configure(config);
|
|
202
|
+
```
|
|
203
|
+
|
|
187
204
|
#### Configuring playback, fast forward and rewind rates
|
|
188
205
|
The rate in which the player can play, fast forward and rewind content can be configured using the `playbackRates`, `fastForwardRates` and `rewindRates` options.
|
|
189
206
|
|
package/docs/tutorials/ui.md
CHANGED
|
@@ -203,7 +203,8 @@ constructor.
|
|
|
203
203
|
```js
|
|
204
204
|
// "local" because it is for local playback only, as opposed to the player proxy
|
|
205
205
|
// object, which will route your calls to the ChromeCast receiver as necessary.
|
|
206
|
-
const localPlayer = new shaka.Player(
|
|
206
|
+
const localPlayer = new shaka.Player();
|
|
207
|
+
await localPlayer.attach(videoElement);
|
|
207
208
|
// "Overlay" because the UI will add DOM elements inside the container,
|
|
208
209
|
// to visually overlay the video element
|
|
209
210
|
const ui = new shaka.ui.Overlay(localPlayer, videoContainerElement,
|
|
@@ -99,3 +99,6 @@ application:
|
|
|
99
99
|
|
|
100
100
|
- Plugin changes:
|
|
101
101
|
- `Transmuxer` plugins now has three new parameters in `transmux()` method.
|
|
102
|
+
|
|
103
|
+
- Player API Changes:
|
|
104
|
+
- The constructor no longer takes `mediaElement` as a parameter; use the `attach` method to attach to a media element instead. (Deprecated in v4.6)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*! @license
|
|
2
|
+
* Shaka Player
|
|
3
|
+
* Copyright 2016 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @fileoverview Externs for CSSStyleDeclaration properties not in the
|
|
10
|
+
* Closure compiler.
|
|
11
|
+
*
|
|
12
|
+
* @externs
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
CSSStyleDeclaration.prototype.textCombineUpright;
|