shaka-player 4.3.12 → 4.3.14
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/ISSUE_TEMPLATE/question.md +7 -0
- package/.github/workflows/release-please.yaml +2 -27
- package/AUTHORS +5 -0
- package/CHANGELOG.md +108 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTORS +6 -0
- package/README.md +2 -0
- package/demo/common/asset.js +5 -1
- package/demo/common/assets.js +16 -2
- package/demo/common/message_ids.js +1 -0
- package/demo/custom.js +2 -0
- package/demo/locales/en.json +1 -0
- package/demo/locales/source.json +4 -0
- package/demo/main.js +1 -1
- package/dist/demo.compiled.debug.js +56 -54
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +56 -54
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +6 -6
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +24 -22
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +24 -22
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +26 -6
- package/dist/shaka-player.compiled.debug.d.ts +26 -6
- package/dist/shaka-player.compiled.debug.externs.js +79 -49
- package/dist/shaka-player.compiled.debug.js +426 -410
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +79 -49
- package/dist/shaka-player.compiled.js +912 -901
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +38 -7
- package/dist/shaka-player.ui.debug.d.ts +38 -7
- package/dist/shaka-player.ui.debug.externs.js +80 -49
- package/dist/shaka-player.ui.debug.js +460 -442
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +80 -49
- package/dist/shaka-player.ui.js +1060 -1049
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ad_monetization.md +54 -0
- package/docs/tutorials/fairplay.md +2 -2
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/offline.md +1 -1
- package/docs/tutorials/plugins.md +4 -0
- package/docs/tutorials/text-displayer.md +15 -0
- package/docs/tutorials/ui-customization.md +29 -0
- package/docs/tutorials/ui.md +4 -1
- package/externs/lcevc.js +6 -0
- package/externs/shaka/manifest_parser.js +8 -0
- package/externs/shaka/player.js +1 -1
- package/externs/shaka/text.js +3 -1
- package/lib/abr/simple_abr_manager.js +1 -1
- package/lib/ads/client_side_ad.js +9 -0
- package/lib/ads/client_side_ad_manager.js +7 -2
- package/lib/ads/server_side_ad_manager.js +4 -0
- package/lib/cast/cast_proxy.js +18 -0
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/cea_decoder.js +11 -1
- package/lib/dash/dash_parser.js +79 -42
- package/lib/dash/mpd_utils.js +39 -27
- package/lib/hls/hls_parser.js +148 -49
- package/lib/hls/hls_utils.js +5 -5
- package/lib/media/content_workarounds.js +30 -0
- package/lib/media/drm_engine.js +16 -12
- package/lib/media/media_source_engine.js +4 -2
- package/lib/media/play_rate_controller.js +1 -0
- package/lib/media/presentation_timeline.js +11 -0
- package/lib/media/quality_observer.js +1 -1
- package/lib/media/segment_reference.js +16 -7
- package/lib/media/streaming_engine.js +64 -54
- package/lib/media/transmuxer.js +1 -1
- package/lib/media/video_wrapper.js +4 -3
- package/lib/offline/offline_manifest_parser.js +5 -0
- package/lib/offline/session_deleter.js +0 -8
- package/lib/offline/storage.js +4 -1
- package/lib/player.js +79 -18
- package/lib/polyfill/media_capabilities.js +23 -3
- package/lib/text/mp4_ttml_parser.js +2 -2
- package/lib/text/simple_text_displayer.js +7 -6
- package/lib/text/srt_text_parser.js +2 -2
- package/lib/text/text_engine.js +3 -2
- package/lib/text/ttml_text_parser.js +33 -5
- package/lib/text/ui_text_displayer.js +81 -15
- package/lib/text/vtt_text_parser.js +13 -0
- package/lib/util/buffer_utils.js +26 -4
- package/lib/util/cmcd_manager.js +16 -1
- package/lib/util/fairplay_utils.js +1 -1
- package/lib/util/manifest_parser_utils.js +20 -8
- package/lib/util/object_utils.js +1 -1
- package/lib/util/periods.js +91 -36
- package/lib/util/platform.js +39 -2
- package/lib/util/player_configuration.js +5 -3
- package/lib/util/stream_utils.js +36 -28
- package/lib/util/ts_parser.js +3 -3
- package/lib/util/xml_utils.js +5 -0
- package/package.json +2 -2
- package/test/cea/cea_decoder_unit.js +40 -0
- package/test/dash/dash_parser_live_unit.js +5 -8
- package/test/dash/dash_parser_manifest_unit.js +5 -0
- package/test/dash/dash_parser_segment_base_unit.js +5 -0
- package/test/dash/dash_parser_segment_list_unit.js +21 -17
- package/test/dash/dash_parser_segment_template_unit.js +5 -0
- package/test/hls/hls_live_unit.js +33 -0
- package/test/hls/hls_parser_unit.js +52 -60
- package/test/media/buffering_observer_unit.js +13 -0
- package/test/media/content_workarounds_unit.js +1 -1
- package/test/media/drm_engine_unit.js +30 -3
- package/test/media/media_source_engine_unit.js +1 -1
- package/test/media/transmuxer_integration.js +2 -2
- package/test/offline/storage_integration.js +3 -0
- package/test/player_integration.js +40 -40
- package/test/player_unit.js +31 -0
- package/test/polyfill/media_capabilities_unit.js +12 -6
- package/test/test/util/dash_parser_util.js +16 -7
- package/test/test/util/fake_drm_engine.js +7 -0
- package/test/test/util/layout_tests.js +2 -1
- package/test/test/util/simple_fakes.js +2 -2
- package/test/test/util/test_scheme.js +3 -0
- package/test/test/util/waiter.js +5 -0
- package/test/text/mp4_ttml_parser_unit.js +4 -4
- package/test/text/simple_text_displayer_unit.js +1 -1
- package/test/text/srt_text_parser_unit.js +1 -1
- package/test/text/text_engine_unit.js +6 -0
- package/test/text/ttml_text_parser_unit.js +49 -18
- package/test/text/ui_text_displayer_unit.js +9 -0
- package/test/text/vtt_text_parser_unit.js +2 -17
- package/test/util/buffer_utils_unit.js +1 -1
- package/test/util/periods_unit.js +113 -0
- package/test/util/ts_parser_unit.js +1 -1
- package/third_party/closure-uri/uri.js +1 -1
- package/ui/externs/ui.js +24 -0
- package/ui/language_utils.js +11 -5
- package/ui/play_button.js +20 -0
- package/ui/playback_rate_selection.js +4 -0
- package/ui/presentation_time.js +5 -5
- package/ui/small_play_button.js +2 -2
- package/ui/volume_bar.js +10 -6
- /package/.github/{config.yml → ISSUE_TEMPLATE/config.yml} +0 -0
|
@@ -424,6 +424,18 @@ shaka.util.BufferUtils = class {
|
|
|
424
424
|
* @return {!Uint8Array}
|
|
425
425
|
*/
|
|
426
426
|
static toUint8(data, offset, length) {}
|
|
427
|
+
/**
|
|
428
|
+
* Creates a new Uint16Array view on the same buffer. This clamps the values
|
|
429
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
430
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
431
|
+
* pass a negative offset to access the data before the view.
|
|
432
|
+
* @param {BufferSource} data
|
|
433
|
+
* @param {number=} offset The offset from the beginning of this data's view
|
|
434
|
+
* to start the new view at.
|
|
435
|
+
* @param {number=} length The byte length of the new view.
|
|
436
|
+
* @return {!Uint16Array}
|
|
437
|
+
*/
|
|
438
|
+
static toUint16(data, offset, length) {}
|
|
427
439
|
/**
|
|
428
440
|
* Creates a DataView over the given buffer.
|
|
429
441
|
* @see toUint8
|
|
@@ -1664,11 +1676,13 @@ shaka.media.InitSegmentReference = class {
|
|
|
1664
1676
|
* @param {?number} endByte The offset from the start of the resource
|
|
1665
1677
|
* to the end of the segment, inclusive. A value of null indicates that the
|
|
1666
1678
|
* segment extends to the end of the resource.
|
|
1667
|
-
* @param {null|shaka.extern.MediaQualityInfo=} mediaQuality Information
|
|
1668
|
-
* the quality of the media associated with this init segment.
|
|
1669
|
-
* @param {number=} timescale
|
|
1679
|
+
* @param {(null|shaka.extern.MediaQualityInfo)=} mediaQuality Information
|
|
1680
|
+
* about the quality of the media associated with this init segment.
|
|
1681
|
+
* @param {(null|number)=} timescale
|
|
1682
|
+
* @param {?shaka.extern.HlsAes128Key=} aes128Key
|
|
1683
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1670
1684
|
*/
|
|
1671
|
-
constructor(uris, startByte, endByte, mediaQuality, timescale) {}
|
|
1685
|
+
constructor(uris, startByte, endByte, mediaQuality, timescale, aes128Key) {}
|
|
1672
1686
|
/**
|
|
1673
1687
|
* Returns the offset from the start of the resource to the
|
|
1674
1688
|
* start of the segment.
|
|
@@ -1982,6 +1996,11 @@ shaka.media.PresentationTimeline = class {
|
|
|
1982
1996
|
* windows to jump around on updates.
|
|
1983
1997
|
*/
|
|
1984
1998
|
lockStartTime() {}
|
|
1999
|
+
/**
|
|
2000
|
+
* Returns if the presentation timeline's start time is locked.
|
|
2001
|
+
* @return {boolean}
|
|
2002
|
+
*/
|
|
2003
|
+
isStartTimeLocked() {}
|
|
1985
2004
|
/**
|
|
1986
2005
|
* Gives PresentationTimeline a Stream's minimum segment start time.
|
|
1987
2006
|
* @param {number} startTime
|
|
@@ -2246,13 +2265,56 @@ shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
|
|
|
2246
2265
|
*/
|
|
2247
2266
|
updateEvery(interval, updateCallback) {}
|
|
2248
2267
|
};
|
|
2268
|
+
/**
|
|
2269
|
+
* @typedef {{
|
|
2270
|
+
* type: string,
|
|
2271
|
+
* init: boolean,
|
|
2272
|
+
* duration: number,
|
|
2273
|
+
* mimeType: string,
|
|
2274
|
+
* codecs: string,
|
|
2275
|
+
* bandwidth: (number|undefined)
|
|
2276
|
+
* }}
|
|
2277
|
+
* @property {string} type
|
|
2278
|
+
* The media type
|
|
2279
|
+
* @property {boolean} init
|
|
2280
|
+
* Flag indicating whether the segment is an init segment
|
|
2281
|
+
* @property {number} duration
|
|
2282
|
+
* The duration of the segment in seconds
|
|
2283
|
+
* @property {string} mimeType
|
|
2284
|
+
* The segment's mime type
|
|
2285
|
+
* @property {string} codecs
|
|
2286
|
+
* The segment's codecs
|
|
2287
|
+
* @property {(number|undefined)} bandwidth
|
|
2288
|
+
* The segment's variation bandwidth
|
|
2289
|
+
*/
|
|
2290
|
+
shaka.util.CmcdManager.SegmentInfo;
|
|
2291
|
+
/**
|
|
2292
|
+
* @typedef {{
|
|
2293
|
+
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2294
|
+
* }}
|
|
2295
|
+
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2296
|
+
* The manifest's stream format
|
|
2297
|
+
*/
|
|
2298
|
+
shaka.util.CmcdManager.ManifestInfo;
|
|
2299
|
+
/**
|
|
2300
|
+
* @enum {string}
|
|
2301
|
+
*/
|
|
2302
|
+
shaka.util.CmcdManager.StreamingFormat = {
|
|
2303
|
+
DASH: 'd',
|
|
2304
|
+
HLS: 'h',
|
|
2305
|
+
SMOOTH: 's',
|
|
2306
|
+
OTHER: 'o'
|
|
2307
|
+
};
|
|
2249
2308
|
/**
|
|
2250
2309
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
2251
2310
|
* @implements {shaka.extern.TextDisplayer}
|
|
2252
2311
|
*/
|
|
2253
2312
|
shaka.text.SimpleTextDisplayer = class {
|
|
2254
|
-
/**
|
|
2255
|
-
|
|
2313
|
+
/**
|
|
2314
|
+
* @param {HTMLMediaElement} video
|
|
2315
|
+
* @param {string} label
|
|
2316
|
+
*/
|
|
2317
|
+
constructor(video, label) {}
|
|
2256
2318
|
/**
|
|
2257
2319
|
* @override
|
|
2258
2320
|
*/
|
|
@@ -2321,46 +2383,6 @@ shaka.text.UITextDisplayer = class {
|
|
|
2321
2383
|
*/
|
|
2322
2384
|
shaka.text.WebVttGenerator = class {
|
|
2323
2385
|
};
|
|
2324
|
-
/**
|
|
2325
|
-
* @typedef {{
|
|
2326
|
-
* type: string,
|
|
2327
|
-
* init: boolean,
|
|
2328
|
-
* duration: number,
|
|
2329
|
-
* mimeType: string,
|
|
2330
|
-
* codecs: string,
|
|
2331
|
-
* bandwidth: (number|undefined)
|
|
2332
|
-
* }}
|
|
2333
|
-
* @property {string} type
|
|
2334
|
-
* The media type
|
|
2335
|
-
* @property {boolean} init
|
|
2336
|
-
* Flag indicating whether the segment is an init segment
|
|
2337
|
-
* @property {number} duration
|
|
2338
|
-
* The duration of the segment in seconds
|
|
2339
|
-
* @property {string} mimeType
|
|
2340
|
-
* The segment's mime type
|
|
2341
|
-
* @property {string} codecs
|
|
2342
|
-
* The segment's codecs
|
|
2343
|
-
* @property {(number|undefined)} bandwidth
|
|
2344
|
-
* The segment's variation bandwidth
|
|
2345
|
-
*/
|
|
2346
|
-
shaka.util.CmcdManager.SegmentInfo;
|
|
2347
|
-
/**
|
|
2348
|
-
* @typedef {{
|
|
2349
|
-
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2350
|
-
* }}
|
|
2351
|
-
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2352
|
-
* The manifest's stream format
|
|
2353
|
-
*/
|
|
2354
|
-
shaka.util.CmcdManager.ManifestInfo;
|
|
2355
|
-
/**
|
|
2356
|
-
* @enum {string}
|
|
2357
|
-
*/
|
|
2358
|
-
shaka.util.CmcdManager.StreamingFormat = {
|
|
2359
|
-
DASH: 'd',
|
|
2360
|
-
HLS: 'h',
|
|
2361
|
-
SMOOTH: 's',
|
|
2362
|
-
OTHER: 'o'
|
|
2363
|
-
};
|
|
2364
2386
|
/** */
|
|
2365
2387
|
shaka.util.ConfigUtils = class {
|
|
2366
2388
|
/**
|
|
@@ -3628,6 +3650,10 @@ shaka.dash.DashParser = class {
|
|
|
3628
3650
|
* @override
|
|
3629
3651
|
*/
|
|
3630
3652
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3653
|
+
/**
|
|
3654
|
+
* @override
|
|
3655
|
+
*/
|
|
3656
|
+
onInitialVariantChosen(variant) {}
|
|
3631
3657
|
};
|
|
3632
3658
|
/**
|
|
3633
3659
|
* @summary A networking plugin to handle data URIs.
|
|
@@ -3673,6 +3699,10 @@ shaka.hls.HlsParser = class {
|
|
|
3673
3699
|
* @override
|
|
3674
3700
|
*/
|
|
3675
3701
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3702
|
+
/**
|
|
3703
|
+
* @override
|
|
3704
|
+
*/
|
|
3705
|
+
onInitialVariantChosen(variant) {}
|
|
3676
3706
|
};
|
|
3677
3707
|
/**
|
|
3678
3708
|
* @summary A networking plugin to handle http and https URIs via the Fetch API.
|
|
@@ -4128,7 +4158,7 @@ shaka.text.TtmlTextParser = class {
|
|
|
4128
4158
|
/**
|
|
4129
4159
|
* @override
|
|
4130
4160
|
*/
|
|
4131
|
-
parseMedia(data, time) {}
|
|
4161
|
+
parseMedia(data, time, uri) {}
|
|
4132
4162
|
};
|
|
4133
4163
|
/**
|
|
4134
4164
|
* @implements {shaka.extern.TextParser}
|
|
@@ -4147,7 +4177,7 @@ shaka.text.Mp4TtmlParser = class {
|
|
|
4147
4177
|
/**
|
|
4148
4178
|
* @override
|
|
4149
4179
|
*/
|
|
4150
|
-
parseMedia(data, time) {}
|
|
4180
|
+
parseMedia(data, time, uri) {}
|
|
4151
4181
|
};
|
|
4152
4182
|
/**
|
|
4153
4183
|
* @implements {shaka.extern.TextParser}
|
|
@@ -4221,7 +4251,7 @@ shaka.text.SrtTextParser = class {
|
|
|
4221
4251
|
/**
|
|
4222
4252
|
* @override
|
|
4223
4253
|
*/
|
|
4224
|
-
parseMedia(data, time) {}
|
|
4254
|
+
parseMedia(data, time, uri) {}
|
|
4225
4255
|
/**
|
|
4226
4256
|
* Convert a SRT format to WebVTT
|
|
4227
4257
|
* @param {string} data
|