shaka-player
Advanced tools
Comparing version 4.11.3 to 4.11.4
@@ -915,49 +915,49 @@ | ||
shaka.ui.Locales.Ids = { | ||
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES', | ||
AIRPLAY: 'AIRPLAY', | ||
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
REWIND: 'REWIND', | ||
RESOLUTION: 'RESOLUTION', | ||
AD_TIME: 'AD_TIME', | ||
CAPTIONS: 'CAPTIONS', | ||
LANGUAGE: 'LANGUAGE', | ||
LOOP: 'LOOP', | ||
VOLUME: 'VOLUME', | ||
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC', | ||
CHAPTERS: 'CHAPTERS', | ||
AD_STATISTICS: 'AD_STATISTICS', | ||
QUALITY: 'QUALITY', | ||
UNMUTE: 'UNMUTE', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
OFF: 'OFF', | ||
STATISTICS: 'STATISTICS', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
AD_DURATION: 'AD_DURATION', | ||
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
SURROUND: 'SURROUND', | ||
SKIP_AD: 'SKIP_AD', | ||
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES', | ||
SEEK: 'SEEK', | ||
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN', | ||
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
NOT_APPLICABLE: 'NOT_APPLICABLE', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
RECENTER_VR: 'RECENTER_VR', | ||
LIVE: 'LIVE', | ||
PLAYBACK_RATE: 'PLAYBACK_RATE', | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
PLAY: 'PLAY', | ||
UNMUTE: 'UNMUTE', | ||
AD_STATISTICS: 'AD_STATISTICS', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
CAST: 'CAST', | ||
VOLUME: 'VOLUME', | ||
REPLAY: 'REPLAY', | ||
MUTE: 'MUTE', | ||
SKIP_TO_LIVE: 'SKIP_TO_LIVE', | ||
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN', | ||
STATISTICS: 'STATISTICS', | ||
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE', | ||
SEEK: 'SEEK', | ||
AD_DURATION: 'AD_DURATION', | ||
PAUSE: 'PAUSE', | ||
BACK: 'BACK', | ||
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME', | ||
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC', | ||
LIVE: 'LIVE', | ||
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE', | ||
LANGUAGE: 'LANGUAGE', | ||
MORE_SETTINGS: 'MORE_SETTINGS', | ||
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE', | ||
RESOLUTION: 'RESOLUTION', | ||
BACK: 'BACK', | ||
PAUSE: 'PAUSE', | ||
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE', | ||
AD_PROGRESS: 'AD_PROGRESS', | ||
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE', | ||
SKIP_AD: 'SKIP_AD', | ||
PLAYBACK_RATE: 'PLAYBACK_RATE', | ||
OFF: 'OFF', | ||
SURROUND: 'SURROUND', | ||
REWIND: 'REWIND', | ||
CAPTIONS: 'CAPTIONS', | ||
RECENTER_VR: 'RECENTER_VR', | ||
AUTO_QUALITY: 'AUTO_QUALITY', | ||
FAST_FORWARD: 'FAST_FORWARD', | ||
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE', | ||
CAST: 'CAST', | ||
SUBTITLE_FORCED: 'SUBTITLE_FORCED', | ||
QUALITY: 'QUALITY', | ||
AIRPLAY: 'AIRPLAY', | ||
ON: 'ON', | ||
CHAPTERS: 'CHAPTERS', | ||
NOT_APPLICABLE: 'NOT_APPLICABLE', | ||
FULL_SCREEN: 'FULL_SCREEN', | ||
}; |
@@ -92,2 +92,5 @@ /*! @license | ||
/** @private {?shaka.extern.AdInterstitial} */ | ||
this.lastPlayedAd_ = null; | ||
this.eventManager_.listen(this.baseVideo_, 'timeupdate', () => { | ||
@@ -99,3 +102,10 @@ if (this.playingAd_) { | ||
this.lastTime_ = this.baseVideo_.currentTime; | ||
const currentInterstitial = this.getCurrentInterstitial_(needPreRoll); | ||
// Remove last played add when the new time is before to the ad time. | ||
if (this.lastPlayedAd_ && | ||
!this.lastPlayedAd_.pre && !this.lastPlayedAd_.post && | ||
this.lastTime_ < this.lastPlayedAd_.startTime) { | ||
this.lastPlayedAd_ = null; | ||
} | ||
const currentInterstitial = this.getCurrentInterstitial_( | ||
needPreRoll, /* numberToSkip= */ 0, this.lastPlayedAd_); | ||
if (currentInterstitial) { | ||
@@ -192,2 +202,3 @@ this.setupAd_(currentInterstitial, /* sequenceLength= */ 1, | ||
this.lastTime_ = null; | ||
this.lastPlayedAd_ = null; | ||
} | ||
@@ -380,7 +391,8 @@ | ||
* @param {boolean} needPreRoll | ||
* @param {number=} numberToSkip | ||
* @param {number} numberToSkip | ||
* @param {?shaka.extern.AdInterstitial=} lastPlayedAd | ||
* @return {?shaka.extern.AdInterstitial} | ||
* @private | ||
*/ | ||
getCurrentInterstitial_(needPreRoll, numberToSkip = 0) { | ||
getCurrentInterstitial_(needPreRoll, numberToSkip, lastPlayedAd) { | ||
let skipped = 0; | ||
@@ -405,4 +417,12 @@ let currentInterstitial = null; | ||
this.lastTime_ - roundDecimals(interstitial.startTime); | ||
isValid = difference > 0 && | ||
(difference <= 1 || !interstitial.canJump); | ||
if (difference > 0 && | ||
(difference <= 1 || !interstitial.canJump)) { | ||
if (difference > 1 && lastPlayedAd && | ||
!lastPlayedAd.pre && !lastPlayedAd.post && | ||
lastPlayedAd.startTime >= interstitial.startTime) { | ||
isValid = false; | ||
} else { | ||
isValid = true; | ||
} | ||
} | ||
} | ||
@@ -434,2 +454,4 @@ if (isValid) { | ||
this.lastPlayedAd_ = interstitial; | ||
const startTime = Date.now(); | ||
@@ -436,0 +458,0 @@ |
@@ -226,4 +226,6 @@ /*! @license | ||
if (shaka.util.Platform.isLegacyEdge() || | ||
shaka.util.Platform.isXboxOne()) { | ||
jumpTo = Math.ceil((jumpTo + 0.01) * 100) / 100; | ||
shaka.util.Platform.isXboxOne() || | ||
shaka.util.Platform.isTizen()) { | ||
const gapPadding = this.config_.gapPadding; | ||
jumpTo = Math.ceil((jumpTo + gapPadding) * 100) / 100; | ||
} | ||
@@ -230,0 +232,0 @@ const seekEnd = this.timeline_.getSeekRangeEnd(); |
@@ -106,2 +106,7 @@ /*! @license | ||
'ass': 'text/x-ssa', | ||
'jpg': 'image/jpeg', | ||
'png': 'image/png', | ||
'svg': 'image/svg+xml', | ||
'webp': 'image/webp', | ||
'avif': 'image/avif', | ||
}; |
@@ -1349,3 +1349,3 @@ /*! @license | ||
const numberOfParallelDownloads = config.offline.numberOfParallelDownloads; | ||
let groupId = 0; | ||
let groupId = numberOfParallelDownloads === 0 ? stream.id : 0; | ||
@@ -1402,3 +1402,5 @@ shaka.offline.Storage.forEachSegment_(stream, startTime, (segment) => { | ||
streamDb.segments.push(segmentDB); | ||
groupId = (groupId + 1) % numberOfParallelDownloads; | ||
if (numberOfParallelDownloads !== 0) { | ||
groupId = (groupId + 1) % numberOfParallelDownloads; | ||
} | ||
}); | ||
@@ -1598,10 +1600,2 @@ | ||
for (const text of manifest.textStreams) { | ||
set.add(text); | ||
} | ||
for (const image of manifest.imageStreams) { | ||
set.add(image); | ||
} | ||
for (const variant of manifest.variants) { | ||
@@ -1616,2 +1610,10 @@ if (variant.audio) { | ||
for (const text of manifest.textStreams) { | ||
set.add(text); | ||
} | ||
for (const image of manifest.imageStreams) { | ||
set.add(image); | ||
} | ||
return set; | ||
@@ -1618,0 +1620,0 @@ } |
@@ -209,2 +209,3 @@ /*! @license | ||
gapDetectionThreshold: 0.5, | ||
gapPadding: 0.01, | ||
gapJumpTimerTime: 0.25 /* seconds */, | ||
@@ -287,2 +288,6 @@ durationBackoff: 1, | ||
if (shaka.util.Platform.isTizen()) { | ||
streaming.gapPadding = 2; | ||
} | ||
const offline = { | ||
@@ -289,0 +294,0 @@ // We need to set this to a throw-away implementation for now as our |
{ | ||
"name": "shaka-player", | ||
"description": "DASH/EME video player library", | ||
"version": "4.11.3", | ||
"version": "4.11.4", | ||
"homepage": "https://github.com/shaka-project/shaka-player", | ||
@@ -6,0 +6,0 @@ "author": "Google", |
@@ -266,2 +266,12 @@ /*! @license | ||
if (this.spinnerContainer_) { | ||
this.videoContainer_.removeChild(this.spinnerContainer_); | ||
this.spinnerContainer_ = null; | ||
} | ||
if (this.clientAdContainer_) { | ||
this.videoContainer_.removeChild(this.clientAdContainer_); | ||
this.clientAdContainer_ = null; | ||
} | ||
if (this.localPlayer_) { | ||
@@ -528,2 +538,4 @@ await this.localPlayer_.destroy(); | ||
getClientSideAdContainer() { | ||
goog.asserts.assert( | ||
this.clientAdContainer_, 'No client ad container after destruction!'); | ||
return this.clientAdContainer_; | ||
@@ -987,3 +999,3 @@ } | ||
addBufferingSpinner_() { | ||
/** @private {!HTMLElement} */ | ||
/** @private {HTMLElement} */ | ||
this.spinnerContainer_ = shaka.util.Dom.createHTMLElement('div'); | ||
@@ -1145,3 +1157,3 @@ this.spinnerContainer_.classList.add('shaka-spinner-container'); | ||
addClientAdContainer_() { | ||
/** @private {!HTMLElement} */ | ||
/** @private {HTMLElement} */ | ||
this.clientAdContainer_ = shaka.util.Dom.createHTMLElement('div'); | ||
@@ -1148,0 +1160,0 @@ this.clientAdContainer_.classList.add('shaka-client-side-ad-container'); |
{ | ||
"AD_DURATION": " ", | ||
"AD_PROGRESS": " [AD_ON] / [NUM_ADS]", | ||
"AD_STATISTICS": " ", | ||
"AD_TIME": " : [AD_TIME]", | ||
@@ -10,2 +11,4 @@ "AIRPLAY": "", | ||
"CAST": "", | ||
"CHAPTERS": "", | ||
"DOWNLOAD_VIDEO_FRAME": " ", | ||
"ENTER_LOOP_MODE": " ", | ||
@@ -31,2 +34,4 @@ "ENTER_PICTURE_IN_PICTURE": " ", | ||
"PLAYBACK_RATE": "", | ||
"QUALITY": "", | ||
"RECENTER_VR": "", | ||
"REPLAY": "", | ||
@@ -36,6 +41,8 @@ "RESOLUTION": "", | ||
"SEEK": "", | ||
"SKIP_AD": " ", | ||
"SKIP_AD": " ", | ||
"SKIP_TO_LIVE": " ", | ||
"STATISTICS": " ", | ||
"SUBTITLE_FORCED": " ", | ||
"SURROUND": "", | ||
"TOGGLE_STEREOSCOPIC": "", | ||
"UNDETERMINED_LANGUAGE": " ", | ||
@@ -42,0 +49,0 @@ "UNMUTE": "", |
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
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
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
19602281
437
180271