media-stream-player-js
media-stream-player-js copied to clipboard
Stream stuck on loading state. Needs automatic quality throttling?
Describe the bug Perhaps not a bug per se, but an unexpected behavior in my opinion.
Video stream can get stuck in loading (spinner) state for a very long time under certain conditions. This seems to happen when running multiple streams simultaneously on the same page, and I assume this is bandwidth related (not sure).
In my case, I have 4 streams running on one page in parallel (10fps, 50 compression) over H264. On some clients this works fine, while on others only 1 stream works with the remaining 3 stuck in a spinner state. This page is meant for the user to choose 1 stream of the 4 provided. Once picked they are taken to the next page where the chosen stream is displayed on full FPS. Sometimes this is where the video never loads (or takes up to 5 mins to start).
Again, I assume this is bandwidth related.
In my opinion, either automatically, or via an optional parameter, video quality and/or FPS should be reduced when facing bandwidth issues (as seen for example on YouTube). It's probably always preferred to have all streams running, even if that means ignoring explicitly set quality/fps parameters.
To Reproduce
Steps to reproduce the behavior:
- Create a page with enough players until one or more streams never load.
Environment (please complete the following information):
- OS: Debian Jessie
- Browser Chrome 88
- MSP 4.4.0, MSL 9.2.0
I'm not sure I see this as a bug either. If you need advanced features you are probably better off using media-stream-library. The use case for this library is not really to run multiple streams at the same time, even though I made an example to showcase that.
I just ran my example again, with 4 simultaneous streams. No issues with loading them. H.264 @ 800x600.
@lekoaf Understandable. I still think an automatic quality adjustment would be interesting to look at. If it's possible, I might look at a solution.
Be my guest. Perhaps a piece of code like that should be optional. So that everyone using just one stream doesn't get affected by it.