phoboslab / jsmpeg

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

pauseWhenHidden not working #402

Open ghost opened 2 years ago

ghost commented 2 years ago

No matter if i put pauseWhenHidden true or false the audio stops nevertheless when i switch tabs

shnarobe commented 5 months ago

Yes, I experienced the same issue. According to the documentation: "pauseWhenHidden – whether to pause playback when the tab is inactive. Default true. Note that browsers usually throttle JS in inactive tabs anyway.", but it doesn't work. The audio/video stops regardless of the value of 'pauseWhenHidden'.

phoboslab commented 5 months ago

The audio/video stops regardless of the value of 'pauseWhenHidden'.

Yes, because

browsers usually throttle JS in inactive tabs anyway

Afaik there's the nothing we can do about this.

shnarobe commented 5 months ago

Thank you very much for responding!