mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 19:24:12 +08:00
7bcd46b87d
This change makes use of service workers to determine if we should play chat sounds in the current browser tab. Since users can have multiple tabs open, we currently attempt to play sound across all active tabs. With this change we iterate over all clients and check if client.focused is true (ie. the current tab/window we have open), if so we allow playing the audio in the current tab and for all other hidden tabs/windows we return false. --------- Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com> |
||
---|---|---|
.. | ||
helpers | ||
lib | ||
models | ||
services | ||
utility |