discourse/plugins/chat/test/javascripts/unit
David Battersby 7bcd46b87d
DEV: use service worker for chat sound (#29388)
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>
2024-10-29 13:15:53 +04:00
..
helpers DEV: Clean up imports (#28060) 2024-07-25 15:09:06 +02:00
lib DEV: use service worker for chat sound (#29388) 2024-10-29 13:15:53 +04:00
models DEV: Fix random typos (#28891) 2024-09-12 23:25:34 +02:00
services DEV: Clean up imports (#28060) 2024-07-25 15:09:06 +02:00
utility DEV: Clean up imports (#28060) 2024-07-25 15:09:06 +02:00