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
|
@@ -265,6 +265,10 @@ shaka.util.Error.Code = {
|
|
|
265
265
|
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
266
266
|
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
267
267
|
'HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED': 4040,
|
|
268
|
+
'HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4041,
|
|
269
|
+
'NO_WEB_CRYPTO_API': 4042,
|
|
270
|
+
'HLS_AES_128_INVALID_IV_LENGTH': 4043,
|
|
271
|
+
'HLS_AES_128_INVALID_KEY_LENGTH': 4044,
|
|
268
272
|
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
269
273
|
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
270
274
|
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
@@ -1207,6 +1211,10 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
1207
1211
|
* @override
|
|
1208
1212
|
*/
|
|
1209
1213
|
playbackRateChanged(rate) {}
|
|
1214
|
+
/**
|
|
1215
|
+
* @override
|
|
1216
|
+
*/
|
|
1217
|
+
setMediaElement(mediaElement) {}
|
|
1210
1218
|
/**
|
|
1211
1219
|
* @override
|
|
1212
1220
|
*/
|
|
@@ -1440,7 +1448,8 @@ shaka.net.NetworkingEngine.RequestType = {
|
|
|
1440
1448
|
'LICENSE': 2,
|
|
1441
1449
|
'APP': 3,
|
|
1442
1450
|
'TIMING': 4,
|
|
1443
|
-
'SERVER_CERTIFICATE': 5
|
|
1451
|
+
'SERVER_CERTIFICATE': 5,
|
|
1452
|
+
'KEY': 6
|
|
1444
1453
|
};
|
|
1445
1454
|
/**
|
|
1446
1455
|
* Priority level for network scheme plugins.
|
|
@@ -1809,8 +1818,10 @@ shaka.media.SegmentReference = class {
|
|
|
1809
1818
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
1810
1819
|
* The segment status is used to indicate that a segment does not exist or is
|
|
1811
1820
|
* not available.
|
|
1821
|
+
* @param {?shaka.extern.HlsAes128Key=} hlsAes128Key
|
|
1822
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1812
1823
|
*/
|
|
1813
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status) {}
|
|
1824
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, hlsAes128Key) {}
|
|
1814
1825
|
/**
|
|
1815
1826
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1816
1827
|
* @return {!Array.<string>}
|
|
@@ -2157,6 +2168,10 @@ shaka.media.SegmentIterator = class {
|
|
|
2157
2168
|
* @param {number} partialSegmentIndex
|
|
2158
2169
|
*/
|
|
2159
2170
|
constructor(segmentIndex, index, partialSegmentIndex) {}
|
|
2171
|
+
/**
|
|
2172
|
+
* @return {number}
|
|
2173
|
+
*/
|
|
2174
|
+
currentPosition() {}
|
|
2160
2175
|
/**
|
|
2161
2176
|
* @return {shaka.media.SegmentReference}
|
|
2162
2177
|
*/
|
|
@@ -3827,6 +3842,16 @@ shaka.polyfill.Orientation = class {
|
|
|
3827
3842
|
*/
|
|
3828
3843
|
static install() {}
|
|
3829
3844
|
};
|
|
3845
|
+
/**
|
|
3846
|
+
* @summary A polyfill to implement modern, standardized EME on top of Apple's
|
|
3847
|
+
* prefixed EME in Safari.
|
|
3848
|
+
*/
|
|
3849
|
+
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3850
|
+
/**
|
|
3851
|
+
* Installs the polyfill if needed.
|
|
3852
|
+
*/
|
|
3853
|
+
static install() {}
|
|
3854
|
+
};
|
|
3830
3855
|
/**
|
|
3831
3856
|
* @summary A polyfill to stub out
|
|
3832
3857
|
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
@@ -4106,11 +4131,44 @@ shaka.util.FairPlayUtils = class {
|
|
|
4106
4131
|
*/
|
|
4107
4132
|
static initDataTransform(initData, contentId, cert) {}
|
|
4108
4133
|
/**
|
|
4109
|
-
*
|
|
4134
|
+
* Verimatrix initDataTransform configuration.
|
|
4135
|
+
* @param {!Uint8Array} initData
|
|
4136
|
+
* @param {string} initDataType
|
|
4137
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4138
|
+
*/
|
|
4139
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4140
|
+
/**
|
|
4141
|
+
* EZDRM initDataTransform configuration.
|
|
4142
|
+
* @param {!Uint8Array} initData
|
|
4143
|
+
* @param {string} initDataType
|
|
4144
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4145
|
+
*/
|
|
4146
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4147
|
+
/**
|
|
4148
|
+
* Conax initDataTransform configuration.
|
|
4149
|
+
* @param {!Uint8Array} initData
|
|
4150
|
+
* @param {string} initDataType
|
|
4151
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4152
|
+
*/
|
|
4153
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4154
|
+
/**
|
|
4155
|
+
* Verimatrix FairPlay request.
|
|
4156
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4157
|
+
* @param {shaka.extern.Request} request
|
|
4158
|
+
*/
|
|
4159
|
+
static verimatrixFairPlayRequest(type, request) {}
|
|
4160
|
+
/**
|
|
4161
|
+
* EZDRM FairPlay request.
|
|
4162
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4163
|
+
* @param {shaka.extern.Request} request
|
|
4164
|
+
*/
|
|
4165
|
+
static ezdrmFairPlayRequest(type, request) {}
|
|
4166
|
+
/**
|
|
4167
|
+
* Conax FairPlay request.
|
|
4110
4168
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4111
4169
|
* @param {shaka.extern.Request} request
|
|
4112
4170
|
*/
|
|
4113
|
-
static
|
|
4171
|
+
static conaxFairPlayRequest(type, request) {}
|
|
4114
4172
|
/**
|
|
4115
4173
|
* Common FairPlay response transform for some DRMs providers.
|
|
4116
4174
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|