-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Suppress Infinity duration on Android Chrome before playback #3476
Conversation
} | ||
}; | ||
this.on(this.player_, 'timeupdate', checkProgress); | ||
return 0; |
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 believe duration should be NaN when the true value is unknown.
Would you mind adding a unit test for this? |
if (this.el_.duration === Infinity && | ||
browser.IS_ANDROID && browser.IS_CHROME) { | ||
if (this.el_.currentTime === 0) { | ||
let checkProgress = () => { |
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.
The newly released version of videojs-standard will complain about the use of let
for names that are never reassigned (const
is preferred).
@misteroneill re the question I see on email notifications but not showing up here on why I've used |
return NaN; | ||
} | ||
} | ||
return this.el_.duration || NaN; |
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.
do the time components handle NaN
correctly?
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.
They behave correctly and formatTime deals with it and Infinity.
LGTM. Needs a rebase against master. Would you be able to do it? Otherwise, I can take care of it as part of the merge. |
bcf0451
to
1cae6df
Compare
This needs to be rebased against master. |
1cae6df
to
1f535f2
Compare
@gkatsev Looks like this branch has no conflicts with base branch, what needs to happen next? |
@gkatsev , @mister-ben What needs to happen next here ? |
It's ready to go and will be pulled into the 5.13 release. |
Awesome |
Description
Re issue #3079 and the discussion in #3083. Android Chrome returns
Infinity
for VOD HLS until after playback has started. This causes issues such as an unwanted flash of the live display control.Specific Changes proposed
HTML5 tech will return
NaN
instead ofInfinity
if playback has not started. Fires adurationupdate
event once the reported duration can be believed if the duration is stillInfinity
, so controls can update.Requirements Checklist