shaka-player 3.1.2 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build_and_test.yaml +73 -0
- package/.github/workflows/release.yaml +53 -0
- package/AUTHORS +3 -0
- package/CHANGELOG.md +170 -1
- package/CONTRIBUTORS +3 -0
- package/build/checkversion.py +1 -1
- package/build/generateExterns.js +1 -1
- package/build/misspellings.txt +1 -0
- package/build/shakaBuildHelpers.py +6 -5
- package/build/subprocessWindowsPatch.py +103 -0
- package/build/test.py +6 -0
- package/demo/common/assets.js +1 -1
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +1 -1
- package/dist/demo.compiled.js +1 -1
- package/dist/deps.js +7 -7
- package/dist/locales.js +35 -35
- package/dist/receiver.compiled.debug.js +1 -1
- package/dist/receiver.compiled.js +1 -1
- package/dist/shaka-player.compiled.d.ts +172 -3
- package/dist/shaka-player.compiled.debug.d.ts +172 -3
- package/dist/shaka-player.compiled.debug.externs.js +184 -1
- package/dist/shaka-player.compiled.debug.js +390 -370
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +184 -1
- package/dist/shaka-player.compiled.js +809 -805
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +174 -14
- package/dist/shaka-player.ui.debug.d.ts +174 -14
- package/dist/shaka-player.ui.debug.externs.js +200 -26
- package/dist/shaka-player.ui.debug.js +431 -412
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +200 -26
- package/dist/shaka-player.ui.js +934 -929
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +1 -1
- package/docs/tutorials/faq.md +14 -0
- package/externs/ima.js +4 -0
- package/externs/shaka/ads.js +2 -0
- package/externs/shaka/text.js +10 -0
- package/karma.conf.js +20 -15
- package/lib/ads/ad_manager.js +30 -11
- package/lib/ads/client_side_ad_manager.js +76 -86
- package/lib/ads/server_side_ad_manager.js +26 -11
- package/lib/cast/cast_proxy.js +6 -2
- package/lib/cast/cast_receiver.js +5 -1
- package/lib/cast/cast_sender.js +2 -2
- package/lib/cea/sei_processor.js +24 -17
- package/lib/dash/dash_parser.js +131 -24
- package/lib/dash/segment_list.js +1 -1
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +44 -17
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/closed_caption_parser.js +3 -1
- package/lib/media/content_workarounds.js +12 -0
- package/lib/media/drm_engine.js +20 -1
- package/lib/media/gap_jumping_controller.js +8 -4
- package/lib/media/media_source_engine.js +1 -2
- package/lib/media/playhead.js +1 -1
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/streaming_engine.js +8 -4
- package/lib/net/networking_engine.js +6 -1
- package/lib/offline/storage.js +10 -11
- package/lib/player.js +66 -30
- package/lib/polyfill/encryption_scheme.js +2 -0
- package/lib/polyfill/fullscreen.js +2 -0
- package/lib/polyfill/mathround.js +2 -0
- package/lib/polyfill/media_capabilities.js +73 -21
- package/lib/polyfill/mediasource.js +8 -0
- package/lib/polyfill/orientation.js +3 -1
- package/lib/polyfill/patchedmediakeys_apple.js +6 -4
- package/lib/polyfill/patchedmediakeys_ms.js +6 -4
- package/lib/polyfill/patchedmediakeys_nop.js +2 -0
- package/lib/polyfill/patchedmediakeys_webkit.js +6 -4
- package/lib/polyfill/pip_webkit.js +2 -0
- package/lib/polyfill/storage_estimate.js +2 -0
- package/lib/polyfill/video_play_promise.js +2 -0
- package/lib/polyfill/videoplaybackquality.js +2 -0
- package/lib/polyfill/vttcue.js +2 -0
- package/lib/text/cue.js +6 -0
- package/lib/text/mp4_ttml_parser.js +3 -0
- package/lib/text/text_engine.js +14 -2
- package/lib/text/ttml_text_parser.js +135 -87
- package/lib/text/ui_text_displayer.js +213 -80
- package/lib/text/vtt_text_parser.js +4 -2
- package/lib/util/fake_event.js +53 -7
- package/lib/util/fake_event_target.js +21 -1
- package/lib/util/mp4_box_parsers.js +1 -1
- package/lib/util/periods.js +4 -1
- package/lib/util/platform.js +13 -1
- package/lib/util/stream_utils.js +77 -10
- package/lib/util/xml_utils.js +19 -0
- package/package.json +3 -6
- package/test/cast/cast_proxy_unit.js +12 -6
- package/test/cast/cast_receiver_integration.js +1 -1
- package/test/cast/cast_utils_unit.js +1 -1
- package/test/cea/mp4_cea_parser_unit.js +26 -0
- package/test/dash/dash_parser_live_unit.js +43 -0
- package/test/dash/dash_parser_manifest_unit.js +222 -3
- package/test/hls/hls_parser_unit.js +79 -1
- package/test/media/closed_caption_parser_unit.js +20 -0
- package/test/media/drm_engine_unit.js +56 -0
- package/test/media/playhead_unit.js +27 -1
- package/test/media/region_observer_unit.js +40 -5
- package/test/media/region_timeline_unit.js +40 -22
- package/test/media/streaming_engine_integration.js +2 -1
- package/test/media/streaming_engine_unit.js +145 -0
- package/test/player_integration.js +38 -0
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +30 -0
- package/test/test/assets/3675/dash_1.mpd +30 -0
- package/test/test/assets/3675/dash_2.mpd +30 -0
- package/test/test/assets/3675/dash_3.mpd +30 -0
- package/test/test/assets/3675/dash_4.mpd +30 -0
- package/test/test/assets/3675/dash_5.mpd +26 -0
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/assets/empty_caption_video_init.mp4 +0 -0
- package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
- package/test/test/util/fake_ad_manager.js +4 -1
- package/test/test/util/ttml_utils.js +81 -0
- package/test/test/util/util.js +10 -7
- package/test/text/mp4_ttml_parser_unit.js +11 -18
- package/test/text/ttml_text_parser_unit.js +542 -220
- package/test/text/ui_text_displayer_unit.js +93 -20
- package/test/text/vtt_text_parser_unit.js +17 -1
- package/test/ui/localization_unit.js +15 -14
- package/test/ui/text_displayer_layout_unit.js +21 -8
- package/test/util/mp4_box_parsers_unit.js +28 -0
- package/test/util/stream_utils_unit.js +59 -2
- package/ui/cast_button.js +2 -3
- package/ui/controls.js +11 -6
- package/ui/less/buttons.less +0 -4
- package/ui/less/containers.less +6 -7
- package/ui/locales/ru.json +6 -6
- package/ui/localization.js +40 -87
- package/ui/pip_button.js +2 -3
- package/ui/text_selection.js +1 -0
|
@@ -715,6 +715,10 @@ shaka.text.Cue.prototype.id;
|
|
|
715
715
|
* @override
|
|
716
716
|
*/
|
|
717
717
|
shaka.text.Cue.prototype.nestedCues;
|
|
718
|
+
/**
|
|
719
|
+
* @override
|
|
720
|
+
*/
|
|
721
|
+
shaka.text.Cue.prototype.isContainer;
|
|
718
722
|
/**
|
|
719
723
|
* @override
|
|
720
724
|
*/
|
|
@@ -1192,7 +1196,7 @@ shaka.util.AbortableOperation.prototype.promise;
|
|
|
1192
1196
|
shaka.util.FakeEvent = class {
|
|
1193
1197
|
/**
|
|
1194
1198
|
* @param {string} type
|
|
1195
|
-
* @param {Object
|
|
1199
|
+
* @param {Map.<string, Object>=} dict
|
|
1196
1200
|
*/
|
|
1197
1201
|
constructor(type, dict) {}
|
|
1198
1202
|
};
|
|
@@ -1201,6 +1205,7 @@ shaka.util.FakeEvent = class {
|
|
|
1201
1205
|
* EventTargets, but this can be used as a base class to provide event dispatch
|
|
1202
1206
|
* to non-DOM classes. Only FakeEvents should be dispatched.
|
|
1203
1207
|
* @implements {EventTarget}
|
|
1208
|
+
* @implements {shaka.util.IReleasable}
|
|
1204
1209
|
*/
|
|
1205
1210
|
shaka.util.FakeEventTarget = class {
|
|
1206
1211
|
/** */
|
|
@@ -1238,6 +1243,10 @@ shaka.util.FakeEventTarget = class {
|
|
|
1238
1243
|
* @override
|
|
1239
1244
|
*/
|
|
1240
1245
|
dispatchEvent(event) {}
|
|
1246
|
+
/**
|
|
1247
|
+
* @override
|
|
1248
|
+
*/
|
|
1249
|
+
release() {}
|
|
1241
1250
|
};
|
|
1242
1251
|
/**
|
|
1243
1252
|
* These are the listener types defined in the closure extern for EventTarget.
|
|
@@ -2707,6 +2716,7 @@ shaka.ads.ServerSideAd = class {
|
|
|
2707
2716
|
/**
|
|
2708
2717
|
* A class responsible for ad-related interactions.
|
|
2709
2718
|
* @implements {shaka.extern.IAdManager}
|
|
2719
|
+
* @implements {shaka.util.IReleasable}
|
|
2710
2720
|
*/
|
|
2711
2721
|
shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
2712
2722
|
/** */
|
|
@@ -2719,6 +2729,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
2719
2729
|
* @override
|
|
2720
2730
|
*/
|
|
2721
2731
|
initClientSide(adContainer, video) {}
|
|
2732
|
+
/**
|
|
2733
|
+
* @override
|
|
2734
|
+
*/
|
|
2735
|
+
release() {}
|
|
2722
2736
|
/**
|
|
2723
2737
|
* @override
|
|
2724
2738
|
*/
|
|
@@ -3357,6 +3371,175 @@ shaka.polyfill = class {
|
|
|
3357
3371
|
*/
|
|
3358
3372
|
static register(polyfill, priority) {}
|
|
3359
3373
|
};
|
|
3374
|
+
/**
|
|
3375
|
+
* @summary A polyfill to add support for EncryptionScheme queries in EME.
|
|
3376
|
+
* @see https://wicg.github.io/encrypted-media-encryption-scheme/
|
|
3377
|
+
* @see https://github.com/w3c/encrypted-media/pull/457
|
|
3378
|
+
* @see https://github.com/google/eme-encryption-scheme-polyfill
|
|
3379
|
+
*/
|
|
3380
|
+
shaka.polyfill.EncryptionScheme = class {
|
|
3381
|
+
/**
|
|
3382
|
+
* Install the polyfill if needed.
|
|
3383
|
+
* @suppress {missingRequire}
|
|
3384
|
+
*/
|
|
3385
|
+
static install() {}
|
|
3386
|
+
};
|
|
3387
|
+
/**
|
|
3388
|
+
* @summary A polyfill to unify fullscreen APIs across browsers.
|
|
3389
|
+
* Many browsers have prefixed fullscreen methods on Element and document.
|
|
3390
|
+
* See {@link https://mzl.la/2K0xcHo Using fullscreen mode} on MDN for more
|
|
3391
|
+
* information.
|
|
3392
|
+
*/
|
|
3393
|
+
shaka.polyfill.Fullscreen = class {
|
|
3394
|
+
/**
|
|
3395
|
+
* Install the polyfill if needed.
|
|
3396
|
+
*/
|
|
3397
|
+
static install() {}
|
|
3398
|
+
};
|
|
3399
|
+
/**
|
|
3400
|
+
* @summary A polyfill to patch math round bug on some browsers.
|
|
3401
|
+
* @see https://stackoverflow.com/q/12830742
|
|
3402
|
+
*/
|
|
3403
|
+
shaka.polyfill.MathRound = class {
|
|
3404
|
+
/**
|
|
3405
|
+
* Install the polyfill if needed.
|
|
3406
|
+
*/
|
|
3407
|
+
static install() {}
|
|
3408
|
+
};
|
|
3409
|
+
/**
|
|
3410
|
+
* @summary A polyfill to provide navigator.mediaCapabilities on all browsers.
|
|
3411
|
+
* This is necessary for Tizen 3, Xbox One and possibly others we have yet to
|
|
3412
|
+
* discover.
|
|
3413
|
+
*/
|
|
3414
|
+
shaka.polyfill.MediaCapabilities = class {
|
|
3415
|
+
/**
|
|
3416
|
+
* Install the polyfill if needed.
|
|
3417
|
+
* @suppress {const}
|
|
3418
|
+
*/
|
|
3419
|
+
static install() {}
|
|
3420
|
+
};
|
|
3421
|
+
/**
|
|
3422
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
3423
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
3424
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
3425
|
+
* @type {MediaCapabilities}
|
|
3426
|
+
*/
|
|
3427
|
+
shaka.polyfill.MediaCapabilities.originalMcap;
|
|
3428
|
+
/**
|
|
3429
|
+
* @summary A polyfill to patch MSE bugs.
|
|
3430
|
+
*/
|
|
3431
|
+
shaka.polyfill.MediaSource = class {
|
|
3432
|
+
/**
|
|
3433
|
+
* Install the polyfill if needed.
|
|
3434
|
+
*/
|
|
3435
|
+
static install() {}
|
|
3436
|
+
};
|
|
3437
|
+
/**
|
|
3438
|
+
* @summary A polyfill for systems that do not implement screen.orientation.
|
|
3439
|
+
* For now, this only handles systems that implement the deprecated
|
|
3440
|
+
* window.orientation feature... e.g. iPad.
|
|
3441
|
+
*/
|
|
3442
|
+
shaka.polyfill.Orientation = class {
|
|
3443
|
+
/**
|
|
3444
|
+
* Install the polyfill if needed.
|
|
3445
|
+
*/
|
|
3446
|
+
static install() {}
|
|
3447
|
+
};
|
|
3448
|
+
/**
|
|
3449
|
+
* @summary A polyfill to implement modern, standardized EME on top of Apple's
|
|
3450
|
+
* prefixed EME in Safari.
|
|
3451
|
+
*/
|
|
3452
|
+
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3453
|
+
/**
|
|
3454
|
+
* Installs the polyfill if needed.
|
|
3455
|
+
*/
|
|
3456
|
+
static install() {}
|
|
3457
|
+
};
|
|
3458
|
+
/**
|
|
3459
|
+
* @summary A polyfill to implement
|
|
3460
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015}
|
|
3461
|
+
* on top of ms-prefixed
|
|
3462
|
+
* {@link https://www.w3.org/TR/2014/WD-encrypted-media-20140218/ EME v20140218}
|
|
3463
|
+
*/
|
|
3464
|
+
shaka.polyfill.PatchedMediaKeysMs = class {
|
|
3465
|
+
/**
|
|
3466
|
+
* Installs the polyfill if needed.
|
|
3467
|
+
*/
|
|
3468
|
+
static install() {}
|
|
3469
|
+
};
|
|
3470
|
+
/**
|
|
3471
|
+
* @summary A polyfill to stub out
|
|
3472
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
3473
|
+
* EME.
|
|
3474
|
+
* All methods will fail.
|
|
3475
|
+
*/
|
|
3476
|
+
shaka.polyfill.PatchedMediaKeysNop = class {
|
|
3477
|
+
/**
|
|
3478
|
+
* Installs the polyfill if needed.
|
|
3479
|
+
*/
|
|
3480
|
+
static install() {}
|
|
3481
|
+
};
|
|
3482
|
+
/**
|
|
3483
|
+
* @summary A polyfill to implement
|
|
3484
|
+
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of
|
|
3485
|
+
* webkit-prefixed {@link https://bit.ly/Eme01b EME v0.1b}.
|
|
3486
|
+
*/
|
|
3487
|
+
shaka.polyfill.PatchedMediaKeysWebkit = class {
|
|
3488
|
+
/**
|
|
3489
|
+
* Installs the polyfill if needed.
|
|
3490
|
+
*/
|
|
3491
|
+
static install() {}
|
|
3492
|
+
};
|
|
3493
|
+
/**
|
|
3494
|
+
* @summary A polyfill to provide PiP support in Safari.
|
|
3495
|
+
* Note that Safari only supports PiP on video elements, not audio.
|
|
3496
|
+
*/
|
|
3497
|
+
shaka.polyfill.PiPWebkit = class {
|
|
3498
|
+
/**
|
|
3499
|
+
* Install the polyfill if needed.
|
|
3500
|
+
*/
|
|
3501
|
+
static install() {}
|
|
3502
|
+
};
|
|
3503
|
+
/**
|
|
3504
|
+
* @summary A polyfill to provide navigator.storage.estimate in old
|
|
3505
|
+
* webkit browsers.
|
|
3506
|
+
* See: https://developers.google.com/web/updates/2017/08/estimating-available-storage-space#the-present
|
|
3507
|
+
*/
|
|
3508
|
+
shaka.polyfill.StorageEstimate = class {
|
|
3509
|
+
/**
|
|
3510
|
+
* Install the polyfill if needed.
|
|
3511
|
+
*/
|
|
3512
|
+
static install() {}
|
|
3513
|
+
};
|
|
3514
|
+
/**
|
|
3515
|
+
* @summary A polyfill to silence the play() Promise in HTML5 video.
|
|
3516
|
+
*/
|
|
3517
|
+
shaka.polyfill.VideoPlayPromise = class {
|
|
3518
|
+
/**
|
|
3519
|
+
* Install the polyfill if needed.
|
|
3520
|
+
*/
|
|
3521
|
+
static install() {}
|
|
3522
|
+
};
|
|
3523
|
+
/**
|
|
3524
|
+
* @summary A polyfill to provide MSE VideoPlaybackQuality metrics.
|
|
3525
|
+
* Many browsers do not yet provide this API, and Chrome currently provides
|
|
3526
|
+
* similar data through individual prefixed attributes on HTMLVideoElement.
|
|
3527
|
+
*/
|
|
3528
|
+
shaka.polyfill.VideoPlaybackQuality = class {
|
|
3529
|
+
/**
|
|
3530
|
+
* Install the polyfill if needed.
|
|
3531
|
+
*/
|
|
3532
|
+
static install() {}
|
|
3533
|
+
};
|
|
3534
|
+
/**
|
|
3535
|
+
* @summary A polyfill to provide VTTCue.
|
|
3536
|
+
*/
|
|
3537
|
+
shaka.polyfill.VTTCue = class {
|
|
3538
|
+
/**
|
|
3539
|
+
* Install the polyfill if needed.
|
|
3540
|
+
*/
|
|
3541
|
+
static install() {}
|
|
3542
|
+
};
|
|
3360
3543
|
/**
|
|
3361
3544
|
* LRC file format: https://en.wikipedia.org/wiki/LRC_(file_format)
|
|
3362
3545
|
* @implements {shaka.extern.TextParser}
|