shaka-player
Advanced tools
Comparing version 4.10.3 to 4.10.4
@@ -774,48 +774,48 @@ | ||
shaka.ui.Locales.Ids = { | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
PLAY: 'PLAY', | ||
AIRPLAY: 'AIRPLAY', | ||
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME', | ||
LANGUAGE: 'LANGUAGE', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
SKIP_AD: 'SKIP_AD', | ||
CAPTIONS: 'CAPTIONS', | ||
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE', | ||
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
SKIP_AD: 'SKIP_AD', | ||
QUALITY: 'QUALITY', | ||
REPLAY: 'REPLAY', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE', | ||
UNMUTE: 'UNMUTE', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
RECENTER_VR: 'RECENTER_VR', | ||
FAST_FORWARD: 'FAST_FORWARD', | ||
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN', | ||
SEEK: 'SEEK', | ||
VOLUME: 'VOLUME', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
SURROUND: 'SURROUND', | ||
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES', | ||
RESOLUTION: 'RESOLUTION', | ||
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC', | ||
RECENTER_VR: 'RECENTER_VR', | ||
AD_TIME: 'AD_TIME', | ||
BACK: 'BACK', | ||
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
NOT_APPLICABLE: 'NOT_APPLICABLE', | ||
CAST: 'CAST', | ||
MUTE: 'MUTE', | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
AD_STATISTICS: 'AD_STATISTICS', | ||
SURROUND: 'SURROUND', | ||
RESOLUTION: 'RESOLUTION', | ||
PLAY: 'PLAY', | ||
OFF: 'OFF', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
AIRPLAY: 'AIRPLAY', | ||
AD_DURATION: 'AD_DURATION', | ||
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE', | ||
QUALITY: 'QUALITY', | ||
LOOP: 'LOOP', | ||
REWIND: 'REWIND', | ||
ON: 'ON', | ||
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
PLAYBACK_RATE: 'PLAYBACK_RATE', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
NOT_APPLICABLE: 'NOT_APPLICABLE', | ||
VOLUME: 'VOLUME', | ||
SEEK: 'SEEK', | ||
REPLAY: 'REPLAY', | ||
MUTE: 'MUTE', | ||
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME', | ||
UNMUTE: 'UNMUTE', | ||
PAUSE: 'PAUSE', | ||
LANGUAGE: 'LANGUAGE', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
REWIND: 'REWIND', | ||
STATISTICS: 'STATISTICS', | ||
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN', | ||
LIVE: 'LIVE', | ||
AD_DURATION: 'AD_DURATION', | ||
BACK: 'BACK', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
LOOP: 'LOOP', | ||
}; |
@@ -650,8 +650,8 @@ /*! @license | ||
JSON.parse(data)); | ||
for (const asset of dataAsJson.ASSETS) { | ||
if (asset.URI) { | ||
for (const asset of dataAsJson['ASSETS']) { | ||
if (asset['URI']) { | ||
interstitialsAd.push({ | ||
startTime: interstitial.startTime, | ||
endTime: interstitial.endTime, | ||
uri: asset.URI, | ||
uri: asset['URI'], | ||
isSkippable, | ||
@@ -658,0 +658,0 @@ canJump, |
@@ -21,2 +21,3 @@ /*! @license | ||
goog.require('shaka.util.MediaReadyState'); | ||
goog.require('shaka.util.Platform'); | ||
goog.require('shaka.util.Timer'); | ||
@@ -424,8 +425,16 @@ goog.requireType('shaka.media.PresentationTimeline'); | ||
if (Math.abs(targetTime - currentTime) > gapLimit) { | ||
// You can only seek like this every so often. This is to prevent an | ||
// infinite loop on systems where changing currentTime takes a significant | ||
// amount of time (e.g. Chromecast). | ||
const time = Date.now() / 1000; | ||
if (!this.lastCorrectiveSeek_ || this.lastCorrectiveSeek_ < time - 1) { | ||
this.lastCorrectiveSeek_ = time; | ||
let canCorrectiveSeek = false; | ||
if (shaka.util.Platform.isSeekingSlow()) { | ||
// You can only seek like this every so often. This is to prevent an | ||
// infinite loop on systems where changing currentTime takes a | ||
// significant amount of time (e.g. Chromecast). | ||
const time = Date.now() / 1000; | ||
if (!this.lastCorrectiveSeek_ || this.lastCorrectiveSeek_ < time - 1) { | ||
this.lastCorrectiveSeek_ = time; | ||
canCorrectiveSeek = true; | ||
} | ||
} else { | ||
canCorrectiveSeek = true; | ||
} | ||
if (canCorrectiveSeek) { | ||
this.videoWrapper_.setTime(targetTime); | ||
@@ -432,0 +441,0 @@ return; |
@@ -537,2 +537,43 @@ /*! @license | ||
} | ||
/** | ||
* @param {!BufferSource} rawResult | ||
* @param {shaka.extern.aesKey} aesKey | ||
* @param {number} position | ||
* @return {!Promise.<!BufferSource>} | ||
*/ | ||
static async aesDecrypt(rawResult, aesKey, position) { | ||
const key = aesKey; | ||
if (!key.cryptoKey) { | ||
goog.asserts.assert(key.fetchKey, 'If AES cryptoKey was not ' + | ||
'preloaded, fetchKey function should be provided'); | ||
await key.fetchKey(); | ||
goog.asserts.assert(key.cryptoKey, 'AES cryptoKey should now be set'); | ||
} | ||
let iv = key.iv; | ||
if (!iv) { | ||
iv = shaka.util.BufferUtils.toUint8(new ArrayBuffer(16)); | ||
let sequence = key.firstMediaSequenceNumber + position; | ||
for (let i = iv.byteLength - 1; i >= 0; i--) { | ||
iv[i] = sequence & 0xff; | ||
sequence >>= 8; | ||
} | ||
} | ||
let algorithm; | ||
if (aesKey.blockCipherMode == 'CBC') { | ||
algorithm = { | ||
name: 'AES-CBC', | ||
iv, | ||
}; | ||
} else { | ||
algorithm = { | ||
name: 'AES-CTR', | ||
counter: iv, | ||
// NIST SP800-38A standard suggests that the counter should occupy half | ||
// of the counter block | ||
length: 64, | ||
}; | ||
} | ||
return window.crypto.subtle.decrypt(algorithm, key.cryptoKey, rawResult); | ||
} | ||
}; | ||
@@ -539,0 +580,0 @@ |
@@ -649,2 +649,21 @@ /*! @license | ||
/** | ||
* On some platforms, such as v1 Chromecasts, the act of seeking can take a | ||
* significant amount of time. | ||
* | ||
* @return {boolean} | ||
*/ | ||
static isSeekingSlow() { | ||
const Platform = shaka.util.Platform; | ||
if (Platform.isChromecast()) { | ||
if (Platform.isAndroidCastDevice()) { | ||
// Android-based Chromecasts are new enough to not be a problem. | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
/** | ||
* Returns true if MediaKeys is polyfilled | ||
@@ -651,0 +670,0 @@ * |
@@ -111,3 +111,4 @@ /*! @license | ||
if (previousCodec == currentCodec) { | ||
if (stream.bandwidth > previousStream.bandwidth) { | ||
if (!stream.bandwidth || !previousStream.bandwidth || | ||
stream.bandwidth > previousStream.bandwidth) { | ||
validAudioStreams.push(stream); | ||
@@ -166,3 +167,4 @@ validAudioIds.push(stream.id); | ||
if (previousCodec == currentCodec) { | ||
if (stream.bandwidth > previousStream.bandwidth) { | ||
if (!stream.bandwidth || !previousStream.bandwidth || | ||
stream.bandwidth > previousStream.bandwidth) { | ||
validVideoStreams.push(stream); | ||
@@ -169,0 +171,0 @@ validVideoIds.push(stream.id); |
{ | ||
"name": "shaka-player", | ||
"description": "DASH/EME video player library", | ||
"version": "4.10.3", | ||
"version": "4.10.4", | ||
"homepage": "https://github.com/shaka-project/shaka-player", | ||
@@ -6,0 +6,0 @@ "author": "Google", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19056465
176025