Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Xbox - round gap jumping values #6695

Merged
merged 3 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/media/gap_jumping_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ goog.require('shaka.media.TimeRangesUtils');
goog.require('shaka.util.EventManager');
goog.require('shaka.util.FakeEvent');
goog.require('shaka.util.IReleasable');
goog.require('shaka.util.Platform');
goog.require('shaka.util.Timer');


Expand Down Expand Up @@ -217,7 +218,14 @@ shaka.media.GapJumpingController = class {

// StreamingEngine can buffer past the seek end, but still don't allow
// seeking past it.
const jumpTo = buffered.start(gapIndex);
let jumpTo = buffered.start(gapIndex);
// Workaround for Xbox with Legacy Edge. On this platform video element
// often rounds value we want to set as currentTime and we are not able
// to jump over the gap.
if (shaka.util.Platform.isLegacyEdge() ||
shaka.util.Platform.isXboxOne()) {
jumpTo = Math.ceil((jumpTo + 0.01) * 100) / 100;
}
const seekEnd = this.timeline_.getSeekRangeEnd();
if (jumpTo >= seekEnd) {
return;
Expand Down
Loading