Closed forbesjo closed 7 years ago
A more general/better approach would be to deal with https://github.com/videojs/video.js/blob/master/src/js/player.js#L1192 in some way. As mentioned in the OP there is an additional timeupdate
event after waiting
coming from the video element (this is from a test using contrib-hls and listening to the video element directly). So you only see the waiting spinner for a brief moment.
@forbesjo do we know why we are getting the extra timeupdate event? Is it from the manual timeupdate tracking?
I'm not sure why, the event is coming from the video element itself and not the synthetic timeupdates
Perhaps the function should check readyState before removing the waiting CSS?
Description
Currently the player relies on the tech to trigger
waiting
and show the spinner, however it looks likewaiting
is followed by atimeupdate
which causes the spinner to be cleared.This change will cause a spinner to show if the player hasn't made progress for 1 second regardless of whatever the tech does.
Requirements Checklist