-
Notifications
You must be signed in to change notification settings - Fork 3
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/doris 2701 webOS 5 startup improvements (unwanted seek) #102
Conversation
const currentTime = | ||
this.loadedmetadata || mediaCurrentTime > 0 | ||
? mediaCurrentTime | ||
: this.startPosition; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would getLoadPosition
work here?
const currentTime = this.getLoadPosition();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be able to, but we'd need to modify getLoadPosition()
to check for media.currentTime
as well, not sure if that'd have any impact on the rest of the code.
protected getLoadPosition(): number {
const { media } = this;
// if we have not yet loaded any fragment, start loading from start position
let pos = 0;
- if (this.loadedmetadata && media) {
+ if (this.loadedmetadata && media && media.currentTime > 0) {
pos = media.currentTime;
} else if (this.nextLoadPosition) {
pos = this.nextLoadPosition;
}
return pos;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. getLoadPosition
should return the position that should be buffered at any given time. If it determines that it should return media.currentTime
and that has a value of 0
then that is the value that should be used, not startPosition or nextLoadPosition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okay, I'll give it a try 👍
This PR will...
Fix issues on webOS 5 where an unnecessary seek is performed during startup if the manifest is updated while the first segment is being buffered.
video-dev#6998
Video demonstrating the issue where
synchronizeToLiveEdge
is triggered as soon as the first segment start getting inserted into the source buffer, but thecurrentTime
is not yet adjusted to start position.issue_3.mp4