shaka-player 4.4.2 → 4.5.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/workflows/release-please.yaml +2 -27
- package/CHANGELOG.md +67 -25
- package/README.md +16 -10
- 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 +27 -5
- package/demo/common/assets.js +150 -52
- package/demo/config.js +192 -253
- package/demo/custom.js +39 -98
- 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 +52 -124
- package/demo/search.js +23 -35
- 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/demo.compiled.debug.js +187 -211
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +187 -211
- package/dist/demo.compiled.map +4 -4
- package/dist/deps.js +27 -24
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +42 -61
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +42 -61
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +728 -365
- package/dist/shaka-player.compiled.debug.d.ts +728 -365
- package/dist/shaka-player.compiled.debug.externs.js +475 -51
- package/dist/shaka-player.compiled.debug.js +576 -480
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +475 -51
- package/dist/shaka-player.compiled.js +1117 -1056
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +783 -410
- package/dist/shaka-player.ui.debug.d.ts +783 -410
- package/dist/shaka-player.ui.debug.externs.js +496 -51
- package/dist/shaka-player.ui.debug.js +647 -542
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +496 -51
- package/dist/shaka-player.ui.js +1260 -1194
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/lcevc-integration.md +14 -14
- 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 +1 -1
- package/docs/tutorials/ui-customization.md +4 -0
- package/externs/css_style_declaration.js +19 -0
- package/externs/lcevc.js +37 -13
- package/externs/media_remote.js +68 -0
- package/externs/mediatailor.js +193 -0
- package/externs/pictureinpicture.js +11 -0
- package/externs/shaka/ads.js +27 -0
- package/externs/shaka/manifest.js +10 -5
- package/externs/shaka/manifest_parser.js +7 -1
- package/externs/shaka/offline.js +4 -0
- package/externs/shaka/player.js +12 -1
- package/karma.conf.js +7 -3
- package/lib/abr/simple_abr_manager.js +43 -3
- 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 +828 -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 +79 -13
- package/lib/dash/mpd_utils.js +10 -6
- package/lib/dash/segment_base.js +13 -5
- package/lib/dash/segment_list.js +13 -5
- package/lib/dash/segment_template.js +43 -85
- package/lib/dependencies/all.js +8 -7
- package/lib/hls/hls_parser.js +101 -37
- package/lib/lcevc/lcevc_dec.js +220 -0
- package/lib/media/adaptation_set.js +22 -11
- package/lib/media/adaptation_set_criteria.js +25 -7
- package/lib/media/media_source_engine.js +215 -27
- package/lib/media/segment_index.js +5 -5
- package/lib/media/segment_reference.js +10 -5
- package/lib/media/streaming_engine.js +44 -39
- package/lib/mss/mss_parser.js +1 -0
- package/lib/net/networking_engine.js +1 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +3 -0
- package/lib/player.js +142 -72
- package/lib/routing/payload.js +5 -1
- package/lib/text/cue.js +62 -47
- package/lib/text/ttml_text_parser.js +17 -0
- package/lib/text/ui_text_displayer.js +4 -0
- package/lib/text/vtt_text_parser.js +35 -22
- package/lib/transmuxer/h265.js +862 -0
- package/lib/transmuxer/mpeg_ts_transmuxer.js +3 -2
- package/lib/transmuxer/ts_transmuxer.js +160 -15
- package/lib/util/cmcd_manager.js +6 -1
- package/lib/util/error.js +28 -9
- package/lib/util/exp_golomb.js +30 -2
- package/lib/util/fake_event.js +3 -0
- package/lib/util/manifest_parser_utils.js +10 -4
- package/lib/util/mp4_generator.js +4 -4
- package/lib/util/periods.js +2 -0
- package/lib/util/platform.js +54 -0
- package/lib/util/player_configuration.js +8 -0
- package/lib/util/state_history.js +6 -2
- package/lib/util/stream_utils.js +133 -217
- package/lib/util/ts_parser.js +229 -43
- package/maintained-branches.md +3 -2
- package/package.json +4 -6
- package/roadmap.md +15 -5
- package/shaka-player.uncompiled.js +2 -1
- package/support.html +0 -1
- package/test/cast/cast_receiver_integration.js +47 -0
- package/test/codec_switching/codec_switching_integration.js +181 -0
- package/test/dash/dash_parser_content_protection_unit.js +2 -0
- package/test/dash/dash_parser_integration.js +73 -0
- package/test/dash/dash_parser_live_unit.js +2 -0
- package/test/dash/dash_parser_manifest_unit.js +47 -0
- package/test/dash/dash_parser_segment_base_unit.js +7 -0
- package/test/dash/dash_parser_segment_list_unit.js +23 -17
- package/test/dash/dash_parser_segment_template_unit.js +49 -0
- package/test/demo/demo_unit.js +0 -16
- package/test/hls/hls_live_unit.js +35 -0
- package/test/hls/hls_parser_unit.js +8 -61
- package/test/media/adaptation_set_criteria_unit.js +118 -0
- package/test/media/adaptation_set_unit.js +1 -0
- package/test/media/media_source_engine_unit.js +165 -1
- package/test/media/segment_index_unit.js +4 -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/offline/manifest_convert_unit.js +5 -0
- package/test/offline/storage_integration.js +1 -4
- package/test/player_unit.js +102 -131
- package/test/routing/walker_unit.js +1 -0
- 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 +20 -7
- package/test/test/util/fake_ad_manager.js +20 -0
- package/test/test/util/fake_media_source_engine.js +8 -2
- package/test/test/util/manifest_generator.js +7 -3
- package/test/test/util/mss_parser_util.js +4 -0
- package/test/test/util/offline_utils.js +1 -0
- package/test/test/util/streaming_engine_util.js +7 -4
- package/test/text/ttml_text_parser_unit.js +52 -0
- package/test/text/vtt_text_parser_unit.js +105 -48
- package/test/transmuxer/transmuxer_integration.js +121 -4
- package/test/ui/ui_unit.js +3 -10
- package/test/util/stream_utils_unit.js +208 -74
- package/test/util/ts_parser_unit.js +1 -1
- package/ui/controls.js +125 -0
- package/ui/externs/ui.js +8 -1
- package/ui/pip_button.js +22 -120
- package/ui/remote_button.js +201 -0
- package/ui/ui.js +5 -2
- package/demo/common/message_ids.js +0 -309
- package/demo/locales/en.json +0 -287
- package/demo/locales/source.json +0 -1142
- package/externs/mux.js +0 -69
- package/lib/lcevc/lcevc_dil.js +0 -152
- package/lib/transmuxer/muxjs_transmuxer.js +0 -242
- package/test/transmuxer/muxjs_transmuxer_integration.js +0 -177
|
@@ -60,6 +60,13 @@ shaka.util.IReleasable = class {
|
|
|
60
60
|
*/
|
|
61
61
|
release() {}
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* @enum {string}
|
|
65
|
+
*/
|
|
66
|
+
shaka.config.CodecSwitchingStrategy = {
|
|
67
|
+
RELOAD: 'reload',
|
|
68
|
+
SMOOTH: 'smooth'
|
|
69
|
+
};
|
|
63
70
|
/**
|
|
64
71
|
* @summary A set of BufferSource utility functions.
|
|
65
72
|
*/
|
|
@@ -173,6 +180,223 @@ shaka.text.Cue = class {
|
|
|
173
180
|
*/
|
|
174
181
|
static equal(cue1, cue2) {}
|
|
175
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* The start time of the cue in seconds, relative to the start of the
|
|
185
|
+
* presentation.
|
|
186
|
+
* @type {number}
|
|
187
|
+
*/
|
|
188
|
+
shaka.text.Cue.prototype.startTime;
|
|
189
|
+
/**
|
|
190
|
+
* The end time of the cue in seconds, relative to the start of the
|
|
191
|
+
* presentation.
|
|
192
|
+
* @type {number}
|
|
193
|
+
*/
|
|
194
|
+
shaka.text.Cue.prototype.endTime;
|
|
195
|
+
/**
|
|
196
|
+
* The text payload of the cue. If nestedCues is non-empty, this should be
|
|
197
|
+
* empty. Top-level block containers should have no payload of their own.
|
|
198
|
+
* @type {string}
|
|
199
|
+
*/
|
|
200
|
+
shaka.text.Cue.prototype.payload;
|
|
201
|
+
/**
|
|
202
|
+
* The region to render the cue into. Only supported on top-level cues,
|
|
203
|
+
* because nested cues are inline elements.
|
|
204
|
+
* @type {shaka.text.CueRegion}
|
|
205
|
+
*/
|
|
206
|
+
shaka.text.Cue.prototype.region;
|
|
207
|
+
/**
|
|
208
|
+
* The indent (in percent) of the cue box in the direction defined by the
|
|
209
|
+
* writing direction.
|
|
210
|
+
* @type {?number}
|
|
211
|
+
*/
|
|
212
|
+
shaka.text.Cue.prototype.position;
|
|
213
|
+
/**
|
|
214
|
+
* Position alignment of the cue.
|
|
215
|
+
* @type {shaka.text.Cue.positionAlign}
|
|
216
|
+
*/
|
|
217
|
+
shaka.text.Cue.prototype.positionAlign;
|
|
218
|
+
/**
|
|
219
|
+
* Size of the cue box (in percents), where 0 means "auto".
|
|
220
|
+
* @type {number}
|
|
221
|
+
*/
|
|
222
|
+
shaka.text.Cue.prototype.size;
|
|
223
|
+
/**
|
|
224
|
+
* Alignment of the text inside the cue box.
|
|
225
|
+
* @type {shaka.text.Cue.textAlign}
|
|
226
|
+
*/
|
|
227
|
+
shaka.text.Cue.prototype.textAlign;
|
|
228
|
+
/**
|
|
229
|
+
* Text direction of the cue.
|
|
230
|
+
* @type {shaka.text.Cue.direction}
|
|
231
|
+
*/
|
|
232
|
+
shaka.text.Cue.prototype.direction;
|
|
233
|
+
/**
|
|
234
|
+
* Text writing mode of the cue.
|
|
235
|
+
* @type {shaka.text.Cue.writingMode}
|
|
236
|
+
*/
|
|
237
|
+
shaka.text.Cue.prototype.writingMode;
|
|
238
|
+
/**
|
|
239
|
+
* The way to interpret line field. (Either as an integer line number or
|
|
240
|
+
* percentage from the display box).
|
|
241
|
+
* @type {shaka.text.Cue.lineInterpretation}
|
|
242
|
+
*/
|
|
243
|
+
shaka.text.Cue.prototype.lineInterpretation;
|
|
244
|
+
/**
|
|
245
|
+
* The offset from the display box in either number of lines or
|
|
246
|
+
* percentage depending on the value of lineInterpretation.
|
|
247
|
+
* @type {?number}
|
|
248
|
+
*/
|
|
249
|
+
shaka.text.Cue.prototype.line;
|
|
250
|
+
/**
|
|
251
|
+
* Separation between line areas inside the cue box in px or em
|
|
252
|
+
* (e.g. '100px'/'100em'). If not specified, this should be no less than
|
|
253
|
+
* the largest font size applied to the text in the cue.
|
|
254
|
+
* @type {string}.
|
|
255
|
+
*/
|
|
256
|
+
shaka.text.Cue.prototype.lineHeight;
|
|
257
|
+
/**
|
|
258
|
+
* Line alignment of the cue box.
|
|
259
|
+
* Start alignment means the cue box’s top side (for horizontal cues), left
|
|
260
|
+
* side (for vertical growing right), or right side (for vertical growing
|
|
261
|
+
* left) is aligned at the line.
|
|
262
|
+
* Center alignment means the cue box is centered at the line.
|
|
263
|
+
* End alignment The cue box’s bottom side (for horizontal cues), right side
|
|
264
|
+
* (for vertical growing right), or left side (for vertical growing left) is
|
|
265
|
+
* aligned at the line.
|
|
266
|
+
* @type {shaka.text.Cue.lineAlign}
|
|
267
|
+
*/
|
|
268
|
+
shaka.text.Cue.prototype.lineAlign;
|
|
269
|
+
/**
|
|
270
|
+
* Vertical alignments of the cues within their extents.
|
|
271
|
+
* 'BEFORE' means displaying the captions at the top of the text display
|
|
272
|
+
* container box, 'CENTER' means in the middle, 'AFTER' means at the bottom.
|
|
273
|
+
* @type {shaka.text.Cue.displayAlign}
|
|
274
|
+
*/
|
|
275
|
+
shaka.text.Cue.prototype.displayAlign;
|
|
276
|
+
/**
|
|
277
|
+
* Text color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
278
|
+
* @type {string}
|
|
279
|
+
*/
|
|
280
|
+
shaka.text.Cue.prototype.color;
|
|
281
|
+
/**
|
|
282
|
+
* Text background color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
283
|
+
* @type {string}
|
|
284
|
+
*/
|
|
285
|
+
shaka.text.Cue.prototype.backgroundColor;
|
|
286
|
+
/**
|
|
287
|
+
* The URL of the background image, e.g. "data:[mime type];base64,[data]".
|
|
288
|
+
* @type {string}
|
|
289
|
+
*/
|
|
290
|
+
shaka.text.Cue.prototype.backgroundImage;
|
|
291
|
+
/**
|
|
292
|
+
* The border around this cue as a CSS border.
|
|
293
|
+
* @type {string}
|
|
294
|
+
*/
|
|
295
|
+
shaka.text.Cue.prototype.border;
|
|
296
|
+
/**
|
|
297
|
+
* Text font size in px or em (e.g. '100px'/'100em').
|
|
298
|
+
* @type {string}
|
|
299
|
+
*/
|
|
300
|
+
shaka.text.Cue.prototype.fontSize;
|
|
301
|
+
/**
|
|
302
|
+
* Text font weight. Either normal or bold.
|
|
303
|
+
* @type {shaka.text.Cue.fontWeight}
|
|
304
|
+
*/
|
|
305
|
+
shaka.text.Cue.prototype.fontWeight;
|
|
306
|
+
/**
|
|
307
|
+
* Text font style. Normal, italic or oblique.
|
|
308
|
+
* @type {shaka.text.Cue.fontStyle}
|
|
309
|
+
*/
|
|
310
|
+
shaka.text.Cue.prototype.fontStyle;
|
|
311
|
+
/**
|
|
312
|
+
* Text font family.
|
|
313
|
+
* @type {string}
|
|
314
|
+
*/
|
|
315
|
+
shaka.text.Cue.prototype.fontFamily;
|
|
316
|
+
/**
|
|
317
|
+
* Text letter spacing as a CSS letter-spacing value.
|
|
318
|
+
* @type {string}
|
|
319
|
+
*/
|
|
320
|
+
shaka.text.Cue.prototype.letterSpacing;
|
|
321
|
+
/**
|
|
322
|
+
* Text line padding as a CSS line-padding value.
|
|
323
|
+
* @type {string}
|
|
324
|
+
*/
|
|
325
|
+
shaka.text.Cue.prototype.linePadding;
|
|
326
|
+
/**
|
|
327
|
+
* Opacity of the cue element, from 0-1.
|
|
328
|
+
* @type {number}
|
|
329
|
+
*/
|
|
330
|
+
shaka.text.Cue.prototype.opacity;
|
|
331
|
+
/**
|
|
332
|
+
* Text combine upright as a CSS text-combine-upright value.
|
|
333
|
+
* @type {string}
|
|
334
|
+
*/
|
|
335
|
+
shaka.text.Cue.prototype.textCombineUpright;
|
|
336
|
+
/**
|
|
337
|
+
* Text decoration. A combination of underline, overline
|
|
338
|
+
* and line through. Empty array means no decoration.
|
|
339
|
+
* @type {!Array.<!shaka.text.Cue.textDecoration>}
|
|
340
|
+
*/
|
|
341
|
+
shaka.text.Cue.prototype.textDecoration;
|
|
342
|
+
/**
|
|
343
|
+
* Text shadow color as a CSS text-shadow value.
|
|
344
|
+
* @type {string}
|
|
345
|
+
*/
|
|
346
|
+
shaka.text.Cue.prototype.textShadow;
|
|
347
|
+
/**
|
|
348
|
+
* Text stroke color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
349
|
+
* @type {string}
|
|
350
|
+
*/
|
|
351
|
+
shaka.text.Cue.prototype.textStrokeColor;
|
|
352
|
+
/**
|
|
353
|
+
* Text stroke width as a CSS stroke-width value.
|
|
354
|
+
* @type {string}
|
|
355
|
+
*/
|
|
356
|
+
shaka.text.Cue.prototype.textStrokeWidth;
|
|
357
|
+
/**
|
|
358
|
+
* Whether or not line wrapping should be applied to the cue.
|
|
359
|
+
* @type {boolean}
|
|
360
|
+
*/
|
|
361
|
+
shaka.text.Cue.prototype.wrapLine;
|
|
362
|
+
/**
|
|
363
|
+
* Id of the cue.
|
|
364
|
+
* @type {string}
|
|
365
|
+
*/
|
|
366
|
+
shaka.text.Cue.prototype.id;
|
|
367
|
+
/**
|
|
368
|
+
* Nested cues, which should be laid out horizontally in one block.
|
|
369
|
+
* Top-level cues are blocks, and nested cues are inline elements.
|
|
370
|
+
* Cues can be nested arbitrarily deeply.
|
|
371
|
+
* @type {!Array.<!shaka.text.Cue>}
|
|
372
|
+
*/
|
|
373
|
+
shaka.text.Cue.prototype.nestedCues;
|
|
374
|
+
/**
|
|
375
|
+
* If true, this represents a container element that is "above" the main
|
|
376
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
377
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
378
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
379
|
+
* @type {boolean}
|
|
380
|
+
*/
|
|
381
|
+
shaka.text.Cue.prototype.isContainer;
|
|
382
|
+
/**
|
|
383
|
+
* Whether or not the cue only acts as a line break between two nested cues.
|
|
384
|
+
* Should only appear in nested cues.
|
|
385
|
+
* @type {boolean}
|
|
386
|
+
*/
|
|
387
|
+
shaka.text.Cue.prototype.lineBreak;
|
|
388
|
+
/**
|
|
389
|
+
* Used to indicate the type of ruby tag that should be used when rendering
|
|
390
|
+
* the cue. Valid values: ruby, rp, rt.
|
|
391
|
+
* @type {?string}
|
|
392
|
+
*/
|
|
393
|
+
shaka.text.Cue.prototype.rubyTag;
|
|
394
|
+
/**
|
|
395
|
+
* The number of horizontal and vertical cells into which the Root Container
|
|
396
|
+
* Region area is divided.
|
|
397
|
+
* @type {{ columns: number, rows: number }}
|
|
398
|
+
*/
|
|
399
|
+
shaka.text.Cue.prototype.cellResolution;
|
|
176
400
|
/**
|
|
177
401
|
* @enum {string}
|
|
178
402
|
*/
|
|
@@ -294,6 +518,68 @@ shaka.text.CueRegion = class {
|
|
|
294
518
|
/** */
|
|
295
519
|
constructor() {}
|
|
296
520
|
};
|
|
521
|
+
/**
|
|
522
|
+
* Region identifier.
|
|
523
|
+
* @type {string}
|
|
524
|
+
*/
|
|
525
|
+
shaka.text.CueRegion.prototype.id;
|
|
526
|
+
/**
|
|
527
|
+
* The X offset to start the rendering area in viewportAnchorUnits of the
|
|
528
|
+
* video width.
|
|
529
|
+
* @type {number}
|
|
530
|
+
*/
|
|
531
|
+
shaka.text.CueRegion.prototype.viewportAnchorX;
|
|
532
|
+
/**
|
|
533
|
+
* The X offset to start the rendering area in viewportAnchorUnits of the
|
|
534
|
+
* video height.
|
|
535
|
+
* @type {number}
|
|
536
|
+
*/
|
|
537
|
+
shaka.text.CueRegion.prototype.viewportAnchorY;
|
|
538
|
+
/**
|
|
539
|
+
* The X offset to start the rendering area in percentage (0-100) of this
|
|
540
|
+
* region width.
|
|
541
|
+
* @type {number}
|
|
542
|
+
*/
|
|
543
|
+
shaka.text.CueRegion.prototype.regionAnchorX;
|
|
544
|
+
/**
|
|
545
|
+
* The Y offset to start the rendering area in percentage (0-100) of the
|
|
546
|
+
* region height.
|
|
547
|
+
* @type {number}
|
|
548
|
+
*/
|
|
549
|
+
shaka.text.CueRegion.prototype.regionAnchorY;
|
|
550
|
+
/**
|
|
551
|
+
* The width of the rendering area in widthUnits.
|
|
552
|
+
* @type {number}
|
|
553
|
+
*/
|
|
554
|
+
shaka.text.CueRegion.prototype.width;
|
|
555
|
+
/**
|
|
556
|
+
* The width of the rendering area in heightUnits.
|
|
557
|
+
* @type {number}
|
|
558
|
+
*/
|
|
559
|
+
shaka.text.CueRegion.prototype.height;
|
|
560
|
+
/**
|
|
561
|
+
* The units (percentage, pixels or lines) the region height is in.
|
|
562
|
+
* @type {shaka.text.CueRegion.units}
|
|
563
|
+
*/
|
|
564
|
+
shaka.text.CueRegion.prototype.heightUnits;
|
|
565
|
+
/**
|
|
566
|
+
* The units (percentage or pixels) the region width is in.
|
|
567
|
+
* @type {shaka.text.CueRegion.units}
|
|
568
|
+
*/
|
|
569
|
+
shaka.text.CueRegion.prototype.widthUnits;
|
|
570
|
+
/**
|
|
571
|
+
* The units (percentage or pixels) the region viewportAnchors are in.
|
|
572
|
+
* @type {shaka.text.CueRegion.units}
|
|
573
|
+
*/
|
|
574
|
+
shaka.text.CueRegion.prototype.viewportAnchorUnits;
|
|
575
|
+
/**
|
|
576
|
+
* If scroll=UP, it means that cues in the region will be added to the
|
|
577
|
+
* bottom of the region and will push any already displayed cues in the
|
|
578
|
+
* region up. Otherwise (scroll=NONE) cues will stay fixed at the location
|
|
579
|
+
* they were first painted in.
|
|
580
|
+
* @type {shaka.text.CueRegion.scrollMode}
|
|
581
|
+
*/
|
|
582
|
+
shaka.text.CueRegion.prototype.scroll;
|
|
297
583
|
/**
|
|
298
584
|
* @enum {number}
|
|
299
585
|
*/
|
|
@@ -516,11 +802,13 @@ shaka.util.Error.Code = {
|
|
|
516
802
|
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
517
803
|
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
518
804
|
'NO_WEB_CRYPTO_API': 4042,
|
|
519
|
-
'HLS_AES_128_INVALID_IV_LENGTH': 4043,
|
|
520
|
-
'HLS_AES_128_INVALID_KEY_LENGTH': 4044,
|
|
521
805
|
'CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM': 4045,
|
|
522
806
|
'MSS_INVALID_XML': 4046,
|
|
523
807
|
'MSS_LIVE_CONTENT_NOT_SUPPORTED': 4047,
|
|
808
|
+
'AES_128_INVALID_IV_LENGTH': 4048,
|
|
809
|
+
'AES_128_INVALID_KEY_LENGTH': 4049,
|
|
810
|
+
'DASH_CONFLICTING_AES_128': 4050,
|
|
811
|
+
'DASH_UNSUPPORTED_AES_128': 4051,
|
|
524
812
|
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
525
813
|
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
526
814
|
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
@@ -571,7 +859,8 @@ shaka.util.Error.Code = {
|
|
|
571
859
|
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
572
860
|
'SS_IMA_SDK_MISSING': 10002,
|
|
573
861
|
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
574
|
-
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
|
|
862
|
+
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
|
|
863
|
+
'MT_AD_MANAGER_NOT_INITIALIZED': 10005
|
|
575
864
|
};
|
|
576
865
|
/**
|
|
577
866
|
* @summary A set of utility functions for dealing with MIME types.
|
|
@@ -1193,7 +1482,8 @@ shaka.net.NetworkingEngine.RequestType = {
|
|
|
1193
1482
|
'APP': 3,
|
|
1194
1483
|
'TIMING': 4,
|
|
1195
1484
|
'SERVER_CERTIFICATE': 5,
|
|
1196
|
-
'KEY': 6
|
|
1485
|
+
'KEY': 6,
|
|
1486
|
+
'ADS': 7
|
|
1197
1487
|
};
|
|
1198
1488
|
/**
|
|
1199
1489
|
* A more advanced form of the RequestType structure, meant to describe
|
|
@@ -1625,8 +1915,10 @@ shaka.media.InitSegmentReference = class {
|
|
|
1625
1915
|
* the quality of the media associated with this init segment.
|
|
1626
1916
|
* @param {(null|number)=} timescale
|
|
1627
1917
|
* @param {(null|BufferSource)=} segmentData
|
|
1918
|
+
* @param {?shaka.extern.aes128Key=} aes128Key
|
|
1919
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1628
1920
|
*/
|
|
1629
|
-
constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData) {}
|
|
1921
|
+
constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData, aes128Key) {}
|
|
1630
1922
|
/**
|
|
1631
1923
|
* Returns the offset from the start of the resource to the
|
|
1632
1924
|
* start of the segment.
|
|
@@ -1699,10 +1991,10 @@ shaka.media.SegmentReference = class {
|
|
|
1699
1991
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
1700
1992
|
* The segment status is used to indicate that a segment does not exist or is
|
|
1701
1993
|
* not available.
|
|
1702
|
-
* @param {?shaka.extern.
|
|
1994
|
+
* @param {?shaka.extern.aes128Key=} aes128Key
|
|
1703
1995
|
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1704
1996
|
*/
|
|
1705
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status,
|
|
1997
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, aes128Key) {}
|
|
1706
1998
|
/**
|
|
1707
1999
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1708
2000
|
* @return {!Array.<string>}
|
|
@@ -1858,8 +2150,9 @@ shaka.util.Id3Utils = class {
|
|
|
1858
2150
|
shaka.util.ExpGolomb = class {
|
|
1859
2151
|
/**
|
|
1860
2152
|
* @param {!Uint8Array} data
|
|
2153
|
+
* @param {boolean=} convertEbsp2rbsp
|
|
1861
2154
|
*/
|
|
1862
|
-
constructor(data) {}
|
|
2155
|
+
constructor(data, convertEbsp2rbsp) {}
|
|
1863
2156
|
};
|
|
1864
2157
|
/**
|
|
1865
2158
|
* @see https://en.wikipedia.org/wiki/MPEG_transport_stream
|
|
@@ -1886,6 +2179,16 @@ shaka.util.TsParser = class {
|
|
|
1886
2179
|
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
1887
2180
|
*/
|
|
1888
2181
|
parseAvcNalus(pes, nextPes) {}
|
|
2182
|
+
/**
|
|
2183
|
+
* Parse AVC and HVC Nalus
|
|
2184
|
+
* The code is based on hls.js
|
|
2185
|
+
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
2186
|
+
* @param {shaka.extern.MPEG_PES} pes
|
|
2187
|
+
* @param {?shaka.extern.MPEG_PES=} nextPes
|
|
2188
|
+
* @param {?shaka.extern.VideoNalu=} lastNalu
|
|
2189
|
+
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
2190
|
+
*/
|
|
2191
|
+
parseNalus(pes, nextPes, lastNalu) {}
|
|
1889
2192
|
/**
|
|
1890
2193
|
* Return the ID3 metadata
|
|
1891
2194
|
* @return {!Array.<shaka.extern.ID3Metadata>}
|
|
@@ -1945,23 +2248,23 @@ shaka.util.TsParser = class {
|
|
|
1945
2248
|
shaka.util.TsParser.Timescale;
|
|
1946
2249
|
/**
|
|
1947
2250
|
* @summary
|
|
1948
|
-
*
|
|
2251
|
+
* lcevcDec - (MPEG-5 Part 2 LCEVC - Decoder) provides
|
|
1949
2252
|
* all the operations related to the enhancement and rendering
|
|
1950
2253
|
* of LCEVC enabled streams and on to a canvas.
|
|
1951
2254
|
* @implements {shaka.util.IReleasable}
|
|
1952
2255
|
*/
|
|
1953
|
-
shaka.lcevc.
|
|
2256
|
+
shaka.lcevc.Dec = class {
|
|
1954
2257
|
/**
|
|
1955
2258
|
* @param {HTMLVideoElement} media The video element that will be attached to
|
|
1956
|
-
* LCEVC
|
|
2259
|
+
* LCEVC Decoder for input.
|
|
1957
2260
|
* @param {HTMLCanvasElement} canvas The canvas element that will be attached
|
|
1958
|
-
* to LCEVC
|
|
1959
|
-
* @param {shaka.extern.LcevcConfiguration}
|
|
1960
|
-
*
|
|
2261
|
+
* to LCEVC Decoder to render the enhanced frames.
|
|
2262
|
+
* @param {shaka.extern.LcevcConfiguration} lcevcConfig LCEVC configuration
|
|
2263
|
+
* object to initialize the LCEVC Decoder.
|
|
1961
2264
|
*/
|
|
1962
|
-
constructor(media, canvas,
|
|
2265
|
+
constructor(media, canvas, lcevcConfig) {}
|
|
1963
2266
|
/**
|
|
1964
|
-
* Close LCEVC
|
|
2267
|
+
* Close LCEVC Decoder.
|
|
1965
2268
|
* @override
|
|
1966
2269
|
*/
|
|
1967
2270
|
release() {}
|
|
@@ -2685,9 +2988,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2685
2988
|
* <code>load</code> but cannot interrupt calls to <code>attach</code>,
|
|
2686
2989
|
* <code>detach</code>, or <code>unload</code>.
|
|
2687
2990
|
* @param {boolean=} initializeMediaSource
|
|
2991
|
+
* @param {boolean=} keepAdManager
|
|
2688
2992
|
* @return {!Promise}
|
|
2689
2993
|
*/
|
|
2690
|
-
unload(initializeMediaSource) {}
|
|
2994
|
+
unload(initializeMediaSource, keepAdManager) {}
|
|
2691
2995
|
/**
|
|
2692
2996
|
* Provides a way to update the stream start position during the media loading
|
|
2693
2997
|
* process. Can for example be called from the <code>manifestparsed</code>
|
|
@@ -3290,6 +3594,138 @@ shaka.ads.ClientSideAd = class {
|
|
|
3290
3594
|
*/
|
|
3291
3595
|
release() {}
|
|
3292
3596
|
};
|
|
3597
|
+
/**
|
|
3598
|
+
* @implements {shaka.extern.IAd}
|
|
3599
|
+
*/
|
|
3600
|
+
shaka.ads.MediaTailorAd = class {
|
|
3601
|
+
/**
|
|
3602
|
+
* @param {mediaTailor.Ad} mediaTailorAd
|
|
3603
|
+
* @param {number} adPosition
|
|
3604
|
+
* @param {number} totalAds
|
|
3605
|
+
* @param {HTMLMediaElement} video
|
|
3606
|
+
*/
|
|
3607
|
+
constructor(mediaTailorAd, adPosition, totalAds, isLinear, video) {}
|
|
3608
|
+
/**
|
|
3609
|
+
* @override
|
|
3610
|
+
*/
|
|
3611
|
+
getDuration() {}
|
|
3612
|
+
/**
|
|
3613
|
+
* @override
|
|
3614
|
+
*/
|
|
3615
|
+
getMinSuggestedDuration() {}
|
|
3616
|
+
/**
|
|
3617
|
+
* @override
|
|
3618
|
+
*/
|
|
3619
|
+
getRemainingTime() {}
|
|
3620
|
+
/**
|
|
3621
|
+
* @override
|
|
3622
|
+
*/
|
|
3623
|
+
isPaused() {}
|
|
3624
|
+
/**
|
|
3625
|
+
* @override
|
|
3626
|
+
*/
|
|
3627
|
+
isSkippable() {}
|
|
3628
|
+
/**
|
|
3629
|
+
* @override
|
|
3630
|
+
*/
|
|
3631
|
+
getTimeUntilSkippable() {}
|
|
3632
|
+
/**
|
|
3633
|
+
* @override
|
|
3634
|
+
*/
|
|
3635
|
+
canSkipNow() {}
|
|
3636
|
+
/**
|
|
3637
|
+
* @override
|
|
3638
|
+
*/
|
|
3639
|
+
skip() {}
|
|
3640
|
+
/**
|
|
3641
|
+
* @override
|
|
3642
|
+
*/
|
|
3643
|
+
pause() {}
|
|
3644
|
+
/**
|
|
3645
|
+
* @override
|
|
3646
|
+
*/
|
|
3647
|
+
play() {}
|
|
3648
|
+
/**
|
|
3649
|
+
* @override
|
|
3650
|
+
*/
|
|
3651
|
+
getVolume() {}
|
|
3652
|
+
/**
|
|
3653
|
+
* @override
|
|
3654
|
+
*/
|
|
3655
|
+
setVolume(volume) {}
|
|
3656
|
+
/**
|
|
3657
|
+
* @override
|
|
3658
|
+
*/
|
|
3659
|
+
isMuted() {}
|
|
3660
|
+
/**
|
|
3661
|
+
* @override
|
|
3662
|
+
*/
|
|
3663
|
+
isLinear() {}
|
|
3664
|
+
/**
|
|
3665
|
+
* @override
|
|
3666
|
+
*/
|
|
3667
|
+
resize(width, height) {}
|
|
3668
|
+
/**
|
|
3669
|
+
* @override
|
|
3670
|
+
*/
|
|
3671
|
+
setMuted(muted) {}
|
|
3672
|
+
/**
|
|
3673
|
+
* @override
|
|
3674
|
+
*/
|
|
3675
|
+
getSequenceLength() {}
|
|
3676
|
+
/**
|
|
3677
|
+
* @override
|
|
3678
|
+
*/
|
|
3679
|
+
getPositionInSequence() {}
|
|
3680
|
+
/**
|
|
3681
|
+
* @override
|
|
3682
|
+
*/
|
|
3683
|
+
getTitle() {}
|
|
3684
|
+
/**
|
|
3685
|
+
* @override
|
|
3686
|
+
*/
|
|
3687
|
+
getDescription() {}
|
|
3688
|
+
/**
|
|
3689
|
+
* @override
|
|
3690
|
+
*/
|
|
3691
|
+
getVastMediaBitrate() {}
|
|
3692
|
+
/**
|
|
3693
|
+
* @override
|
|
3694
|
+
*/
|
|
3695
|
+
getVastMediaHeight() {}
|
|
3696
|
+
/**
|
|
3697
|
+
* @override
|
|
3698
|
+
*/
|
|
3699
|
+
getVastMediaWidth() {}
|
|
3700
|
+
/**
|
|
3701
|
+
* @override
|
|
3702
|
+
*/
|
|
3703
|
+
getAdId() {}
|
|
3704
|
+
/**
|
|
3705
|
+
* @override
|
|
3706
|
+
*/
|
|
3707
|
+
getCreativeAdId() {}
|
|
3708
|
+
/**
|
|
3709
|
+
* @override
|
|
3710
|
+
*/
|
|
3711
|
+
getAdvertiserName() {}
|
|
3712
|
+
/**
|
|
3713
|
+
* @override
|
|
3714
|
+
*/
|
|
3715
|
+
getMediaUrl() {}
|
|
3716
|
+
/**
|
|
3717
|
+
* @override
|
|
3718
|
+
*/
|
|
3719
|
+
getTimeOffset() {}
|
|
3720
|
+
/**
|
|
3721
|
+
* @override
|
|
3722
|
+
*/
|
|
3723
|
+
getPodIndex() {}
|
|
3724
|
+
/**
|
|
3725
|
+
* @override
|
|
3726
|
+
*/
|
|
3727
|
+
release() {}
|
|
3728
|
+
};
|
|
3293
3729
|
/**
|
|
3294
3730
|
* @implements {shaka.extern.IAd}
|
|
3295
3731
|
*/
|
|
@@ -3456,6 +3892,18 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
3456
3892
|
* @override
|
|
3457
3893
|
*/
|
|
3458
3894
|
updateClientSideAdsRenderingSettings(adsRenderingSettings) {}
|
|
3895
|
+
/**
|
|
3896
|
+
* @override
|
|
3897
|
+
*/
|
|
3898
|
+
initMediaTailor(adContainer, networkingEngine, video) {}
|
|
3899
|
+
/**
|
|
3900
|
+
* @param {string} url
|
|
3901
|
+
* @param {Object} adsParams
|
|
3902
|
+
* @param {string=} backupUrl
|
|
3903
|
+
* @return {!Promise.<string>}
|
|
3904
|
+
* @override
|
|
3905
|
+
*/
|
|
3906
|
+
requestMediaTailorStream(url, adsParams, backupUrl) {}
|
|
3459
3907
|
/**
|
|
3460
3908
|
* @override
|
|
3461
3909
|
*/
|
|
@@ -3476,11 +3924,20 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
3476
3924
|
* @override
|
|
3477
3925
|
*/
|
|
3478
3926
|
getServerSideCuePoints() {}
|
|
3927
|
+
/**
|
|
3928
|
+
* @return {!Array.<!shaka.extern.AdCuePoint>}
|
|
3929
|
+
* @override
|
|
3930
|
+
*/
|
|
3931
|
+
getCuePoints() {}
|
|
3479
3932
|
/**
|
|
3480
3933
|
* @return {shaka.extern.AdsStats}
|
|
3481
3934
|
* @override
|
|
3482
3935
|
*/
|
|
3483
3936
|
getStats() {}
|
|
3937
|
+
/**
|
|
3938
|
+
* @override
|
|
3939
|
+
*/
|
|
3940
|
+
onManifestUpdated(isLive) {}
|
|
3484
3941
|
/**
|
|
3485
3942
|
* @override
|
|
3486
3943
|
*/
|
|
@@ -4756,7 +5213,7 @@ shaka.transmuxer.MpegTsTransmuxer = class {
|
|
|
4756
5213
|
/**
|
|
4757
5214
|
* @override
|
|
4758
5215
|
*/
|
|
4759
|
-
transmux(data) {}
|
|
5216
|
+
transmux(data, stream, reference, duration, contentType) {}
|
|
4760
5217
|
};
|
|
4761
5218
|
/**
|
|
4762
5219
|
* @implements {shaka.extern.Transmuxer}
|
|
@@ -4791,39 +5248,6 @@ shaka.transmuxer.MssTransmuxer = class {
|
|
|
4791
5248
|
*/
|
|
4792
5249
|
transmux(data, stream, reference) {}
|
|
4793
5250
|
};
|
|
4794
|
-
/**
|
|
4795
|
-
* @implements {shaka.extern.Transmuxer}
|
|
4796
|
-
*/
|
|
4797
|
-
shaka.transmuxer.MuxjsTransmuxer = class {
|
|
4798
|
-
/**
|
|
4799
|
-
* @param {string} mimeType
|
|
4800
|
-
*/
|
|
4801
|
-
constructor(mimeType) {}
|
|
4802
|
-
/**
|
|
4803
|
-
* @override
|
|
4804
|
-
*/
|
|
4805
|
-
destroy() {}
|
|
4806
|
-
/**
|
|
4807
|
-
* Check if the mime type and the content type is supported.
|
|
4808
|
-
* @param {string} mimeType
|
|
4809
|
-
* @param {string=} contentType
|
|
4810
|
-
* @return {boolean}
|
|
4811
|
-
* @override
|
|
4812
|
-
*/
|
|
4813
|
-
isSupported(mimeType, contentType) {}
|
|
4814
|
-
/**
|
|
4815
|
-
* @override
|
|
4816
|
-
*/
|
|
4817
|
-
convertCodecs(contentType, mimeType) {}
|
|
4818
|
-
/**
|
|
4819
|
-
* @override
|
|
4820
|
-
*/
|
|
4821
|
-
getOrginalMimeType() {}
|
|
4822
|
-
/**
|
|
4823
|
-
* @override
|
|
4824
|
-
*/
|
|
4825
|
-
transmux(data) {}
|
|
4826
|
-
};
|
|
4827
5251
|
/**
|
|
4828
5252
|
* @implements {shaka.extern.Transmuxer}
|
|
4829
5253
|
*/
|