silvermine / videojs-quality-selector

MIT License
180 stars 55 forks source link

Retain video position while switching quality #74

Closed chaitanyabd closed 3 years ago

chaitanyabd commented 3 years ago

If I'm playing X quality and switch to Y quality, this is the behaviour observed:

  1. Quality Y video is loaded correctly (Good)
  2. Video position is lost; it resets to 0 (Bad)
  3. Video goes into Poster display mode (i.e. as if it's been re-initialized) (Bad)

Expected behaviour is:

  1. Quality Y video is loaded correctly
  2. Video position should be RETAINED, so if I played Quality X video until position 7:02 the Quality Y video should play from the same point
  3. Video should NOT go into Poster display mode, because this is a bad user experienc
jthomerson commented 3 years ago

There's a ton of code that makes sure that the video seeks again after the quality is changed. And I can confirm that's how it works on sites that I've used this plugin on. Perhaps you're doing something that's breaking that functionality, or perhaps there's a bug on some particular browser, but I haven't seen any. Feel free to open up a codepen if you can make it reproducible with a minimum reproducible example.

For example, start looking from here: https://github.com/silvermine/videojs-quality-selector/blob/263b1f489ac152651727f6c6904657e63c24720b/src/js/index.js#L34