phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.3k stars 1.43k forks source link

Hidden Tabs: Video Slow Down then Tries Catching Up #361

Open brandonbuttars opened 3 years ago

brandonbuttars commented 3 years ago

As I understand, Chrome throttles the video on hidden tabs. When it does it, the video slows down and gets out of sync with reality. When coming back to the tab the video is seconds, sometimes minutes behind depending on how long it was hidden. The video then tries to catch up by playing things twice as fast until it catches up. I would like to to immediately catch up. Does anyone have any suggestions on how to overcome this? My only solution is to just run a location.reload() but I'd like to not have to do that.

I've tried using pauseWhenHidden which it doesn't appear to help at all. Any suggestions would be appreciated. I'm streaming from a live camera for drone surveillance and need to know what is happening real time.

milankragujevic commented 3 years ago

I have the same issue.

rluckez commented 1 year ago

Anyone know how to fix that? I'am facing the same issue