shaka-player 4.10.13 → 4.11.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/README.md +5 -1
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +11 -11
- package/dist/locales.js +38 -34
- package/dist/shaka-player.compiled.d.ts +68 -33
- package/dist/shaka-player.compiled.debug.d.ts +68 -33
- package/dist/shaka-player.compiled.debug.externs.js +584 -544
- package/dist/shaka-player.compiled.debug.js +715 -676
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +584 -544
- package/dist/shaka-player.compiled.js +1394 -1371
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +76 -34
- package/dist/shaka-player.ui.debug.d.ts +76 -34
- package/dist/shaka-player.ui.debug.externs.js +77 -26
- package/dist/shaka-player.ui.debug.js +774 -720
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +77 -26
- package/dist/shaka-player.ui.js +1649 -1617
- package/dist/shaka-player.ui.map +4 -4
- package/externs/mediasession.js +10 -1
- package/externs/shaka/ads.js +79 -2
- package/externs/shaka/manifest.js +6 -1
- package/externs/shaka/manifest_parser.js +6 -2
- package/externs/shaka/net.js +23 -2
- package/externs/shaka/player.js +414 -103
- package/externs/shaka/text.js +2 -1
- package/lib/abr/simple_abr_manager.js +5 -0
- package/lib/ads/ad_manager.js +45 -1
- package/lib/ads/ad_utils.js +124 -1
- package/lib/ads/interstitial_ad.js +9 -2
- package/lib/ads/interstitial_ad_manager.js +216 -101
- package/lib/ads/media_tailor_ad.js +1 -39
- package/lib/ads/media_tailor_ad_manager.js +32 -16
- package/lib/cea/cea608_data_channel.js +40 -8
- package/lib/cea/cea608_memory.js +28 -0
- package/lib/dash/dash_parser.js +162 -25
- package/lib/dash/segment_base.js +3 -2
- package/lib/dash/segment_list.js +6 -3
- package/lib/dash/segment_template.js +104 -20
- package/lib/hls/hls_parser.js +319 -215
- package/lib/media/drm_engine.js +11 -3
- package/lib/media/media_source_engine.js +0 -8
- package/lib/media/preload_manager.js +16 -4
- package/lib/media/segment_reference.js +3 -0
- package/lib/media/segment_utils.js +8 -1
- package/lib/media/streaming_engine.js +10 -6
- package/lib/mss/mss_parser.js +14 -2
- package/lib/net/http_fetch_plugin.js +12 -5
- package/lib/net/http_xhr_plugin.js +7 -3
- package/lib/net/networking_engine.js +21 -1
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +336 -121
- package/lib/text/cue.js +373 -0
- package/lib/text/mp4_ttml_parser.js +51 -1
- package/lib/text/mp4_vtt_parser.js +2 -5
- package/lib/text/sbv_text_parser.js +2 -31
- package/lib/text/srt_text_parser.js +1 -1
- package/lib/text/text_engine.js +1 -1
- package/lib/text/text_utils.js +1 -0
- package/lib/text/ttml_text_parser.js +14 -4
- package/lib/text/ui_text_displayer.js +0 -4
- package/lib/text/vtt_text_parser.js +10 -415
- package/lib/util/abortable_operation.js +8 -0
- package/lib/util/cmcd_manager.js +38 -0
- package/lib/util/error.js +16 -0
- package/lib/util/fake_event.js +1 -0
- package/lib/util/manifest_parser_utils.js +12 -3
- package/lib/util/player_configuration.js +4 -2
- package/lib/util/stream_utils.js +57 -2
- package/lib/util/tXml.js +2 -1
- package/lib/util/text_parser.js +46 -0
- package/lib/util/ts_parser.js +32 -3
- package/package.json +1 -1
- package/shaka-player.uncompiled.js +1 -1
- package/ui/chapter_selection.js +179 -0
- package/ui/controls.js +151 -0
- package/ui/enums.js +1 -0
- package/ui/externs/ui.js +7 -1
- package/ui/less/containers.less +3 -4
- package/ui/less/overflow_menu.less +5 -0
- package/ui/less/tooltip.less +1 -1
- package/ui/locales/en.json +1 -0
- package/ui/locales/es.json +1 -0
- package/ui/locales/fr.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/seek_bar.js +3 -2
- package/ui/ui.js +2 -0
- package/lib/polyfill/abort_controller.js +0 -158
|
@@ -298,83 +298,395 @@ shaka.text.CueRegion.scrollMode = {
|
|
|
298
298
|
'UP': 'up'
|
|
299
299
|
};
|
|
300
300
|
/**
|
|
301
|
+
* @summary
|
|
302
|
+
* Describes an error that happened.
|
|
303
|
+
* @description
|
|
304
|
+
* This uses numerical codes to describe
|
|
305
|
+
* which error happened.
|
|
306
|
+
* Some error are caused by errors from the browser. In these cases, the error
|
|
307
|
+
* object is provided as part of the <code>data</code> field. System codes come
|
|
308
|
+
* from the browser and may or may not be documented. Here are some places
|
|
309
|
+
* where the errors may be documented:
|
|
310
|
+
* <ul>
|
|
311
|
+
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
|
|
312
|
+
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
|
|
313
|
+
* <li><a href="https://hresult.info">Edge/PlayReady errors</a>
|
|
314
|
+
* </ul>
|
|
315
|
+
* @implements {shaka.extern.Error}
|
|
316
|
+
* @extends {Error}
|
|
301
317
|
*/
|
|
302
|
-
shaka.
|
|
303
|
-
/**
|
|
304
|
-
* @param {number} startTime
|
|
305
|
-
* @param {number} endTime
|
|
306
|
-
* @param {string} payload
|
|
307
|
-
*/
|
|
308
|
-
constructor(startTime, endTime, payload) {}
|
|
309
|
-
/**
|
|
310
|
-
* Create a copy of the cue with the same properties.
|
|
311
|
-
* @return {!shaka.text.Cue}
|
|
312
|
-
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
313
|
-
*/
|
|
314
|
-
clone() {}
|
|
318
|
+
shaka.util.Error = class {
|
|
315
319
|
/**
|
|
316
|
-
*
|
|
317
|
-
* @param {
|
|
318
|
-
* @param {
|
|
319
|
-
* @
|
|
320
|
-
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
320
|
+
* @param {shaka.util.Error.Severity} severity
|
|
321
|
+
* @param {shaka.util.Error.Category} category
|
|
322
|
+
* @param {shaka.util.Error.Code} code
|
|
323
|
+
* @param {...*} varArgs
|
|
321
324
|
*/
|
|
322
|
-
|
|
325
|
+
constructor(severity, category, code, ...varArgs) {}
|
|
323
326
|
};
|
|
324
327
|
/**
|
|
325
|
-
*
|
|
326
|
-
* presentation.
|
|
327
|
-
* @type {number}
|
|
328
|
-
*/
|
|
329
|
-
shaka.text.Cue.prototype.startTime;
|
|
330
|
-
/**
|
|
331
|
-
* The end time of the cue in seconds, relative to the start of the
|
|
332
|
-
* presentation.
|
|
333
|
-
* @type {number}
|
|
328
|
+
* @override
|
|
334
329
|
*/
|
|
335
|
-
shaka.
|
|
330
|
+
shaka.util.Error.prototype.severity;
|
|
336
331
|
/**
|
|
337
|
-
*
|
|
338
|
-
* empty. Top-level block containers should have no payload of their own.
|
|
339
|
-
* @type {string}
|
|
332
|
+
* @override
|
|
340
333
|
*/
|
|
341
|
-
shaka.
|
|
334
|
+
shaka.util.Error.prototype.category;
|
|
342
335
|
/**
|
|
343
|
-
*
|
|
344
|
-
* because nested cues are inline elements.
|
|
345
|
-
* @type {shaka.text.CueRegion}
|
|
336
|
+
* @override
|
|
346
337
|
*/
|
|
347
|
-
shaka.
|
|
338
|
+
shaka.util.Error.prototype.code;
|
|
348
339
|
/**
|
|
349
|
-
*
|
|
350
|
-
* writing direction.
|
|
351
|
-
* @type {?number}
|
|
340
|
+
* @override
|
|
352
341
|
*/
|
|
353
|
-
shaka.
|
|
342
|
+
shaka.util.Error.prototype.data;
|
|
354
343
|
/**
|
|
355
|
-
*
|
|
356
|
-
* @type {shaka.text.Cue.positionAlign}
|
|
344
|
+
* @override
|
|
357
345
|
*/
|
|
358
|
-
shaka.
|
|
346
|
+
shaka.util.Error.prototype.handled;
|
|
359
347
|
/**
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
348
|
+
* @enum {number}
|
|
349
|
+
*/
|
|
350
|
+
shaka.util.Error.Severity = {
|
|
351
|
+
'RECOVERABLE': 1,
|
|
352
|
+
'CRITICAL': 2
|
|
353
|
+
};
|
|
364
354
|
/**
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
355
|
+
* @enum {number}
|
|
356
|
+
*/
|
|
357
|
+
shaka.util.Error.Category = {
|
|
358
|
+
'NETWORK': 1,
|
|
359
|
+
'TEXT': 2,
|
|
360
|
+
'MEDIA': 3,
|
|
361
|
+
'MANIFEST': 4,
|
|
362
|
+
'STREAMING': 5,
|
|
363
|
+
'DRM': 6,
|
|
364
|
+
'PLAYER': 7,
|
|
365
|
+
'CAST': 8,
|
|
366
|
+
'STORAGE': 9,
|
|
367
|
+
'ADS': 10
|
|
368
|
+
};
|
|
369
369
|
/**
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
370
|
+
* @enum {number}
|
|
371
|
+
*/
|
|
372
|
+
shaka.util.Error.Code = {
|
|
373
|
+
'UNSUPPORTED_SCHEME': 1000,
|
|
374
|
+
'BAD_HTTP_STATUS': 1001,
|
|
375
|
+
'HTTP_ERROR': 1002,
|
|
376
|
+
'TIMEOUT': 1003,
|
|
377
|
+
'MALFORMED_DATA_URI': 1004,
|
|
378
|
+
'REQUEST_FILTER_ERROR': 1006,
|
|
379
|
+
'RESPONSE_FILTER_ERROR': 1007,
|
|
380
|
+
'MALFORMED_TEST_URI': 1008,
|
|
381
|
+
'UNEXPECTED_TEST_REQUEST': 1009,
|
|
382
|
+
'ATTEMPTS_EXHAUSTED': 1010,
|
|
383
|
+
'SEGMENT_MISSING': 1011,
|
|
384
|
+
'INVALID_TEXT_HEADER': 2000,
|
|
385
|
+
'INVALID_TEXT_CUE': 2001,
|
|
386
|
+
'UNABLE_TO_DETECT_ENCODING': 2003,
|
|
387
|
+
'BAD_ENCODING': 2004,
|
|
388
|
+
'INVALID_XML': 2005,
|
|
389
|
+
'INVALID_MP4_TTML': 2007,
|
|
390
|
+
'INVALID_MP4_VTT': 2008,
|
|
391
|
+
'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
|
|
392
|
+
'INVALID_MP4_CEA': 2010,
|
|
393
|
+
'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
|
|
394
|
+
'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
|
|
395
|
+
'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
|
|
396
|
+
'MISSING_TEXT_PLUGIN': 2014,
|
|
397
|
+
'CHAPTERS_TRACK_FAILED': 2015,
|
|
398
|
+
'UNSUPPORTED_EXTERNAL_THUMBNAILS_URI': 2017,
|
|
399
|
+
'BUFFER_READ_OUT_OF_BOUNDS': 3000,
|
|
400
|
+
'JS_INTEGER_OVERFLOW': 3001,
|
|
401
|
+
'EBML_OVERFLOW': 3002,
|
|
402
|
+
'EBML_BAD_FLOATING_POINT_SIZE': 3003,
|
|
403
|
+
'MP4_SIDX_WRONG_BOX_TYPE': 3004,
|
|
404
|
+
'MP4_SIDX_INVALID_TIMESCALE': 3005,
|
|
405
|
+
'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
|
|
406
|
+
'WEBM_CUES_ELEMENT_MISSING': 3007,
|
|
407
|
+
'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
|
|
408
|
+
'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
|
|
409
|
+
'WEBM_INFO_ELEMENT_MISSING': 3010,
|
|
410
|
+
'WEBM_DURATION_ELEMENT_MISSING': 3011,
|
|
411
|
+
'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
|
|
412
|
+
'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
|
|
413
|
+
'MEDIA_SOURCE_OPERATION_FAILED': 3014,
|
|
414
|
+
'MEDIA_SOURCE_OPERATION_THREW': 3015,
|
|
415
|
+
'VIDEO_ERROR': 3016,
|
|
416
|
+
'QUOTA_EXCEEDED_ERROR': 3017,
|
|
417
|
+
'TRANSMUXING_FAILED': 3018,
|
|
418
|
+
'CONTENT_TRANSFORMATION_FAILED': 3019,
|
|
419
|
+
'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
|
|
420
|
+
'MSS_TRANSMUXING_FAILED': 3022,
|
|
421
|
+
'TRANSMUXING_NO_VIDEO_DATA': 3023,
|
|
422
|
+
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
|
|
423
|
+
'DASH_INVALID_XML': 4001,
|
|
424
|
+
'DASH_NO_SEGMENT_INFO': 4002,
|
|
425
|
+
'DASH_EMPTY_ADAPTATION_SET': 4003,
|
|
426
|
+
'DASH_EMPTY_PERIOD': 4004,
|
|
427
|
+
'DASH_WEBM_MISSING_INIT': 4005,
|
|
428
|
+
'DASH_UNSUPPORTED_CONTAINER': 4006,
|
|
429
|
+
'DASH_PSSH_BAD_ENCODING': 4007,
|
|
430
|
+
'DASH_NO_COMMON_KEY_SYSTEM': 4008,
|
|
431
|
+
'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
|
|
432
|
+
'DASH_CONFLICTING_KEY_IDS': 4010,
|
|
433
|
+
'RESTRICTIONS_CANNOT_BE_MET': 4012,
|
|
434
|
+
'HLS_PLAYLIST_HEADER_MISSING': 4015,
|
|
435
|
+
'INVALID_HLS_TAG': 4016,
|
|
436
|
+
'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
|
|
437
|
+
'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
|
|
438
|
+
'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
|
|
439
|
+
'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
|
|
440
|
+
'HLS_REQUIRED_TAG_MISSING': 4024,
|
|
441
|
+
'HLS_COULD_NOT_GUESS_CODECS': 4025,
|
|
442
|
+
'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
|
|
443
|
+
'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
|
|
444
|
+
'DASH_XLINK_DEPTH_LIMIT': 4028,
|
|
445
|
+
'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
|
|
446
|
+
'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
|
|
447
|
+
'NO_VARIANTS': 4036,
|
|
448
|
+
'PERIOD_FLATTENING_FAILED': 4037,
|
|
449
|
+
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
450
|
+
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
451
|
+
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
452
|
+
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
453
|
+
'NO_WEB_CRYPTO_API': 4042,
|
|
454
|
+
'CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM': 4045,
|
|
455
|
+
'MSS_INVALID_XML': 4046,
|
|
456
|
+
'MSS_LIVE_CONTENT_NOT_SUPPORTED': 4047,
|
|
457
|
+
'AES_128_INVALID_IV_LENGTH': 4048,
|
|
458
|
+
'AES_128_INVALID_KEY_LENGTH': 4049,
|
|
459
|
+
'DASH_CONFLICTING_AES_128': 4050,
|
|
460
|
+
'DASH_UNSUPPORTED_AES_128': 4051,
|
|
461
|
+
'DASH_INVALID_PATCH': 4052,
|
|
462
|
+
'HLS_EMPTY_MEDIA_PLAYLIST': 4053,
|
|
463
|
+
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
464
|
+
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
465
|
+
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
466
|
+
'FAILED_TO_CREATE_CDM': 6002,
|
|
467
|
+
'FAILED_TO_ATTACH_TO_VIDEO': 6003,
|
|
468
|
+
'INVALID_SERVER_CERTIFICATE': 6004,
|
|
469
|
+
'FAILED_TO_CREATE_SESSION': 6005,
|
|
470
|
+
'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
|
|
471
|
+
'LICENSE_REQUEST_FAILED': 6007,
|
|
472
|
+
'LICENSE_RESPONSE_REJECTED': 6008,
|
|
473
|
+
'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
|
|
474
|
+
'NO_LICENSE_SERVER_GIVEN': 6012,
|
|
475
|
+
'OFFLINE_SESSION_REMOVED': 6013,
|
|
476
|
+
'EXPIRED': 6014,
|
|
477
|
+
'SERVER_CERTIFICATE_REQUIRED': 6015,
|
|
478
|
+
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
479
|
+
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
|
|
480
|
+
'MIN_HDCP_VERSION_NOT_MATCH': 6018,
|
|
481
|
+
'ERROR_CHECKING_HDCP_VERSION': 6019,
|
|
482
|
+
'LOAD_INTERRUPTED': 7000,
|
|
483
|
+
'OPERATION_ABORTED': 7001,
|
|
484
|
+
'NO_VIDEO_ELEMENT': 7002,
|
|
485
|
+
'OBJECT_DESTROYED': 7003,
|
|
486
|
+
'CONTENT_NOT_LOADED': 7004,
|
|
487
|
+
'SRC_EQUALS_PRELOAD_NOT_SUPPORTED': 7005,
|
|
488
|
+
'CAST_API_UNAVAILABLE': 8000,
|
|
489
|
+
'NO_CAST_RECEIVERS': 8001,
|
|
490
|
+
'ALREADY_CASTING': 8002,
|
|
491
|
+
'UNEXPECTED_CAST_ERROR': 8003,
|
|
492
|
+
'CAST_CANCELED_BY_USER': 8004,
|
|
493
|
+
'CAST_CONNECTION_TIMED_OUT': 8005,
|
|
494
|
+
'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
|
|
495
|
+
'STORAGE_NOT_SUPPORTED': 9000,
|
|
496
|
+
'INDEXED_DB_ERROR': 9001,
|
|
497
|
+
'DEPRECATED_OPERATION_ABORTED': 9002,
|
|
498
|
+
'REQUESTED_ITEM_NOT_FOUND': 9003,
|
|
499
|
+
'MALFORMED_OFFLINE_URI': 9004,
|
|
500
|
+
'CANNOT_STORE_LIVE_OFFLINE': 9005,
|
|
501
|
+
'NO_INIT_DATA_FOR_OFFLINE': 9007,
|
|
502
|
+
'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
|
|
503
|
+
'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
|
|
504
|
+
'KEY_NOT_FOUND': 9012,
|
|
505
|
+
'MISSING_STORAGE_CELL': 9013,
|
|
506
|
+
'STORAGE_LIMIT_REACHED': 9014,
|
|
507
|
+
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
|
|
508
|
+
'MODIFY_OPERATION_NOT_SUPPORTED': 9016,
|
|
509
|
+
'INDEXED_DB_INIT_TIMED_OUT': 9017,
|
|
510
|
+
'CS_IMA_SDK_MISSING': 10000,
|
|
511
|
+
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
512
|
+
'SS_IMA_SDK_MISSING': 10002,
|
|
513
|
+
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
514
|
+
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
|
|
515
|
+
'MT_AD_MANAGER_NOT_INITIALIZED': 10005,
|
|
516
|
+
'INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED': 10006,
|
|
517
|
+
'VAST_INVALID_XML': 4001
|
|
518
|
+
};
|
|
374
519
|
/**
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
520
|
+
* A timer allows a single function to be executed at a later time or at
|
|
521
|
+
* regular intervals.
|
|
522
|
+
* @final
|
|
523
|
+
*/
|
|
524
|
+
shaka.util.Timer = class {
|
|
525
|
+
/**
|
|
526
|
+
* Create a new timer. A timer is committed to a single callback function.
|
|
527
|
+
* While there is no technical reason to do this, it is far easier to
|
|
528
|
+
* understand and use timers when they are connected to one functional idea.
|
|
529
|
+
* @param {function()} onTick
|
|
530
|
+
*/
|
|
531
|
+
constructor(onTick) {}
|
|
532
|
+
/**
|
|
533
|
+
* Have the timer call |onTick| now.
|
|
534
|
+
* @return {!shaka.util.Timer}
|
|
535
|
+
*/
|
|
536
|
+
tickNow() {}
|
|
537
|
+
/**
|
|
538
|
+
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
539
|
+
* called first.
|
|
540
|
+
* @param {number} seconds
|
|
541
|
+
* @return {!shaka.util.Timer}
|
|
542
|
+
*/
|
|
543
|
+
tickAfter(seconds) {}
|
|
544
|
+
/**
|
|
545
|
+
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
546
|
+
* @param {number} seconds
|
|
547
|
+
* @return {!shaka.util.Timer}
|
|
548
|
+
*/
|
|
549
|
+
tickEvery(seconds) {}
|
|
550
|
+
/**
|
|
551
|
+
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
552
|
+
* after calling |stop|.
|
|
553
|
+
*/
|
|
554
|
+
stop() {}
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* @namespace shaka.util.StringUtils
|
|
558
|
+
* @summary A set of string utility functions.
|
|
559
|
+
*/
|
|
560
|
+
shaka.util.StringUtils = class {
|
|
561
|
+
/**
|
|
562
|
+
* Creates a string from the given buffer as UTF-8 encoding.
|
|
563
|
+
* @param {?BufferSource} data
|
|
564
|
+
* @return {string}
|
|
565
|
+
*/
|
|
566
|
+
static fromUTF8(data) {}
|
|
567
|
+
/**
|
|
568
|
+
* Creates a string from the given buffer as UTF-16 encoding.
|
|
569
|
+
* @param {?BufferSource} data
|
|
570
|
+
* @param {boolean} littleEndian
|
|
571
|
+
true to read little endian, false to read big.
|
|
572
|
+
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
573
|
+
* expect invalid input. If noThrow is true and the data has an odd
|
|
574
|
+
* length,it will be truncated.
|
|
575
|
+
* @return {string}
|
|
576
|
+
*/
|
|
577
|
+
static fromUTF16(data, littleEndian, noThrow) {}
|
|
578
|
+
/**
|
|
579
|
+
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
580
|
+
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
581
|
+
* @param {?BufferSource} data
|
|
582
|
+
* @return {string}
|
|
583
|
+
*/
|
|
584
|
+
static fromBytesAutoDetect(data) {}
|
|
585
|
+
/**
|
|
586
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
587
|
+
* @param {string} str
|
|
588
|
+
* @return {!ArrayBuffer}
|
|
589
|
+
*/
|
|
590
|
+
static toUTF8(str) {}
|
|
591
|
+
/**
|
|
592
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
593
|
+
* @param {string} str
|
|
594
|
+
* @param {boolean} littleEndian
|
|
595
|
+
* @return {!ArrayBuffer}
|
|
596
|
+
*/
|
|
597
|
+
static toUTF16(str, littleEndian) {}
|
|
598
|
+
/**
|
|
599
|
+
* Resets the fromCharCode method's implementation.
|
|
600
|
+
* For debug use.
|
|
601
|
+
*/
|
|
602
|
+
static resetFromCharCode() {}
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
*/
|
|
606
|
+
shaka.text.Cue = class {
|
|
607
|
+
/**
|
|
608
|
+
* @param {number} startTime
|
|
609
|
+
* @param {number} endTime
|
|
610
|
+
* @param {string} payload
|
|
611
|
+
*/
|
|
612
|
+
constructor(startTime, endTime, payload) {}
|
|
613
|
+
/**
|
|
614
|
+
* Create a copy of the cue with the same properties.
|
|
615
|
+
* @return {!shaka.text.Cue}
|
|
616
|
+
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
617
|
+
*/
|
|
618
|
+
clone() {}
|
|
619
|
+
/**
|
|
620
|
+
* Check if two Cues have all the same values in all properties.
|
|
621
|
+
* @param {!shaka.text.Cue} cue1
|
|
622
|
+
* @param {!shaka.text.Cue} cue2
|
|
623
|
+
* @return {boolean}
|
|
624
|
+
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
625
|
+
*/
|
|
626
|
+
static equal(cue1, cue2) {}
|
|
627
|
+
/**
|
|
628
|
+
* Parses cue payload, searches for styling entities and, if needed,
|
|
629
|
+
* modifies original payload and creates nested cues to better represent
|
|
630
|
+
* styling found in payload. All changes are done in-place.
|
|
631
|
+
* @param {!shaka.text.Cue} cue
|
|
632
|
+
* @param {!Map<string, !shaka.text.Cue>=} styles
|
|
633
|
+
*/
|
|
634
|
+
static parseCuePayload(cue, styles) {}
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* The start time of the cue in seconds, relative to the start of the
|
|
638
|
+
* presentation.
|
|
639
|
+
* @type {number}
|
|
640
|
+
*/
|
|
641
|
+
shaka.text.Cue.prototype.startTime;
|
|
642
|
+
/**
|
|
643
|
+
* The end time of the cue in seconds, relative to the start of the
|
|
644
|
+
* presentation.
|
|
645
|
+
* @type {number}
|
|
646
|
+
*/
|
|
647
|
+
shaka.text.Cue.prototype.endTime;
|
|
648
|
+
/**
|
|
649
|
+
* The text payload of the cue. If nestedCues is non-empty, this should be
|
|
650
|
+
* empty. Top-level block containers should have no payload of their own.
|
|
651
|
+
* @type {string}
|
|
652
|
+
*/
|
|
653
|
+
shaka.text.Cue.prototype.payload;
|
|
654
|
+
/**
|
|
655
|
+
* The region to render the cue into. Only supported on top-level cues,
|
|
656
|
+
* because nested cues are inline elements.
|
|
657
|
+
* @type {shaka.text.CueRegion}
|
|
658
|
+
*/
|
|
659
|
+
shaka.text.Cue.prototype.region;
|
|
660
|
+
/**
|
|
661
|
+
* The indent (in percent) of the cue box in the direction defined by the
|
|
662
|
+
* writing direction.
|
|
663
|
+
* @type {?number}
|
|
664
|
+
*/
|
|
665
|
+
shaka.text.Cue.prototype.position;
|
|
666
|
+
/**
|
|
667
|
+
* Position alignment of the cue.
|
|
668
|
+
* @type {shaka.text.Cue.positionAlign}
|
|
669
|
+
*/
|
|
670
|
+
shaka.text.Cue.prototype.positionAlign;
|
|
671
|
+
/**
|
|
672
|
+
* Size of the cue box (in percents), where 0 means "auto".
|
|
673
|
+
* @type {number}
|
|
674
|
+
*/
|
|
675
|
+
shaka.text.Cue.prototype.size;
|
|
676
|
+
/**
|
|
677
|
+
* Alignment of the text inside the cue box.
|
|
678
|
+
* @type {shaka.text.Cue.textAlign}
|
|
679
|
+
*/
|
|
680
|
+
shaka.text.Cue.prototype.textAlign;
|
|
681
|
+
/**
|
|
682
|
+
* Text direction of the cue.
|
|
683
|
+
* @type {shaka.text.Cue.direction}
|
|
684
|
+
*/
|
|
685
|
+
shaka.text.Cue.prototype.direction;
|
|
686
|
+
/**
|
|
687
|
+
* Text writing mode of the cue.
|
|
688
|
+
* @type {shaka.text.Cue.writingMode}
|
|
689
|
+
*/
|
|
378
690
|
shaka.text.Cue.prototype.writingMode;
|
|
379
691
|
/**
|
|
380
692
|
* The way to interpret line field. (Either as an integer line number or
|
|
@@ -529,482 +841,181 @@ shaka.text.Cue.prototype.lineBreak;
|
|
|
529
841
|
/**
|
|
530
842
|
* Used to indicate the type of ruby tag that should be used when rendering
|
|
531
843
|
* the cue. Valid values: ruby, rp, rt.
|
|
532
|
-
* @type {?string}
|
|
533
|
-
*/
|
|
534
|
-
shaka.text.Cue.prototype.rubyTag;
|
|
535
|
-
/**
|
|
536
|
-
* The number of horizontal and vertical cells into which the Root Container
|
|
537
|
-
* Region area is divided.
|
|
538
|
-
* @type {{ columns: number, rows: number }}
|
|
539
|
-
*/
|
|
540
|
-
shaka.text.Cue.prototype.cellResolution;
|
|
541
|
-
/**
|
|
542
|
-
* @enum {string}
|
|
543
|
-
*/
|
|
544
|
-
shaka.text.Cue.positionAlign = {
|
|
545
|
-
'LEFT': 'line-left',
|
|
546
|
-
'RIGHT': 'line-right',
|
|
547
|
-
'CENTER': 'center',
|
|
548
|
-
'AUTO': 'auto'
|
|
549
|
-
};
|
|
550
|
-
/**
|
|
551
|
-
* @enum {string}
|
|
552
|
-
*/
|
|
553
|
-
shaka.text.Cue.textAlign = {
|
|
554
|
-
'LEFT': 'left',
|
|
555
|
-
'RIGHT': 'right',
|
|
556
|
-
'CENTER': 'center',
|
|
557
|
-
'START': 'start',
|
|
558
|
-
'END': 'end'
|
|
559
|
-
};
|
|
560
|
-
/**
|
|
561
|
-
* Vertical alignments of the cues within their extents.
|
|
562
|
-
* 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
|
|
563
|
-
* means in the middle, 'AFTER' means at the bottom.
|
|
564
|
-
* @enum {string}
|
|
565
|
-
*/
|
|
566
|
-
shaka.text.Cue.displayAlign = {
|
|
567
|
-
'BEFORE': 'before',
|
|
568
|
-
'CENTER': 'center',
|
|
569
|
-
'AFTER': 'after'
|
|
570
|
-
};
|
|
571
|
-
/**
|
|
572
|
-
* @enum {string}
|
|
573
|
-
*/
|
|
574
|
-
shaka.text.Cue.direction = {
|
|
575
|
-
'HORIZONTAL_LEFT_TO_RIGHT': 'ltr',
|
|
576
|
-
'HORIZONTAL_RIGHT_TO_LEFT': 'rtl'
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* @enum {string}
|
|
580
|
-
*/
|
|
581
|
-
shaka.text.Cue.writingMode = {
|
|
582
|
-
'HORIZONTAL_TOP_TO_BOTTOM': 'horizontal-tb',
|
|
583
|
-
'VERTICAL_LEFT_TO_RIGHT': 'vertical-lr',
|
|
584
|
-
'VERTICAL_RIGHT_TO_LEFT': 'vertical-rl'
|
|
585
|
-
};
|
|
586
|
-
/**
|
|
587
|
-
* @enum {number}
|
|
588
|
-
*/
|
|
589
|
-
shaka.text.Cue.lineInterpretation = {
|
|
590
|
-
'LINE_NUMBER': 0,
|
|
591
|
-
'PERCENTAGE': 1
|
|
592
|
-
};
|
|
593
|
-
/**
|
|
594
|
-
* @enum {string}
|
|
595
|
-
*/
|
|
596
|
-
shaka.text.Cue.lineAlign = {
|
|
597
|
-
'CENTER': 'center',
|
|
598
|
-
'START': 'start',
|
|
599
|
-
'END': 'end'
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* Default text color according to
|
|
603
|
-
* https://w3c.github.io/webvtt/#default-text-color
|
|
604
|
-
* @enum {string}
|
|
605
|
-
*/
|
|
606
|
-
shaka.text.Cue.defaultTextColor = {
|
|
607
|
-
'white': 'white',
|
|
608
|
-
'lime': 'lime',
|
|
609
|
-
'cyan': 'cyan',
|
|
610
|
-
'red': 'red',
|
|
611
|
-
'yellow': 'yellow',
|
|
612
|
-
'magenta': 'magenta',
|
|
613
|
-
'blue': 'blue',
|
|
614
|
-
'black': 'black'
|
|
615
|
-
};
|
|
616
|
-
/**
|
|
617
|
-
* Default text background color according to
|
|
618
|
-
* https://w3c.github.io/webvtt/#default-text-background
|
|
619
|
-
* @enum {string}
|
|
620
|
-
*/
|
|
621
|
-
shaka.text.Cue.defaultTextBackgroundColor = {
|
|
622
|
-
'bg_white': 'white',
|
|
623
|
-
'bg_lime': 'lime',
|
|
624
|
-
'bg_cyan': 'cyan',
|
|
625
|
-
'bg_red': 'red',
|
|
626
|
-
'bg_yellow': 'yellow',
|
|
627
|
-
'bg_magenta': 'magenta',
|
|
628
|
-
'bg_blue': 'blue',
|
|
629
|
-
'bg_black': 'black'
|
|
630
|
-
};
|
|
631
|
-
/**
|
|
632
|
-
* In CSS font weight can be a number, where 400 is normal and 700 is bold.
|
|
633
|
-
* Use these values for the enum for consistency.
|
|
634
|
-
* @enum {number}
|
|
635
|
-
*/
|
|
636
|
-
shaka.text.Cue.fontWeight = {
|
|
637
|
-
'NORMAL': 400,
|
|
638
|
-
'BOLD': 700
|
|
639
|
-
};
|
|
640
|
-
/**
|
|
641
|
-
* @enum {string}
|
|
642
|
-
*/
|
|
643
|
-
shaka.text.Cue.fontStyle = {
|
|
644
|
-
'NORMAL': 'normal',
|
|
645
|
-
'ITALIC': 'italic',
|
|
646
|
-
'OBLIQUE': 'oblique'
|
|
647
|
-
};
|
|
648
|
-
/**
|
|
649
|
-
* @enum {string}
|
|
650
|
-
*/
|
|
651
|
-
shaka.text.Cue.textDecoration = {
|
|
652
|
-
'UNDERLINE': 'underline',
|
|
653
|
-
'LINE_THROUGH': 'lineThrough',
|
|
654
|
-
'OVERLINE': 'overline'
|
|
655
|
-
};
|
|
656
|
-
/**
|
|
657
|
-
* An interface to standardize how objects are destroyed.
|
|
658
|
-
* @interface
|
|
659
|
-
*/
|
|
660
|
-
shaka.util.IDestroyable = class {
|
|
661
|
-
/**
|
|
662
|
-
* Request that this object be destroyed, releasing all resources and shutting
|
|
663
|
-
* down all operations. Returns a Promise which is resolved when destruction
|
|
664
|
-
* is complete. This Promise should never be rejected.
|
|
665
|
-
* @return {!Promise}
|
|
666
|
-
*/
|
|
667
|
-
destroy() {}
|
|
668
|
-
};
|
|
669
|
-
/**
|
|
670
|
-
* @summary Manages transmuxer plugins.
|
|
671
|
-
* @implements {shaka.util.IDestroyable}
|
|
672
|
-
*/
|
|
673
|
-
shaka.transmuxer.TransmuxerEngine = class {
|
|
674
|
-
/**
|
|
675
|
-
* @override
|
|
676
|
-
*/
|
|
677
|
-
destroy() {}
|
|
678
|
-
/**
|
|
679
|
-
* @param {string} mimeType
|
|
680
|
-
* @param {!shaka.extern.TransmuxerPlugin} plugin
|
|
681
|
-
* @param {number} priority
|
|
682
|
-
*/
|
|
683
|
-
static registerTransmuxer(mimeType, plugin, priority) {}
|
|
684
|
-
/**
|
|
685
|
-
* @param {string} mimeType
|
|
686
|
-
* @param {number} priority
|
|
687
|
-
*/
|
|
688
|
-
static unregisterTransmuxer(mimeType, priority) {}
|
|
689
|
-
/**
|
|
690
|
-
* @param {string} mimeType
|
|
691
|
-
* @param {string=} contentType
|
|
692
|
-
* @return {?shaka.extern.TransmuxerPlugin}
|
|
693
|
-
*/
|
|
694
|
-
static findTransmuxer(mimeType, contentType) {}
|
|
695
|
-
};
|
|
696
|
-
/**
|
|
697
|
-
* Priority level for transmuxer plugins.
|
|
698
|
-
* If multiple plugins are provided for the same mime type, only the
|
|
699
|
-
* highest-priority one is used.
|
|
700
|
-
* @enum {number}
|
|
701
|
-
*/
|
|
702
|
-
shaka.transmuxer.TransmuxerEngine.PluginPriority = {
|
|
703
|
-
'FALLBACK': 1,
|
|
704
|
-
'PREFERRED_SECONDARY': 2,
|
|
705
|
-
'PREFERRED': 3,
|
|
706
|
-
'APPLICATION': 4
|
|
707
|
-
};
|
|
708
|
-
/**
|
|
709
|
-
* @summary
|
|
710
|
-
* Describes an error that happened.
|
|
711
|
-
* @description
|
|
712
|
-
* This uses numerical codes to describe
|
|
713
|
-
* which error happened.
|
|
714
|
-
* Some error are caused by errors from the browser. In these cases, the error
|
|
715
|
-
* object is provided as part of the <code>data</code> field. System codes come
|
|
716
|
-
* from the browser and may or may not be documented. Here are some places
|
|
717
|
-
* where the errors may be documented:
|
|
718
|
-
* <ul>
|
|
719
|
-
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
|
|
720
|
-
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
|
|
721
|
-
* <li><a href="https://hresult.info">Edge/PlayReady errors</a>
|
|
722
|
-
* </ul>
|
|
723
|
-
* @implements {shaka.extern.Error}
|
|
724
|
-
* @extends {Error}
|
|
725
|
-
*/
|
|
726
|
-
shaka.util.Error = class {
|
|
727
|
-
/**
|
|
728
|
-
* @param {shaka.util.Error.Severity} severity
|
|
729
|
-
* @param {shaka.util.Error.Category} category
|
|
730
|
-
* @param {shaka.util.Error.Code} code
|
|
731
|
-
* @param {...*} varArgs
|
|
732
|
-
*/
|
|
733
|
-
constructor(severity, category, code, ...varArgs) {}
|
|
734
|
-
};
|
|
735
|
-
/**
|
|
736
|
-
* @override
|
|
737
|
-
*/
|
|
738
|
-
shaka.util.Error.prototype.severity;
|
|
739
|
-
/**
|
|
740
|
-
* @override
|
|
741
|
-
*/
|
|
742
|
-
shaka.util.Error.prototype.category;
|
|
743
|
-
/**
|
|
744
|
-
* @override
|
|
745
|
-
*/
|
|
746
|
-
shaka.util.Error.prototype.code;
|
|
747
|
-
/**
|
|
748
|
-
* @override
|
|
749
|
-
*/
|
|
750
|
-
shaka.util.Error.prototype.data;
|
|
751
|
-
/**
|
|
752
|
-
* @override
|
|
753
|
-
*/
|
|
754
|
-
shaka.util.Error.prototype.handled;
|
|
755
|
-
/**
|
|
756
|
-
* @enum {number}
|
|
757
|
-
*/
|
|
758
|
-
shaka.util.Error.Severity = {
|
|
759
|
-
'RECOVERABLE': 1,
|
|
760
|
-
'CRITICAL': 2
|
|
761
|
-
};
|
|
762
|
-
/**
|
|
763
|
-
* @enum {number}
|
|
764
|
-
*/
|
|
765
|
-
shaka.util.Error.Category = {
|
|
766
|
-
'NETWORK': 1,
|
|
767
|
-
'TEXT': 2,
|
|
768
|
-
'MEDIA': 3,
|
|
769
|
-
'MANIFEST': 4,
|
|
770
|
-
'STREAMING': 5,
|
|
771
|
-
'DRM': 6,
|
|
772
|
-
'PLAYER': 7,
|
|
773
|
-
'CAST': 8,
|
|
774
|
-
'STORAGE': 9,
|
|
775
|
-
'ADS': 10
|
|
776
|
-
};
|
|
777
|
-
/**
|
|
778
|
-
* @enum {number}
|
|
779
|
-
*/
|
|
780
|
-
shaka.util.Error.Code = {
|
|
781
|
-
'UNSUPPORTED_SCHEME': 1000,
|
|
782
|
-
'BAD_HTTP_STATUS': 1001,
|
|
783
|
-
'HTTP_ERROR': 1002,
|
|
784
|
-
'TIMEOUT': 1003,
|
|
785
|
-
'MALFORMED_DATA_URI': 1004,
|
|
786
|
-
'REQUEST_FILTER_ERROR': 1006,
|
|
787
|
-
'RESPONSE_FILTER_ERROR': 1007,
|
|
788
|
-
'MALFORMED_TEST_URI': 1008,
|
|
789
|
-
'UNEXPECTED_TEST_REQUEST': 1009,
|
|
790
|
-
'ATTEMPTS_EXHAUSTED': 1010,
|
|
791
|
-
'SEGMENT_MISSING': 1011,
|
|
792
|
-
'INVALID_TEXT_HEADER': 2000,
|
|
793
|
-
'INVALID_TEXT_CUE': 2001,
|
|
794
|
-
'UNABLE_TO_DETECT_ENCODING': 2003,
|
|
795
|
-
'BAD_ENCODING': 2004,
|
|
796
|
-
'INVALID_XML': 2005,
|
|
797
|
-
'INVALID_MP4_TTML': 2007,
|
|
798
|
-
'INVALID_MP4_VTT': 2008,
|
|
799
|
-
'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
|
|
800
|
-
'INVALID_MP4_CEA': 2010,
|
|
801
|
-
'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
|
|
802
|
-
'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
|
|
803
|
-
'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
|
|
804
|
-
'MISSING_TEXT_PLUGIN': 2014,
|
|
805
|
-
'CHAPTERS_TRACK_FAILED': 2015,
|
|
806
|
-
'UNSUPPORTED_EXTERNAL_THUMBNAILS_URI': 2017,
|
|
807
|
-
'BUFFER_READ_OUT_OF_BOUNDS': 3000,
|
|
808
|
-
'JS_INTEGER_OVERFLOW': 3001,
|
|
809
|
-
'EBML_OVERFLOW': 3002,
|
|
810
|
-
'EBML_BAD_FLOATING_POINT_SIZE': 3003,
|
|
811
|
-
'MP4_SIDX_WRONG_BOX_TYPE': 3004,
|
|
812
|
-
'MP4_SIDX_INVALID_TIMESCALE': 3005,
|
|
813
|
-
'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
|
|
814
|
-
'WEBM_CUES_ELEMENT_MISSING': 3007,
|
|
815
|
-
'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
|
|
816
|
-
'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
|
|
817
|
-
'WEBM_INFO_ELEMENT_MISSING': 3010,
|
|
818
|
-
'WEBM_DURATION_ELEMENT_MISSING': 3011,
|
|
819
|
-
'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
|
|
820
|
-
'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
|
|
821
|
-
'MEDIA_SOURCE_OPERATION_FAILED': 3014,
|
|
822
|
-
'MEDIA_SOURCE_OPERATION_THREW': 3015,
|
|
823
|
-
'VIDEO_ERROR': 3016,
|
|
824
|
-
'QUOTA_EXCEEDED_ERROR': 3017,
|
|
825
|
-
'TRANSMUXING_FAILED': 3018,
|
|
826
|
-
'CONTENT_TRANSFORMATION_FAILED': 3019,
|
|
827
|
-
'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
|
|
828
|
-
'MSS_TRANSMUXING_FAILED': 3022,
|
|
829
|
-
'TRANSMUXING_NO_VIDEO_DATA': 3023,
|
|
830
|
-
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
|
|
831
|
-
'DASH_INVALID_XML': 4001,
|
|
832
|
-
'DASH_NO_SEGMENT_INFO': 4002,
|
|
833
|
-
'DASH_EMPTY_ADAPTATION_SET': 4003,
|
|
834
|
-
'DASH_EMPTY_PERIOD': 4004,
|
|
835
|
-
'DASH_WEBM_MISSING_INIT': 4005,
|
|
836
|
-
'DASH_UNSUPPORTED_CONTAINER': 4006,
|
|
837
|
-
'DASH_PSSH_BAD_ENCODING': 4007,
|
|
838
|
-
'DASH_NO_COMMON_KEY_SYSTEM': 4008,
|
|
839
|
-
'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
|
|
840
|
-
'DASH_CONFLICTING_KEY_IDS': 4010,
|
|
841
|
-
'RESTRICTIONS_CANNOT_BE_MET': 4012,
|
|
842
|
-
'HLS_PLAYLIST_HEADER_MISSING': 4015,
|
|
843
|
-
'INVALID_HLS_TAG': 4016,
|
|
844
|
-
'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
|
|
845
|
-
'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
|
|
846
|
-
'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
|
|
847
|
-
'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
|
|
848
|
-
'HLS_REQUIRED_TAG_MISSING': 4024,
|
|
849
|
-
'HLS_COULD_NOT_GUESS_CODECS': 4025,
|
|
850
|
-
'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
|
|
851
|
-
'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
|
|
852
|
-
'DASH_XLINK_DEPTH_LIMIT': 4028,
|
|
853
|
-
'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
|
|
854
|
-
'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
|
|
855
|
-
'NO_VARIANTS': 4036,
|
|
856
|
-
'PERIOD_FLATTENING_FAILED': 4037,
|
|
857
|
-
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
858
|
-
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
859
|
-
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
860
|
-
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
861
|
-
'NO_WEB_CRYPTO_API': 4042,
|
|
862
|
-
'CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM': 4045,
|
|
863
|
-
'MSS_INVALID_XML': 4046,
|
|
864
|
-
'MSS_LIVE_CONTENT_NOT_SUPPORTED': 4047,
|
|
865
|
-
'AES_128_INVALID_IV_LENGTH': 4048,
|
|
866
|
-
'AES_128_INVALID_KEY_LENGTH': 4049,
|
|
867
|
-
'DASH_CONFLICTING_AES_128': 4050,
|
|
868
|
-
'DASH_UNSUPPORTED_AES_128': 4051,
|
|
869
|
-
'DASH_INVALID_PATCH': 4052,
|
|
870
|
-
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
871
|
-
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
872
|
-
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
873
|
-
'FAILED_TO_CREATE_CDM': 6002,
|
|
874
|
-
'FAILED_TO_ATTACH_TO_VIDEO': 6003,
|
|
875
|
-
'INVALID_SERVER_CERTIFICATE': 6004,
|
|
876
|
-
'FAILED_TO_CREATE_SESSION': 6005,
|
|
877
|
-
'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
|
|
878
|
-
'LICENSE_REQUEST_FAILED': 6007,
|
|
879
|
-
'LICENSE_RESPONSE_REJECTED': 6008,
|
|
880
|
-
'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
|
|
881
|
-
'NO_LICENSE_SERVER_GIVEN': 6012,
|
|
882
|
-
'OFFLINE_SESSION_REMOVED': 6013,
|
|
883
|
-
'EXPIRED': 6014,
|
|
884
|
-
'SERVER_CERTIFICATE_REQUIRED': 6015,
|
|
885
|
-
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
886
|
-
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
|
|
887
|
-
'MIN_HDCP_VERSION_NOT_MATCH': 6018,
|
|
888
|
-
'ERROR_CHECKING_HDCP_VERSION': 6019,
|
|
889
|
-
'LOAD_INTERRUPTED': 7000,
|
|
890
|
-
'OPERATION_ABORTED': 7001,
|
|
891
|
-
'NO_VIDEO_ELEMENT': 7002,
|
|
892
|
-
'OBJECT_DESTROYED': 7003,
|
|
893
|
-
'CONTENT_NOT_LOADED': 7004,
|
|
894
|
-
'SRC_EQUALS_PRELOAD_NOT_SUPPORTED': 7005,
|
|
895
|
-
'CAST_API_UNAVAILABLE': 8000,
|
|
896
|
-
'NO_CAST_RECEIVERS': 8001,
|
|
897
|
-
'ALREADY_CASTING': 8002,
|
|
898
|
-
'UNEXPECTED_CAST_ERROR': 8003,
|
|
899
|
-
'CAST_CANCELED_BY_USER': 8004,
|
|
900
|
-
'CAST_CONNECTION_TIMED_OUT': 8005,
|
|
901
|
-
'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
|
|
902
|
-
'STORAGE_NOT_SUPPORTED': 9000,
|
|
903
|
-
'INDEXED_DB_ERROR': 9001,
|
|
904
|
-
'DEPRECATED_OPERATION_ABORTED': 9002,
|
|
905
|
-
'REQUESTED_ITEM_NOT_FOUND': 9003,
|
|
906
|
-
'MALFORMED_OFFLINE_URI': 9004,
|
|
907
|
-
'CANNOT_STORE_LIVE_OFFLINE': 9005,
|
|
908
|
-
'NO_INIT_DATA_FOR_OFFLINE': 9007,
|
|
909
|
-
'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
|
|
910
|
-
'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
|
|
911
|
-
'KEY_NOT_FOUND': 9012,
|
|
912
|
-
'MISSING_STORAGE_CELL': 9013,
|
|
913
|
-
'STORAGE_LIMIT_REACHED': 9014,
|
|
914
|
-
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
|
|
915
|
-
'MODIFY_OPERATION_NOT_SUPPORTED': 9016,
|
|
916
|
-
'INDEXED_DB_INIT_TIMED_OUT': 9017,
|
|
917
|
-
'CS_IMA_SDK_MISSING': 10000,
|
|
918
|
-
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
919
|
-
'SS_IMA_SDK_MISSING': 10002,
|
|
920
|
-
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
921
|
-
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
|
|
922
|
-
'MT_AD_MANAGER_NOT_INITIALIZED': 10005
|
|
844
|
+
* @type {?string}
|
|
845
|
+
*/
|
|
846
|
+
shaka.text.Cue.prototype.rubyTag;
|
|
847
|
+
/**
|
|
848
|
+
* The number of horizontal and vertical cells into which the Root Container
|
|
849
|
+
* Region area is divided.
|
|
850
|
+
* @type {{ columns: number, rows: number }}
|
|
851
|
+
*/
|
|
852
|
+
shaka.text.Cue.prototype.cellResolution;
|
|
853
|
+
/**
|
|
854
|
+
* @enum {string}
|
|
855
|
+
*/
|
|
856
|
+
shaka.text.Cue.positionAlign = {
|
|
857
|
+
'LEFT': 'line-left',
|
|
858
|
+
'RIGHT': 'line-right',
|
|
859
|
+
'CENTER': 'center',
|
|
860
|
+
'AUTO': 'auto'
|
|
923
861
|
};
|
|
924
862
|
/**
|
|
925
|
-
*
|
|
926
|
-
* regular intervals.
|
|
927
|
-
* @final
|
|
863
|
+
* @enum {string}
|
|
928
864
|
*/
|
|
929
|
-
shaka.
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
*/
|
|
936
|
-
constructor(onTick) {}
|
|
937
|
-
/**
|
|
938
|
-
* Have the timer call |onTick| now.
|
|
939
|
-
* @return {!shaka.util.Timer}
|
|
940
|
-
*/
|
|
941
|
-
tickNow() {}
|
|
942
|
-
/**
|
|
943
|
-
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
944
|
-
* called first.
|
|
945
|
-
* @param {number} seconds
|
|
946
|
-
* @return {!shaka.util.Timer}
|
|
947
|
-
*/
|
|
948
|
-
tickAfter(seconds) {}
|
|
949
|
-
/**
|
|
950
|
-
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
951
|
-
* @param {number} seconds
|
|
952
|
-
* @return {!shaka.util.Timer}
|
|
953
|
-
*/
|
|
954
|
-
tickEvery(seconds) {}
|
|
955
|
-
/**
|
|
956
|
-
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
957
|
-
* after calling |stop|.
|
|
958
|
-
*/
|
|
959
|
-
stop() {}
|
|
865
|
+
shaka.text.Cue.textAlign = {
|
|
866
|
+
'LEFT': 'left',
|
|
867
|
+
'RIGHT': 'right',
|
|
868
|
+
'CENTER': 'center',
|
|
869
|
+
'START': 'start',
|
|
870
|
+
'END': 'end'
|
|
960
871
|
};
|
|
961
872
|
/**
|
|
962
|
-
*
|
|
963
|
-
*
|
|
873
|
+
* Vertical alignments of the cues within their extents.
|
|
874
|
+
* 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
|
|
875
|
+
* means in the middle, 'AFTER' means at the bottom.
|
|
876
|
+
* @enum {string}
|
|
964
877
|
*/
|
|
965
|
-
shaka.
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
878
|
+
shaka.text.Cue.displayAlign = {
|
|
879
|
+
'BEFORE': 'before',
|
|
880
|
+
'CENTER': 'center',
|
|
881
|
+
'AFTER': 'after'
|
|
882
|
+
};
|
|
883
|
+
/**
|
|
884
|
+
* @enum {string}
|
|
885
|
+
*/
|
|
886
|
+
shaka.text.Cue.direction = {
|
|
887
|
+
'HORIZONTAL_LEFT_TO_RIGHT': 'ltr',
|
|
888
|
+
'HORIZONTAL_RIGHT_TO_LEFT': 'rtl'
|
|
889
|
+
};
|
|
890
|
+
/**
|
|
891
|
+
* @enum {string}
|
|
892
|
+
*/
|
|
893
|
+
shaka.text.Cue.writingMode = {
|
|
894
|
+
'HORIZONTAL_TOP_TO_BOTTOM': 'horizontal-tb',
|
|
895
|
+
'VERTICAL_LEFT_TO_RIGHT': 'vertical-lr',
|
|
896
|
+
'VERTICAL_RIGHT_TO_LEFT': 'vertical-rl'
|
|
897
|
+
};
|
|
898
|
+
/**
|
|
899
|
+
* @enum {number}
|
|
900
|
+
*/
|
|
901
|
+
shaka.text.Cue.lineInterpretation = {
|
|
902
|
+
'LINE_NUMBER': 0,
|
|
903
|
+
'PERCENTAGE': 1
|
|
904
|
+
};
|
|
905
|
+
/**
|
|
906
|
+
* @enum {string}
|
|
907
|
+
*/
|
|
908
|
+
shaka.text.Cue.lineAlign = {
|
|
909
|
+
'CENTER': 'center',
|
|
910
|
+
'START': 'start',
|
|
911
|
+
'END': 'end'
|
|
912
|
+
};
|
|
913
|
+
/**
|
|
914
|
+
* Default text color according to
|
|
915
|
+
* https://w3c.github.io/webvtt/#default-text-color
|
|
916
|
+
* @enum {string}
|
|
917
|
+
*/
|
|
918
|
+
shaka.text.Cue.defaultTextColor = {
|
|
919
|
+
'white': 'white',
|
|
920
|
+
'lime': 'lime',
|
|
921
|
+
'cyan': 'cyan',
|
|
922
|
+
'red': 'red',
|
|
923
|
+
'yellow': 'yellow',
|
|
924
|
+
'magenta': 'magenta',
|
|
925
|
+
'blue': 'blue',
|
|
926
|
+
'black': 'black'
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* Default text background color according to
|
|
930
|
+
* https://w3c.github.io/webvtt/#default-text-background
|
|
931
|
+
* @enum {string}
|
|
932
|
+
*/
|
|
933
|
+
shaka.text.Cue.defaultTextBackgroundColor = {
|
|
934
|
+
'bg_white': 'white',
|
|
935
|
+
'bg_lime': 'lime',
|
|
936
|
+
'bg_cyan': 'cyan',
|
|
937
|
+
'bg_red': 'red',
|
|
938
|
+
'bg_yellow': 'yellow',
|
|
939
|
+
'bg_magenta': 'magenta',
|
|
940
|
+
'bg_blue': 'blue',
|
|
941
|
+
'bg_black': 'black'
|
|
942
|
+
};
|
|
943
|
+
/**
|
|
944
|
+
* In CSS font weight can be a number, where 400 is normal and 700 is bold.
|
|
945
|
+
* Use these values for the enum for consistency.
|
|
946
|
+
* @enum {number}
|
|
947
|
+
*/
|
|
948
|
+
shaka.text.Cue.fontWeight = {
|
|
949
|
+
'NORMAL': 400,
|
|
950
|
+
'BOLD': 700
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* @enum {string}
|
|
954
|
+
*/
|
|
955
|
+
shaka.text.Cue.fontStyle = {
|
|
956
|
+
'NORMAL': 'normal',
|
|
957
|
+
'ITALIC': 'italic',
|
|
958
|
+
'OBLIQUE': 'oblique'
|
|
959
|
+
};
|
|
960
|
+
/**
|
|
961
|
+
* @enum {string}
|
|
962
|
+
*/
|
|
963
|
+
shaka.text.Cue.textDecoration = {
|
|
964
|
+
'UNDERLINE': 'underline',
|
|
965
|
+
'LINE_THROUGH': 'lineThrough',
|
|
966
|
+
'OVERLINE': 'overline'
|
|
967
|
+
};
|
|
968
|
+
/**
|
|
969
|
+
* An interface to standardize how objects are destroyed.
|
|
970
|
+
* @interface
|
|
971
|
+
*/
|
|
972
|
+
shaka.util.IDestroyable = class {
|
|
972
973
|
/**
|
|
973
|
-
*
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
|
|
977
|
-
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
978
|
-
* expect invalid input. If noThrow is true and the data has an odd
|
|
979
|
-
* length,it will be truncated.
|
|
980
|
-
* @return {string}
|
|
974
|
+
* Request that this object be destroyed, releasing all resources and shutting
|
|
975
|
+
* down all operations. Returns a Promise which is resolved when destruction
|
|
976
|
+
* is complete. This Promise should never be rejected.
|
|
977
|
+
* @return {!Promise}
|
|
981
978
|
*/
|
|
982
|
-
|
|
979
|
+
destroy() {}
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* @summary Manages transmuxer plugins.
|
|
983
|
+
* @implements {shaka.util.IDestroyable}
|
|
984
|
+
*/
|
|
985
|
+
shaka.transmuxer.TransmuxerEngine = class {
|
|
983
986
|
/**
|
|
984
|
-
*
|
|
985
|
-
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
986
|
-
* @param {?BufferSource} data
|
|
987
|
-
* @return {string}
|
|
987
|
+
* @override
|
|
988
988
|
*/
|
|
989
|
-
|
|
989
|
+
destroy() {}
|
|
990
990
|
/**
|
|
991
|
-
*
|
|
992
|
-
* @param {
|
|
993
|
-
* @
|
|
991
|
+
* @param {string} mimeType
|
|
992
|
+
* @param {!shaka.extern.TransmuxerPlugin} plugin
|
|
993
|
+
* @param {number} priority
|
|
994
994
|
*/
|
|
995
|
-
static
|
|
995
|
+
static registerTransmuxer(mimeType, plugin, priority) {}
|
|
996
996
|
/**
|
|
997
|
-
*
|
|
998
|
-
* @param {
|
|
999
|
-
* @param {boolean} littleEndian
|
|
1000
|
-
* @return {!ArrayBuffer}
|
|
997
|
+
* @param {string} mimeType
|
|
998
|
+
* @param {number} priority
|
|
1001
999
|
*/
|
|
1002
|
-
static
|
|
1000
|
+
static unregisterTransmuxer(mimeType, priority) {}
|
|
1003
1001
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1002
|
+
* @param {string} mimeType
|
|
1003
|
+
* @param {string=} contentType
|
|
1004
|
+
* @return {?shaka.extern.TransmuxerPlugin}
|
|
1006
1005
|
*/
|
|
1007
|
-
static
|
|
1006
|
+
static findTransmuxer(mimeType, contentType) {}
|
|
1007
|
+
};
|
|
1008
|
+
/**
|
|
1009
|
+
* Priority level for transmuxer plugins.
|
|
1010
|
+
* If multiple plugins are provided for the same mime type, only the
|
|
1011
|
+
* highest-priority one is used.
|
|
1012
|
+
* @enum {number}
|
|
1013
|
+
*/
|
|
1014
|
+
shaka.transmuxer.TransmuxerEngine.PluginPriority = {
|
|
1015
|
+
'FALLBACK': 1,
|
|
1016
|
+
'PREFERRED_SECONDARY': 2,
|
|
1017
|
+
'PREFERRED': 3,
|
|
1018
|
+
'APPLICATION': 4
|
|
1008
1019
|
};
|
|
1009
1020
|
/**
|
|
1010
1021
|
* @summary A set of Uint8Array utility functions.
|
|
@@ -1383,6 +1394,10 @@ shaka.util.AbortableOperation = class {
|
|
|
1383
1394
|
* be rejected.
|
|
1384
1395
|
*/
|
|
1385
1396
|
constructor(promise, onAbort) {}
|
|
1397
|
+
/**
|
|
1398
|
+
* @return {boolean} True if the operation has been aborted.
|
|
1399
|
+
*/
|
|
1400
|
+
aborted() {}
|
|
1386
1401
|
/**
|
|
1387
1402
|
* @param {!shaka.util.Error} error
|
|
1388
1403
|
* @return {!shaka.util.AbortableOperation} An operation which has already
|
|
@@ -1687,7 +1702,13 @@ shaka.net.NetworkingEngine.AdvancedRequestType = {
|
|
|
1687
1702
|
'MASTER_PLAYLIST': 3,
|
|
1688
1703
|
'MPD': 4,
|
|
1689
1704
|
'MSS': 5,
|
|
1690
|
-
'MPD_PATCH': 6
|
|
1705
|
+
'MPD_PATCH': 6,
|
|
1706
|
+
'MEDIATAILOR_SESSION_INFO': 7,
|
|
1707
|
+
'MEDIATAILOR_TRACKING_INFO': 8,
|
|
1708
|
+
'MEDIATAILOR_STATIC_RESOURCE': 9,
|
|
1709
|
+
'MEDIATAILOR_TRACKING_EVENT': 10,
|
|
1710
|
+
'INTERSTITIAL_ASSET_LIST': 11,
|
|
1711
|
+
'INTERSTITIAL_AD_URL': 12
|
|
1691
1712
|
};
|
|
1692
1713
|
/**
|
|
1693
1714
|
* Priority level for network scheme plugins.
|
|
@@ -2340,7 +2361,8 @@ shaka.util.TsParser = class {
|
|
|
2340
2361
|
getVideoResolution() {}
|
|
2341
2362
|
/**
|
|
2342
2363
|
* Return the video information
|
|
2343
|
-
* @return {{height: ?string, width: ?string, codec: ?string
|
|
2364
|
+
* @return {{height: ?string, width: ?string, codec: ?string,
|
|
2365
|
+
* frameRate: ?string}}
|
|
2344
2366
|
*/
|
|
2345
2367
|
getVideoInfo() {}
|
|
2346
2368
|
/**
|
|
@@ -3111,7 +3133,9 @@ shaka.text.WebVttGenerator = class {
|
|
|
3111
3133
|
*/
|
|
3112
3134
|
shaka.util.CmcdManager.StreamingFormat = {
|
|
3113
3135
|
DASH: 'd',
|
|
3136
|
+
LOW_LATENCY_DASH: 'ld',
|
|
3114
3137
|
HLS: 'h',
|
|
3138
|
+
LOW_LATENCY_HLS: 'lh',
|
|
3115
3139
|
SMOOTH: 's',
|
|
3116
3140
|
OTHER: 'o'
|
|
3117
3141
|
};
|
|
@@ -3166,10 +3190,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3166
3190
|
* When provided, the player will attach to <code>mediaElement</code>,
|
|
3167
3191
|
* similar to calling <code>attach</code>. When not provided, the player
|
|
3168
3192
|
* will remain detached.
|
|
3193
|
+
* @param {HTMLElement=} videoContainer
|
|
3194
|
+
* The videoContainer to construct UITextDisplayer
|
|
3169
3195
|
* @param {function(shaka.Player)=} dependencyInjector Optional callback
|
|
3170
3196
|
* which is called to inject mocks into the Player. Used for testing.
|
|
3171
3197
|
*/
|
|
3172
|
-
constructor(mediaElement, dependencyInjector) {}
|
|
3198
|
+
constructor(mediaElement, videoContainer, dependencyInjector) {}
|
|
3173
3199
|
/**
|
|
3174
3200
|
* After destruction, a Player object cannot be used again.
|
|
3175
3201
|
* @override
|
|
@@ -3756,6 +3782,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3756
3782
|
* @param {HTMLElement} videoContainer
|
|
3757
3783
|
*/
|
|
3758
3784
|
setVideoContainer(videoContainer) {}
|
|
3785
|
+
/**
|
|
3786
|
+
* Load a new font on the page. If the font was already loaded, it does
|
|
3787
|
+
* nothing.
|
|
3788
|
+
* @param {string} name
|
|
3789
|
+
* @param {string} url
|
|
3790
|
+
*/
|
|
3791
|
+
addFont(name, url) {}
|
|
3759
3792
|
};
|
|
3760
3793
|
/**
|
|
3761
3794
|
* In order to know what method of loading the player used for some content, we
|
|
@@ -4102,11 +4135,12 @@ shaka.ads.InterstitialAd = class {
|
|
|
4102
4135
|
/**
|
|
4103
4136
|
* @param {HTMLMediaElement} video
|
|
4104
4137
|
* @param {boolean} isSkippable
|
|
4138
|
+
* @param {?number} skipOffset
|
|
4105
4139
|
* @param {function()} onSkip
|
|
4106
4140
|
* @param {number} sequenceLength
|
|
4107
4141
|
* @param {number} adPosition
|
|
4108
4142
|
*/
|
|
4109
|
-
constructor(video, isSkippable, onSkip, sequenceLength, adPosition) {}
|
|
4143
|
+
constructor(video, isSkippable, skipOffset, onSkip, sequenceLength, adPosition) {}
|
|
4110
4144
|
/**
|
|
4111
4145
|
* @override
|
|
4112
4146
|
*/
|
|
@@ -4608,7 +4642,19 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
4608
4642
|
/**
|
|
4609
4643
|
* @override
|
|
4610
4644
|
*/
|
|
4611
|
-
|
|
4645
|
+
onHLSInterstitialMetadata(basePlayer, baseVideo, interstitial) {}
|
|
4646
|
+
/**
|
|
4647
|
+
* @override
|
|
4648
|
+
*/
|
|
4649
|
+
onDASHInterstitialMetadata(basePlayer, baseVideo, region) {}
|
|
4650
|
+
/**
|
|
4651
|
+
* @override
|
|
4652
|
+
*/
|
|
4653
|
+
addCustomInterstitial(interstitial) {}
|
|
4654
|
+
/**
|
|
4655
|
+
* @override
|
|
4656
|
+
*/
|
|
4657
|
+
addAdUrlInterstitial(url) {}
|
|
4612
4658
|
};
|
|
4613
4659
|
/**
|
|
4614
4660
|
* The event name for when a sequence of ads has been loaded.
|
|
@@ -5072,9 +5118,11 @@ shaka.dash.DashParser = class {
|
|
|
5072
5118
|
/** Creates a new DASH parser. */
|
|
5073
5119
|
constructor() {}
|
|
5074
5120
|
/**
|
|
5121
|
+
* @param {shaka.extern.ManifestConfiguration} config
|
|
5122
|
+
* @param {(function():boolean)=} isPreloadFn
|
|
5075
5123
|
* @override
|
|
5076
5124
|
*/
|
|
5077
|
-
configure(config) {}
|
|
5125
|
+
configure(config, isPreloadFn) {}
|
|
5078
5126
|
/**
|
|
5079
5127
|
* @override
|
|
5080
5128
|
*/
|
|
@@ -5153,9 +5201,11 @@ shaka.hls.HlsParser = class {
|
|
|
5153
5201
|
*/
|
|
5154
5202
|
constructor() {}
|
|
5155
5203
|
/**
|
|
5204
|
+
* @param {shaka.extern.ManifestConfiguration} config
|
|
5205
|
+
* @param {(function():boolean)=} isPreloadFn
|
|
5156
5206
|
* @override
|
|
5157
5207
|
*/
|
|
5158
|
-
configure(config) {}
|
|
5208
|
+
configure(config, isPreloadFn) {}
|
|
5159
5209
|
/**
|
|
5160
5210
|
* @override
|
|
5161
5211
|
*/
|
|
@@ -5193,9 +5243,11 @@ shaka.mss.MssParser = class {
|
|
|
5193
5243
|
/** Creates a new MSS parser. */
|
|
5194
5244
|
constructor() {}
|
|
5195
5245
|
/**
|
|
5246
|
+
* @param {shaka.extern.ManifestConfiguration} config
|
|
5247
|
+
* @param {(function():boolean)=} isPreloadFn
|
|
5196
5248
|
* @override
|
|
5197
5249
|
*/
|
|
5198
|
-
configure(config) {}
|
|
5250
|
+
configure(config, isPreloadFn) {}
|
|
5199
5251
|
/**
|
|
5200
5252
|
* @override
|
|
5201
5253
|
*/
|
|
@@ -5233,9 +5285,10 @@ shaka.net.HttpFetchPlugin = class {
|
|
|
5233
5285
|
* progress event happened.
|
|
5234
5286
|
* @param {shaka.extern.HeadersReceived} headersReceived Called when the
|
|
5235
5287
|
* headers for the download are received, but before the body is.
|
|
5288
|
+
* @param {shaka.extern.SchemePluginConfig} config
|
|
5236
5289
|
* @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
5237
5290
|
*/
|
|
5238
|
-
static parse(uri, request, requestType, progressUpdated, headersReceived) {}
|
|
5291
|
+
static parse(uri, request, requestType, progressUpdated, headersReceived, config) {}
|
|
5239
5292
|
/**
|
|
5240
5293
|
* Determine if the Fetch API is supported in the browser. Note: this is
|
|
5241
5294
|
* deliberately exposed as a method to allow the client app to use the same
|
|
@@ -5256,9 +5309,10 @@ shaka.net.HttpXHRPlugin = class {
|
|
|
5256
5309
|
* progress event happened.
|
|
5257
5310
|
* @param {shaka.extern.HeadersReceived} headersReceived Called when the
|
|
5258
5311
|
* headers for the download are received, but before the body is.
|
|
5312
|
+
* @param {shaka.extern.SchemePluginConfig} config
|
|
5259
5313
|
* @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
5260
5314
|
*/
|
|
5261
|
-
static parse(uri, request, requestType, progressUpdated, headersReceived) {}
|
|
5315
|
+
static parse(uri, request, requestType, progressUpdated, headersReceived, config) {}
|
|
5262
5316
|
};
|
|
5263
5317
|
/**
|
|
5264
5318
|
* StorageMuxer is responsible for managing StorageMechanisms and addressing
|
|
@@ -5443,20 +5497,6 @@ shaka.polyfill = class {
|
|
|
5443
5497
|
*/
|
|
5444
5498
|
static register(polyfill, priority) {}
|
|
5445
5499
|
};
|
|
5446
|
-
/**
|
|
5447
|
-
* @summary A polyfill for systems that do not implement AbortController.
|
|
5448
|
-
* This is used both with the fetch API for HTTP requests and inside the HLS
|
|
5449
|
-
* parser.
|
|
5450
|
-
* @extends AbortController
|
|
5451
|
-
*/
|
|
5452
|
-
shaka.polyfill.AbortController = class {
|
|
5453
|
-
/**
|
|
5454
|
-
* Install the polyfill if needed.
|
|
5455
|
-
*/
|
|
5456
|
-
static install() {}
|
|
5457
|
-
/** */
|
|
5458
|
-
constructor() {}
|
|
5459
|
-
};
|
|
5460
5500
|
/**
|
|
5461
5501
|
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
5462
5502
|
* browsers that do not implement it (e.g. Firefox).
|
|
@@ -5690,7 +5730,7 @@ shaka.text.TtmlTextParser = class {
|
|
|
5690
5730
|
/**
|
|
5691
5731
|
* @override
|
|
5692
5732
|
*/
|
|
5693
|
-
parseMedia(data, time, uri) {}
|
|
5733
|
+
parseMedia(data, time, uri, images) {}
|
|
5694
5734
|
};
|
|
5695
5735
|
/**
|
|
5696
5736
|
* @implements {shaka.extern.TextParser}
|