shaka-player 3.2.2 → 3.3.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/ISSUE_TEMPLATE/feature_request.md +1 -1
- package/.github/ISSUE_TEMPLATE/question.md +1 -1
- package/AUTHORS +6 -5
- package/CHANGELOG.md +247 -0
- package/CONTRIBUTORS +4 -2
- package/build/types/core +3 -0
- package/build/types/offline +1 -0
- package/build/types/polyfill +1 -0
- package/build/types/ui +2 -0
- package/demo/common/assets.js +18 -0
- package/demo/common/message_ids.js +13 -1
- package/demo/config.js +31 -1
- package/demo/index.html +1 -1
- package/demo/locales/en.json +12 -0
- package/demo/locales/source.json +48 -0
- package/dist/controls.css +26 -2
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +19 -16
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +19 -16
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +18 -11
- package/dist/locales.js +28 -26
- package/dist/receiver.compiled.debug.js +11 -9
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +11 -9
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +205 -15
- package/dist/shaka-player.compiled.debug.d.ts +205 -15
- package/dist/shaka-player.compiled.debug.externs.js +256 -6
- package/dist/shaka-player.compiled.debug.js +406 -354
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +256 -6
- package/dist/shaka-player.compiled.js +826 -800
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +221 -16
- package/dist/shaka-player.ui.debug.d.ts +221 -16
- package/dist/shaka-player.ui.debug.externs.js +283 -6
- package/dist/shaka-player.ui.debug.js +547 -476
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +283 -6
- package/dist/shaka-player.ui.js +1019 -980
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/bg-fetch-after.gv +29 -0
- package/docs/design/bg-fetch-after.gv.png +0 -0
- package/docs/design/bg-fetch-before.gv +18 -0
- package/docs/design/bg-fetch-before.gv.png +0 -0
- package/docs/design/bg-fetch.md +134 -0
- package/docs/tutorials/blob-url.md +15 -0
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/ui-customization.md +66 -0
- package/docs/tutorials/ui.md +5 -5
- package/externs/ima.js +3 -0
- package/externs/shaka/ads.js +5 -0
- package/externs/shaka/manifest.js +12 -1
- package/externs/shaka/manifest_parser.js +10 -1
- package/externs/shaka/net.js +20 -4
- package/externs/shaka/offline.js +31 -2
- package/externs/shaka/player.js +130 -5
- package/externs/shaka/text.js +14 -0
- package/externs/webcrypto.js +18 -0
- package/lib/abr/ewma.js +14 -0
- package/lib/abr/ewma_bandwidth_estimator.js +16 -2
- package/lib/abr/simple_abr_manager.js +6 -0
- package/lib/ads/client_side_ad.js +8 -0
- package/lib/ads/client_side_ad_manager.js +8 -4
- package/lib/ads/server_side_ad.js +7 -0
- package/lib/cast/cast_utils.js +1 -0
- package/lib/dash/dash_parser.js +48 -14
- package/lib/dash/segment_base.js +25 -1
- package/lib/dash/segment_list.js +18 -9
- package/lib/dash/segment_template.js +23 -10
- package/lib/hls/hls_parser.js +86 -23
- package/lib/media/quality_observer.js +291 -0
- package/lib/media/segment_index.js +6 -0
- package/lib/media/segment_reference.js +18 -3
- package/lib/media/streaming_engine.js +42 -4
- package/lib/net/http_fetch_plugin.js +31 -11
- package/lib/net/http_plugin_utils.js +1 -0
- package/lib/net/http_xhr_plugin.js +40 -14
- package/lib/net/networking_engine.js +81 -18
- package/lib/offline/download_info.js +68 -0
- package/lib/offline/download_manager.js +13 -5
- package/lib/offline/indexeddb/base_storage_cell.js +35 -0
- package/lib/offline/indexeddb/storage_mechanism.js +1 -1
- package/lib/offline/indexeddb/v5_storage_cell.js +5 -0
- package/lib/offline/storage.js +393 -284
- package/lib/offline/stored_content_utils.js +2 -0
- package/lib/player.js +206 -7
- package/lib/polyfill/random_uuid.js +52 -0
- package/lib/text/cue.js +12 -0
- package/lib/text/ttml_text_parser.js +25 -2
- package/lib/text/ui_text_displayer.js +2 -2
- package/lib/util/cmcd_manager.js +826 -0
- package/lib/util/error.js +6 -0
- package/lib/util/language_utils.js +12 -0
- package/lib/util/mutex.js +52 -0
- package/lib/util/periods.js +98 -64
- package/lib/util/player_configuration.js +18 -0
- package/package.json +1 -1
- package/shaka-player.uncompiled.js +3 -0
- package/test/dash/dash_parser_content_protection_unit.js +2 -0
- package/test/dash/dash_parser_live_unit.js +101 -1
- package/test/dash/dash_parser_manifest_unit.js +35 -1
- package/test/dash/dash_parser_segment_base_unit.js +2 -0
- package/test/dash/dash_parser_segment_list_unit.js +2 -1
- package/test/dash/dash_parser_segment_template_unit.js +2 -1
- package/test/hls/hls_live_unit.js +2 -0
- package/test/hls/hls_parser_unit.js +2 -0
- package/test/media/quality_observer_unit.js +139 -0
- package/test/media/segment_reference_unit.js +16 -1
- package/test/media/streaming_engine_integration.js +2 -1
- package/test/media/streaming_engine_unit.js +2 -0
- package/test/net/http_plugin_unit.js +20 -15
- package/test/offline/storage_integration.js +108 -4
- package/test/player_integration.js +99 -0
- package/test/test/util/dash_parser_util.js +4 -0
- package/test/test/util/fake_ad.js +7 -0
- package/test/test/util/fake_drm_engine.js +9 -2
- package/test/test/util/manifest_generator.js +3 -2
- package/test/test/util/test_scheme.js +14 -1
- package/test/text/ttml_text_parser_unit.js +47 -0
- package/test/ui/ui_unit.js +250 -0
- package/test/util/cmcd_manager_unit.js +277 -0
- package/ui/airplay_button.js +1 -0
- package/ui/audio_language_selection.js +7 -0
- package/ui/cast_button.js +1 -0
- package/ui/context_menu.js +109 -0
- package/ui/controls.js +41 -7
- package/ui/controls.less +1 -0
- package/ui/enums.js +4 -0
- package/ui/externs/ui.js +28 -1
- package/ui/fast_forward_button.js +14 -5
- package/ui/fullscreen_button.js +1 -0
- package/ui/less/buttons.less +0 -4
- package/ui/less/containers.less +74 -0
- package/ui/less/overflow_menu.less +0 -10
- package/ui/less/tooltip.less +97 -0
- package/ui/locales/en.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/loop_button.js +5 -0
- package/ui/mute_button.js +2 -1
- package/ui/overflow_menu.js +5 -25
- package/ui/pip_button.js +5 -0
- package/ui/play_button.js +2 -2
- package/ui/playback_rate_selection.js +8 -9
- package/ui/resolution_selection.js +7 -0
- package/ui/rewind_button.js +15 -6
- package/ui/seek_bar.js +4 -2
- package/ui/settings_menu.js +36 -4
- package/ui/small_play_button.js +1 -0
- package/ui/statistics_button.js +253 -0
- package/ui/text_selection.js +11 -4
- package/ui/ui.js +30 -0
- package/ui/volume_bar.js +1 -1
|
@@ -35,6 +35,8 @@ shaka.text = {};
|
|
|
35
35
|
shaka.ui = {};
|
|
36
36
|
/** @const */
|
|
37
37
|
shaka.util = {};
|
|
38
|
+
/** @const */
|
|
39
|
+
shaka.util.CmcdManager = {};
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* @summary Create an Event work-alike object based on the provided dictionary.
|
|
@@ -287,12 +289,156 @@ shaka.util.Error.Code = {
|
|
|
287
289
|
'MISSING_STORAGE_CELL': 9013,
|
|
288
290
|
'STORAGE_LIMIT_REACHED': 9014,
|
|
289
291
|
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
|
|
292
|
+
'MODIFY_OPERATION_NOT_SUPPORTED': 9016,
|
|
290
293
|
'CS_IMA_SDK_MISSING': 10000,
|
|
291
294
|
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
292
295
|
'SS_IMA_SDK_MISSING': 10002,
|
|
293
296
|
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
294
297
|
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
|
|
295
298
|
};
|
|
299
|
+
/**
|
|
300
|
+
* @summary A set of language utility functions.
|
|
301
|
+
* @final
|
|
302
|
+
*/
|
|
303
|
+
shaka.util.LanguageUtils = class {
|
|
304
|
+
/**
|
|
305
|
+
* Check if |locale1| and |locale2| are locale-compatible.
|
|
306
|
+
* Locale-compatible is defined as all components in each locale match. Since
|
|
307
|
+
* we only respect the language and region components, we only check that
|
|
308
|
+
* the language and region components match.
|
|
309
|
+
* Examples:
|
|
310
|
+
* Locale A | Locale B | Locale Compatible
|
|
311
|
+
* ---------------------------------------
|
|
312
|
+
* en-US | en-US | true
|
|
313
|
+
* en | en-US | false
|
|
314
|
+
* en-US | en-CA | false
|
|
315
|
+
* @param {string} locale1
|
|
316
|
+
* @param {string} locale2
|
|
317
|
+
* @return {boolean}
|
|
318
|
+
*/
|
|
319
|
+
static areLocaleCompatible(locale1, locale2) {}
|
|
320
|
+
/**
|
|
321
|
+
* Check if |locale1| and |locale2| are language-compatible.
|
|
322
|
+
* Language compatible is when the language component of each locale matches.
|
|
323
|
+
* This means that no matter what region they have (or don't have) as long as
|
|
324
|
+
* the language components match, they are language-compatible.
|
|
325
|
+
* Examples:
|
|
326
|
+
* Locale A | Locale B | Language-Compatible
|
|
327
|
+
* -----------------------------------------
|
|
328
|
+
* en-US | en-US | true
|
|
329
|
+
* en-US | en | true
|
|
330
|
+
* en-US | en-CA | true
|
|
331
|
+
* en-CA | fr-CA | false
|
|
332
|
+
* @param {string} locale1
|
|
333
|
+
* @param {string} locale2
|
|
334
|
+
* @return {boolean}
|
|
335
|
+
*/
|
|
336
|
+
static areLanguageCompatible(locale1, locale2) {}
|
|
337
|
+
/**
|
|
338
|
+
* Check if |possibleParent| is the parent locale of |possibleChild|. Because
|
|
339
|
+
* we do not support dialects, the parent-child relationship is a lot simpler.
|
|
340
|
+
* In a parent child relationship:
|
|
341
|
+
* - The parent and child have the same language-component
|
|
342
|
+
* - The parent has no region-component
|
|
343
|
+
* - The child has a region-component
|
|
344
|
+
* Example:
|
|
345
|
+
* Locale A | Locale B | Is A The parent of B?
|
|
346
|
+
* --------------------------------------------
|
|
347
|
+
* en-US | en-US | no
|
|
348
|
+
* en-US | en | no
|
|
349
|
+
* en | en-US | yes
|
|
350
|
+
* en | en | no
|
|
351
|
+
* en | fr | no
|
|
352
|
+
* @param {string} possibleParent
|
|
353
|
+
* @param {string} possibleChild
|
|
354
|
+
* @return {boolean}
|
|
355
|
+
*/
|
|
356
|
+
static isParentOf(possibleParent, possibleChild) {}
|
|
357
|
+
/**
|
|
358
|
+
* Check if |localeA| shares the same parent with |localeB|. Since we don't
|
|
359
|
+
* support dialect, we will only look at language and region. For two locales
|
|
360
|
+
* to be siblings:
|
|
361
|
+
* - Both must have language-components
|
|
362
|
+
* - Both must have region-components
|
|
363
|
+
* - Both must have the same language-component
|
|
364
|
+
* Example:
|
|
365
|
+
* Locale A | Locale B | Siblings?
|
|
366
|
+
* --------------------------------------------
|
|
367
|
+
* en-US | en-US | yes
|
|
368
|
+
* en-US | en-CA | yes
|
|
369
|
+
* en-US | en | no
|
|
370
|
+
* en | en-US | no
|
|
371
|
+
* en | en | no
|
|
372
|
+
* en | fr | no
|
|
373
|
+
* @param {string} localeA
|
|
374
|
+
* @param {string} localeB
|
|
375
|
+
* @return {boolean}
|
|
376
|
+
*/
|
|
377
|
+
static isSiblingOf(localeA, localeB) {}
|
|
378
|
+
/**
|
|
379
|
+
* Normalize a locale. This will take a locale and canonicalize it to a state
|
|
380
|
+
* that we are prepared to work with.
|
|
381
|
+
* We only support with:
|
|
382
|
+
* - language
|
|
383
|
+
* - language-REGION
|
|
384
|
+
* If given a dialect, we will discard it. We will convert any 3-character
|
|
385
|
+
* codes to 2-character codes. We will force language codes to lowercase and
|
|
386
|
+
* region codes to uppercase.
|
|
387
|
+
* @param {string} locale
|
|
388
|
+
* @return {string}
|
|
389
|
+
*/
|
|
390
|
+
static normalize(locale) {}
|
|
391
|
+
/**
|
|
392
|
+
* Check if two language codes are siblings. Language codes are siblings if
|
|
393
|
+
* they share the same base language while neither one is the base language.
|
|
394
|
+
* For example, "en-US" and "en-CA" are siblings but "en-US" and "en" are not
|
|
395
|
+
* siblings.
|
|
396
|
+
* @param {string} a
|
|
397
|
+
* @param {string} b
|
|
398
|
+
* @return {boolean}
|
|
399
|
+
*/
|
|
400
|
+
static areSiblings(a, b) {}
|
|
401
|
+
/**
|
|
402
|
+
* Compute a numerical relatedness for language codes. Language codes with a
|
|
403
|
+
* higher relatedness are a better match. Unrelated language codes have a
|
|
404
|
+
* relatedness score of 0.
|
|
405
|
+
* @param {string} target
|
|
406
|
+
* @param {string} candidate
|
|
407
|
+
* @return {number}
|
|
408
|
+
*/
|
|
409
|
+
static relatedness(target, candidate) {}
|
|
410
|
+
/**
|
|
411
|
+
* Get the normalized base language for a language code.
|
|
412
|
+
* @param {string} lang
|
|
413
|
+
* @return {string}
|
|
414
|
+
*/
|
|
415
|
+
static getBase(lang) {}
|
|
416
|
+
/**
|
|
417
|
+
* Get the normalized language of the given text stream. Will return 'und' if
|
|
418
|
+
* a language is not found on the text stream.
|
|
419
|
+
* This should always be used to get the language from a text stream.
|
|
420
|
+
* @param {shaka.extern.Stream} stream
|
|
421
|
+
* @return {string}
|
|
422
|
+
*/
|
|
423
|
+
static getLocaleForText(stream) {}
|
|
424
|
+
/**
|
|
425
|
+
* Get the normalized locale for the given variant. This will look through
|
|
426
|
+
* the variant to find the locale that represents the content in the variant.
|
|
427
|
+
* This will return 'und' if no language can be found.
|
|
428
|
+
* This should always be used to get the locale from a variant.
|
|
429
|
+
* @param {shaka.extern.Variant} variant
|
|
430
|
+
* @return {string}
|
|
431
|
+
*/
|
|
432
|
+
static getLocaleForVariant(variant) {}
|
|
433
|
+
/**
|
|
434
|
+
* Find the locale in |searchSpace| that comes closest to |target|. If no
|
|
435
|
+
* locale is found to be close to |target|, then |null| will be returned.
|
|
436
|
+
* @param {string} target
|
|
437
|
+
* @param {!Iterable.<string>} searchSpace
|
|
438
|
+
* @return {?string}
|
|
439
|
+
*/
|
|
440
|
+
static findClosestLocale(target, searchSpace) {}
|
|
441
|
+
};
|
|
296
442
|
/**
|
|
297
443
|
* Localization system provided by the shaka ui library.
|
|
298
444
|
* It can be used to store the various localized forms of
|
|
@@ -497,6 +643,14 @@ shaka.text.Cue.prototype.backgroundImage;
|
|
|
497
643
|
* @override
|
|
498
644
|
*/
|
|
499
645
|
shaka.text.Cue.prototype.border;
|
|
646
|
+
/**
|
|
647
|
+
* @override
|
|
648
|
+
*/
|
|
649
|
+
shaka.text.Cue.prototype.textStrokeColor;
|
|
650
|
+
/**
|
|
651
|
+
* @override
|
|
652
|
+
*/
|
|
653
|
+
shaka.text.Cue.prototype.textStrokeWidth;
|
|
500
654
|
/**
|
|
501
655
|
* @override
|
|
502
656
|
*/
|
|
@@ -1137,8 +1291,12 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
|
1137
1291
|
* @param {function(number, number)=} onProgressUpdated Called when a progress
|
|
1138
1292
|
* event is triggered. Passed the duration, in milliseconds, that the
|
|
1139
1293
|
* request took, and the number of bytes transferred.
|
|
1294
|
+
* @param {shaka.net.NetworkingEngine.OnHeadersReceived=} onHeadersReceived
|
|
1295
|
+
* Called when the headers are received for a download.
|
|
1296
|
+
* @param {shaka.net.NetworkingEngine.OnDownloadFailed=} onDownloadFailed
|
|
1297
|
+
* Called when a download fails, for any reason.
|
|
1140
1298
|
*/
|
|
1141
|
-
constructor(onProgressUpdated) {}
|
|
1299
|
+
constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed) {}
|
|
1142
1300
|
/**
|
|
1143
1301
|
* @param {boolean} forceHTTPS
|
|
1144
1302
|
*/
|
|
@@ -1277,6 +1435,27 @@ shaka.net.NetworkingEngine.PluginPriority = {
|
|
|
1277
1435
|
'PREFERRED': 2,
|
|
1278
1436
|
'APPLICATION': 3
|
|
1279
1437
|
};
|
|
1438
|
+
/**
|
|
1439
|
+
* @typedef {function(
|
|
1440
|
+
* !Object.<string, string>,
|
|
1441
|
+
* !shaka.extern.Request,
|
|
1442
|
+
* !shaka.net.NetworkingEngine.RequestType)}
|
|
1443
|
+
* @description
|
|
1444
|
+
* A callback function that passes the shaka.extern.HeadersReceived along to
|
|
1445
|
+
* the player, plus some extra data.
|
|
1446
|
+
*/
|
|
1447
|
+
shaka.net.NetworkingEngine.OnHeadersReceived;
|
|
1448
|
+
/**
|
|
1449
|
+
* @typedef {function(
|
|
1450
|
+
* !shaka.extern.Request,
|
|
1451
|
+
* ?shaka.util.Error,
|
|
1452
|
+
* number,
|
|
1453
|
+
* boolean)}
|
|
1454
|
+
* @description
|
|
1455
|
+
* A callback function that notifies the player when a download fails, for any
|
|
1456
|
+
* reason (e.g. even if the download was aborted).
|
|
1457
|
+
*/
|
|
1458
|
+
shaka.net.NetworkingEngine.OnDownloadFailed;
|
|
1280
1459
|
/**
|
|
1281
1460
|
* An interface to standardize how objects release internal references
|
|
1282
1461
|
* synchronously. If an object needs to asynchronously release references, then
|
|
@@ -1575,11 +1754,13 @@ shaka.media.InitSegmentReference = class {
|
|
|
1575
1754
|
* of the resource containing the segment.
|
|
1576
1755
|
* @param {number} startByte The offset from the start of the resource to the
|
|
1577
1756
|
* start of the segment.
|
|
1578
|
-
* @param {?number} endByte The offset from the start of the resource
|
|
1579
|
-
* end of the segment, inclusive. A value of null indicates that the
|
|
1757
|
+
* @param {?number} endByte The offset from the start of the resource
|
|
1758
|
+
* to the end of the segment, inclusive. A value of null indicates that the
|
|
1580
1759
|
* segment extends to the end of the resource.
|
|
1760
|
+
* @param {null|shaka.extern.MediaQualityInfo=} mediaQuality Information about
|
|
1761
|
+
* the quality of the media associated with this init segment.
|
|
1581
1762
|
*/
|
|
1582
|
-
constructor(uris, startByte, endByte) {}
|
|
1763
|
+
constructor(uris, startByte, endByte, mediaQuality) {}
|
|
1583
1764
|
/**
|
|
1584
1765
|
* Returns the offset from the start of the resource to the
|
|
1585
1766
|
* start of the segment.
|
|
@@ -2110,6 +2291,46 @@ shaka.text.UITextDisplayer = class {
|
|
|
2110
2291
|
*/
|
|
2111
2292
|
shaka.text.WebVttGenerator = class {
|
|
2112
2293
|
};
|
|
2294
|
+
/**
|
|
2295
|
+
* @typedef {{
|
|
2296
|
+
* type: string,
|
|
2297
|
+
* init: boolean,
|
|
2298
|
+
* duration: number,
|
|
2299
|
+
* mimeType: string,
|
|
2300
|
+
* codecs: string,
|
|
2301
|
+
* bandwidth: (number|undefined)
|
|
2302
|
+
* }}
|
|
2303
|
+
* @property {string} type
|
|
2304
|
+
* The media type
|
|
2305
|
+
* @property {boolean} init
|
|
2306
|
+
* Flag indicating whether the segment is an init segment
|
|
2307
|
+
* @property {number} duration
|
|
2308
|
+
* The duration of the segment in seconds
|
|
2309
|
+
* @property {string} mimeType
|
|
2310
|
+
* The segment's mime type
|
|
2311
|
+
* @property {string} codecs
|
|
2312
|
+
* The segment's codecs
|
|
2313
|
+
* @property {(number|undefined)} bandwidth
|
|
2314
|
+
* The segment's variation bandwidth
|
|
2315
|
+
*/
|
|
2316
|
+
shaka.util.CmcdManager.SegmentInfo;
|
|
2317
|
+
/**
|
|
2318
|
+
* @typedef {{
|
|
2319
|
+
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2320
|
+
* }}
|
|
2321
|
+
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2322
|
+
* The manifest's stream format
|
|
2323
|
+
*/
|
|
2324
|
+
shaka.util.CmcdManager.ManifestInfo;
|
|
2325
|
+
/**
|
|
2326
|
+
* @enum {string}
|
|
2327
|
+
*/
|
|
2328
|
+
shaka.util.CmcdManager.StreamingFormat = {
|
|
2329
|
+
DASH: 'd',
|
|
2330
|
+
HLS: 'h',
|
|
2331
|
+
SMOOTH: 's',
|
|
2332
|
+
OTHER: 'o'
|
|
2333
|
+
};
|
|
2113
2334
|
/** */
|
|
2114
2335
|
shaka.util.ConfigUtils = class {
|
|
2115
2336
|
/**
|
|
@@ -2249,6 +2470,14 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2249
2470
|
* @return {!Promise}
|
|
2250
2471
|
*/
|
|
2251
2472
|
unload(initializeMediaSource) {}
|
|
2473
|
+
/**
|
|
2474
|
+
* Provides a way to update the stream start position during the media loading
|
|
2475
|
+
* process. Can for example be called from the <code>manifestparsed</code>
|
|
2476
|
+
* event handler to update the start position based on information in the
|
|
2477
|
+
* manifest.
|
|
2478
|
+
* @param {number} startTime
|
|
2479
|
+
*/
|
|
2480
|
+
updateStartTime(startTime) {}
|
|
2252
2481
|
/**
|
|
2253
2482
|
* Tell the player to load the content at <code>assetUri</code> and start
|
|
2254
2483
|
* playback at <code>startTime</code>. Before calling <code>load</code>,
|
|
@@ -2758,6 +2987,10 @@ shaka.ads.ClientSideAd = class {
|
|
|
2758
2987
|
* @override
|
|
2759
2988
|
*/
|
|
2760
2989
|
isMuted() {}
|
|
2990
|
+
/**
|
|
2991
|
+
* @override
|
|
2992
|
+
*/
|
|
2993
|
+
isLinear() {}
|
|
2761
2994
|
/**
|
|
2762
2995
|
* @override
|
|
2763
2996
|
*/
|
|
@@ -2840,6 +3073,10 @@ shaka.ads.ServerSideAd = class {
|
|
|
2840
3073
|
* @override
|
|
2841
3074
|
*/
|
|
2842
3075
|
isMuted() {}
|
|
3076
|
+
/**
|
|
3077
|
+
* @override
|
|
3078
|
+
*/
|
|
3079
|
+
isLinear() {}
|
|
2843
3080
|
/**
|
|
2844
3081
|
* @override
|
|
2845
3082
|
*/
|
|
@@ -3310,9 +3547,11 @@ shaka.net.HttpFetchPlugin = class {
|
|
|
3310
3547
|
* @param {shaka.net.NetworkingEngine.RequestType} requestType
|
|
3311
3548
|
* @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
|
|
3312
3549
|
* progress event happened.
|
|
3550
|
+
* @param {shaka.extern.HeadersReceived} headersReceived Called when the
|
|
3551
|
+
* headers for the download are received, but before the body is.
|
|
3313
3552
|
* @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
3314
3553
|
*/
|
|
3315
|
-
static parse(uri, request, requestType, progressUpdated) {}
|
|
3554
|
+
static parse(uri, request, requestType, progressUpdated, headersReceived) {}
|
|
3316
3555
|
/**
|
|
3317
3556
|
* Determine if the Fetch API is supported in the browser. Note: this is
|
|
3318
3557
|
* deliberately exposed as a method to allow the client app to use the same
|
|
@@ -3331,9 +3570,11 @@ shaka.net.HttpXHRPlugin = class {
|
|
|
3331
3570
|
* @param {shaka.net.NetworkingEngine.RequestType} requestType
|
|
3332
3571
|
* @param {shaka.extern.ProgressUpdated} progressUpdated Called when a
|
|
3333
3572
|
* progress event happened.
|
|
3573
|
+
* @param {shaka.extern.HeadersReceived} headersReceived Called when the
|
|
3574
|
+
* headers for the download are received, but before the body is.
|
|
3334
3575
|
* @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
3335
3576
|
*/
|
|
3336
|
-
static parse(uri, request, requestType, progressUpdated) {}
|
|
3577
|
+
static parse(uri, request, requestType, progressUpdated, headersReceived) {}
|
|
3337
3578
|
};
|
|
3338
3579
|
/**
|
|
3339
3580
|
* StorageMuxer is responsible for managing StorageMechanisms and addressing
|
|
@@ -3660,6 +3901,15 @@ shaka.polyfill.PiPWebkit = class {
|
|
|
3660
3901
|
*/
|
|
3661
3902
|
static install() {}
|
|
3662
3903
|
};
|
|
3904
|
+
/**
|
|
3905
|
+
* @summary A polyfill to provide window.crypto.randomUUID in all browsers.
|
|
3906
|
+
*/
|
|
3907
|
+
shaka.polyfill.RandomUUID = class {
|
|
3908
|
+
/**
|
|
3909
|
+
* Install the polyfill if needed.
|
|
3910
|
+
*/
|
|
3911
|
+
static install() {}
|
|
3912
|
+
};
|
|
3663
3913
|
/**
|
|
3664
3914
|
* @summary A polyfill to provide navigator.storage.estimate in old
|
|
3665
3915
|
* webkit browsers.
|
|
@@ -3909,6 +4159,22 @@ shaka.ui.BigPlayButton = class extends shaka.ui.PlayButton {
|
|
|
3909
4159
|
*/
|
|
3910
4160
|
constructor(parent, controls) {}
|
|
3911
4161
|
};
|
|
4162
|
+
/**
|
|
4163
|
+
* @extends {shaka.ui.Element}
|
|
4164
|
+
* @final
|
|
4165
|
+
*/
|
|
4166
|
+
shaka.ui.ContextMenu = class extends shaka.ui.Element {
|
|
4167
|
+
/**
|
|
4168
|
+
* @param {!HTMLElement} parent
|
|
4169
|
+
* @param {!shaka.ui.Controls} controls
|
|
4170
|
+
*/
|
|
4171
|
+
constructor(parent, controls) {}
|
|
4172
|
+
/**
|
|
4173
|
+
* @param {string} name
|
|
4174
|
+
* @param {!shaka.extern.IUIElement.Factory} factory
|
|
4175
|
+
*/
|
|
4176
|
+
static registerElement(name, factory) {}
|
|
4177
|
+
};
|
|
3912
4178
|
/**
|
|
3913
4179
|
* A range element, built to work across browsers.
|
|
3914
4180
|
* In particular, getting styles to work right on IE requires a specific
|
|
@@ -4372,6 +4638,17 @@ shaka.ui.Spacer = class extends shaka.ui.Element {
|
|
|
4372
4638
|
*/
|
|
4373
4639
|
constructor(parent, controls) {}
|
|
4374
4640
|
};
|
|
4641
|
+
/**
|
|
4642
|
+
* @extends {shaka.ui.Element}
|
|
4643
|
+
* @final
|
|
4644
|
+
*/
|
|
4645
|
+
shaka.ui.StatisticsButton = class extends shaka.ui.Element {
|
|
4646
|
+
/**
|
|
4647
|
+
* @param {!HTMLElement} parent
|
|
4648
|
+
* @param {!shaka.ui.Controls} controls
|
|
4649
|
+
*/
|
|
4650
|
+
constructor(parent, controls) {}
|
|
4651
|
+
};
|
|
4375
4652
|
/**
|
|
4376
4653
|
* @extends {shaka.ui.SettingsMenu}
|
|
4377
4654
|
* @final
|