videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.97k stars 7.44k forks source link

Player get stuck for ever if network is off/on #8432

Open pmendozav opened 1 year ago

pmendozav commented 1 year ago

Description

Given a multivariant playlist, the player can retrieve the playback itself if all the variants (media playlists) are downloaded before missing the internet connection. But this is not the case if a variant was not downloaded before network is off, after retrieving the internet connection the player does not download segments/manifests anymore.

Also, the error due the manifest downloading failed cannot be controlled with a listener to error. That is, I tried registering player.on('error', cb) and cb is not called when I miss the internet connection and the manifest download fails. I am able to see a log with something like HLS playlist request error at URL:... and I see a line with this.trigger('error') in PlaylistLoader but my callback is not called

Reduced test case

https://codepen.io/Pavel-Angel-Mendoza-Villafane/pen/vYvyGNx

Steps to reproduce

  1. Open the demo
  2. Open dev tools / network
  3. Play the video and immediately disable the network. There will be several errors due the manifests
  4. Wait for the waiting event (there is a log that prints 'waiting')
  5. Turn on the network. Player get stuck (no segments / manifest will be downloaded)

Errors

No response

What version of Video.js are you using?

8.5.2

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

chrome

What OS(es) and version(s) does this occur with?

macOS

welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.