shaka-player 4.1.3 → 4.2.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/CHANGELOG.md +33 -34
- package/demo/common/assets.js +25 -0
- package/demo/common/message_ids.js +2 -0
- package/demo/config.js +5 -1
- package/demo/index.html +1 -1
- package/demo/locales/en.json +2 -0
- package/demo/locales/source.json +8 -0
- package/dist/demo.compiled.debug.js +25 -23
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +25 -23
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +3 -2
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +24 -22
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +24 -22
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +57 -4
- package/dist/shaka-player.compiled.debug.d.ts +57 -4
- package/dist/shaka-player.compiled.debug.externs.js +62 -4
- package/dist/shaka-player.compiled.debug.js +285 -241
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +62 -4
- package/dist/shaka-player.compiled.js +815 -798
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +57 -4
- package/dist/shaka-player.ui.debug.d.ts +57 -4
- package/dist/shaka-player.ui.debug.externs.js +62 -4
- package/dist/shaka-player.ui.debug.js +283 -239
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +62 -4
- package/dist/shaka-player.ui.js +979 -960
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +149 -0
- package/docs/tutorials/ui.md +6 -6
- package/externs/shaka/abr_manager.js +8 -0
- package/externs/shaka/manifest.js +43 -0
- package/externs/shaka/player.js +13 -2
- package/lib/abr/simple_abr_manager.js +72 -4
- package/lib/hls/hls_parser.js +117 -25
- package/lib/media/drm_engine.js +0 -2
- package/lib/media/segment_index.js +8 -0
- package/lib/media/segment_reference.js +7 -1
- package/lib/media/streaming_engine.js +38 -2
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +8 -1
- package/lib/polyfill/patchedmediakeys_apple.js +729 -0
- package/lib/text/vtt_text_parser.js +61 -4
- package/lib/util/error.js +21 -1
- package/lib/util/fairplay_utils.js +100 -2
- package/lib/util/platform.js +12 -1
- package/lib/util/player_configuration.js +3 -10
- package/package.json +1 -1
- package/shaka-player.uncompiled.js +1 -0
- package/test/hls/hls_parser_unit.js +49 -33
- package/test/media/streaming_engine_unit.js +79 -5
- package/test/test/util/simple_fakes.js +4 -0
- package/test/test/util/streaming_engine_util.js +10 -2
- package/test/text/vtt_text_parser_unit.js +26 -0
|
@@ -604,6 +604,10 @@ shaka.util.Error.Code = {
|
|
|
604
604
|
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
605
605
|
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
606
606
|
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
607
|
+
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
608
|
+
'NO_WEB_CRYPTO_API': 4042,
|
|
609
|
+
'HLS_AES_128_INVALID_IV_LENGTH': 4043,
|
|
610
|
+
'HLS_AES_128_INVALID_KEY_LENGTH': 4044,
|
|
607
611
|
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
608
612
|
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
609
613
|
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
@@ -1023,6 +1027,10 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
1023
1027
|
* @override
|
|
1024
1028
|
*/
|
|
1025
1029
|
playbackRateChanged(rate) {}
|
|
1030
|
+
/**
|
|
1031
|
+
* @override
|
|
1032
|
+
*/
|
|
1033
|
+
setMediaElement(mediaElement) {}
|
|
1026
1034
|
/**
|
|
1027
1035
|
* @override
|
|
1028
1036
|
*/
|
|
@@ -1333,7 +1341,8 @@ shaka.net.NetworkingEngine.RequestType = {
|
|
|
1333
1341
|
'LICENSE': 2,
|
|
1334
1342
|
'APP': 3,
|
|
1335
1343
|
'TIMING': 4,
|
|
1336
|
-
'SERVER_CERTIFICATE': 5
|
|
1344
|
+
'SERVER_CERTIFICATE': 5,
|
|
1345
|
+
'KEY': 6
|
|
1337
1346
|
};
|
|
1338
1347
|
/**
|
|
1339
1348
|
* Priority level for network scheme plugins.
|
|
@@ -1702,8 +1711,10 @@ shaka.media.SegmentReference = class {
|
|
|
1702
1711
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
1703
1712
|
* The segment status is used to indicate that a segment does not exist or is
|
|
1704
1713
|
* not available.
|
|
1714
|
+
* @param {?shaka.extern.HlsAes128Key=} hlsAes128Key
|
|
1715
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1705
1716
|
*/
|
|
1706
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status) {}
|
|
1717
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, hlsAes128Key) {}
|
|
1707
1718
|
/**
|
|
1708
1719
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1709
1720
|
* @return {!Array.<string>}
|
|
@@ -2050,6 +2061,10 @@ shaka.media.SegmentIterator = class {
|
|
|
2050
2061
|
* @param {number} partialSegmentIndex
|
|
2051
2062
|
*/
|
|
2052
2063
|
constructor(segmentIndex, index, partialSegmentIndex) {}
|
|
2064
|
+
/**
|
|
2065
|
+
* @return {number}
|
|
2066
|
+
*/
|
|
2067
|
+
currentPosition() {}
|
|
2053
2068
|
/**
|
|
2054
2069
|
* @return {shaka.media.SegmentReference}
|
|
2055
2070
|
*/
|
|
@@ -3720,6 +3735,16 @@ shaka.polyfill.Orientation = class {
|
|
|
3720
3735
|
*/
|
|
3721
3736
|
static install() {}
|
|
3722
3737
|
};
|
|
3738
|
+
/**
|
|
3739
|
+
* @summary A polyfill to implement modern, standardized EME on top of Apple's
|
|
3740
|
+
* prefixed EME in Safari.
|
|
3741
|
+
*/
|
|
3742
|
+
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3743
|
+
/**
|
|
3744
|
+
* Installs the polyfill if needed.
|
|
3745
|
+
*/
|
|
3746
|
+
static install() {}
|
|
3747
|
+
};
|
|
3723
3748
|
/**
|
|
3724
3749
|
* @summary A polyfill to stub out
|
|
3725
3750
|
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
@@ -3999,11 +4024,44 @@ shaka.util.FairPlayUtils = class {
|
|
|
3999
4024
|
*/
|
|
4000
4025
|
static initDataTransform(initData, contentId, cert) {}
|
|
4001
4026
|
/**
|
|
4002
|
-
*
|
|
4027
|
+
* Verimatrix initDataTransform configuration.
|
|
4028
|
+
* @param {!Uint8Array} initData
|
|
4029
|
+
* @param {string} initDataType
|
|
4030
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4031
|
+
*/
|
|
4032
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4033
|
+
/**
|
|
4034
|
+
* EZDRM initDataTransform configuration.
|
|
4035
|
+
* @param {!Uint8Array} initData
|
|
4036
|
+
* @param {string} initDataType
|
|
4037
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4038
|
+
*/
|
|
4039
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4040
|
+
/**
|
|
4041
|
+
* Conax initDataTransform configuration.
|
|
4042
|
+
* @param {!Uint8Array} initData
|
|
4043
|
+
* @param {string} initDataType
|
|
4044
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4045
|
+
*/
|
|
4046
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4047
|
+
/**
|
|
4048
|
+
* Verimatrix FairPlay request.
|
|
4049
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4050
|
+
* @param {shaka.extern.Request} request
|
|
4051
|
+
*/
|
|
4052
|
+
static verimatrixFairPlayRequest(type, request) {}
|
|
4053
|
+
/**
|
|
4054
|
+
* EZDRM FairPlay request.
|
|
4055
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4056
|
+
* @param {shaka.extern.Request} request
|
|
4057
|
+
*/
|
|
4058
|
+
static ezdrmFairPlayRequest(type, request) {}
|
|
4059
|
+
/**
|
|
4060
|
+
* Conax FairPlay request.
|
|
4003
4061
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4004
4062
|
* @param {shaka.extern.Request} request
|
|
4005
4063
|
*/
|
|
4006
|
-
static
|
|
4064
|
+
static conaxFairPlayRequest(type, request) {}
|
|
4007
4065
|
/**
|
|
4008
4066
|
* Common FairPlay response transform for some DRMs providers.
|
|
4009
4067
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|