7 ms·
Yeah. From the docs: > pauseWhenHidden – whether to pause playback when the tab is inactive. Default true. Note that browsers usually throttle JS in inactive t
by stilldavid 10y ago
Yeah. From the docs:
> pauseWhenHidden – whether to pause playback when the tab is inactive. Default true. Note that browsers usually throttle JS in inactive tabs anyway.
- tyingq 10y agoSupposedly, Chrome doesn't throttle background tabs where audio is playing.
- koolba 10y agoJS hack idea! Play a silent sound to force Chrome to not throttle your page when it's not primary.
- nix0n 10y agoPlease don't. Also, Chrome puts a little speaker icon on the tab, so users might notice.
- recursive 10y agoIn the long run, the probability of this being exploited is approximately 100%. I'm surprised they left in such an obvious loophole.
- daurnimator 10y agoI'm not sure how usurping this is an 'exploit'. It's used as a heuristic to save battery life. and if you're trying to run down a user's battery I can think of better ways.
- Ezhik 10y agoNeed to do some more testing, but I have suspicions that Chrome actually doesn't put the sound icon on the tab if it's playing silent audio.
- koolba 10y agoThrow in an inaudible frequency once per second at a low volume. I doubt they're doing signal processing to decide if a human can actually hear the output.