Skip to content

Conversation

@gesinger
Copy link
Contributor

Description

Sometimes the vjs-waiting class is removed prematurely after the player gets into a waiting state. This removes the graphic waiting spinner while the player is still waiting. To see this behavior on Chrome:

  1. Go to https://videojs.github.io/http-streaming/
  2. Open the console
  3. Enter:
player.on('waiting', () => console.log('waiting'));
player.on('timeupdate', () => console.log('timeupdate: ' + player.currentTime()));
player.play();
  1. Click "Offline" in the network tab

The console logs timeupdate events of the same time sandwiching a waiting event, e.g.:

...
timeupdate: 49.675262
timeupdate: 49.812381
waiting
timeupdate: 49.812381

Specific Changes proposed

This PR waits to remove the vjs-waiting class until the time changes on timeupdate events.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@gkatsev gkatsev merged commit 0060747 into videojs:master Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants