shaka-player
Advanced tools
Comparing version 4.9.15 to 4.9.16
@@ -764,47 +764,47 @@ | ||
shaka.ui.Locales.Ids = { | ||
AD_DURATION: 'AD_DURATION', | ||
OFF: 'OFF', | ||
REPLAY: 'REPLAY', | ||
PLAY: 'PLAY', | ||
LIVE: 'LIVE', | ||
CAPTIONS: 'CAPTIONS', | ||
ON: 'ON', | ||
LANGUAGE: 'LANGUAGE', | ||
MUTE: 'MUTE', | ||
LOOP: 'LOOP', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
RESOLUTION: 'RESOLUTION', | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
SKIP_AD: 'SKIP_AD', | ||
QUALITY: 'QUALITY', | ||
AD_STATISTICS: 'AD_STATISTICS', | ||
NOT_APPLICABLE: 'NOT_APPLICABLE', | ||
VOLUME: 'VOLUME', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
CAST: 'CAST', | ||
SKIP_AD: 'SKIP_AD', | ||
REWIND: 'REWIND', | ||
STATISTICS: 'STATISTICS', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
RECENTER_VR: 'RECENTER_VR', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
FAST_FORWARD: 'FAST_FORWARD', | ||
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE', | ||
AD_STATISTICS: 'AD_STATISTICS', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
AD_DURATION: 'AD_DURATION', | ||
LOOP: 'LOOP', | ||
UNMUTE: 'UNMUTE', | ||
PLAYBACK_RATE: 'PLAYBACK_RATE', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
STATISTICS: 'STATISTICS', | ||
OFF: 'OFF', | ||
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES', | ||
RECENTER_VR: 'RECENTER_VR', | ||
SEEK: 'SEEK', | ||
REWIND: 'REWIND', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
LIVE: 'LIVE', | ||
MUTE: 'MUTE', | ||
PAUSE: 'PAUSE', | ||
ON: 'ON', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
REPLAY: 'REPLAY', | ||
PLAY: 'PLAY', | ||
SURROUND: 'SURROUND', | ||
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE', | ||
LANGUAGE: 'LANGUAGE', | ||
AD_TIME: 'AD_TIME', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
BACK: 'BACK', | ||
CAPTIONS: 'CAPTIONS', | ||
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE', | ||
AD_TIME: 'AD_TIME', | ||
PLAYBACK_RATE: 'PLAYBACK_RATE', | ||
RESOLUTION: 'RESOLUTION', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
SEEK: 'SEEK', | ||
VOLUME: 'VOLUME', | ||
AIRPLAY: 'AIRPLAY', | ||
BACK: 'BACK', | ||
}; |
@@ -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; |
@@ -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.9.15", | ||
"version": "4.9.16", | ||
"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
18398827
169224