discourse/plugins/chat/test/javascripts
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
..
acceptance DEV: Update more asserts to qunit-dom (#29326) 2024-10-22 11:34:23 +02:00
components DEV: Upgrade Uppy to v4 (#29397) 2024-10-28 14:01:44 +00:00
helpers FEATURE: implements drafts for threads (#24483) 2023-11-22 11:54:23 +01:00
integration/components/user-menu DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
unit DEV: use service worker for chat sound (#29388) 2024-10-29 13:15:53 +04:00
chat-fixtures.js DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00