Web Audio Proxy (Think like putting in Airpods, you will be opening the Proxy, and it takes over all audio) https://joinlockerroom.com/broadcast
Separate from joinlockerroom.com/room/{roomId}, which can be used to view a room's speakers and listen
Engineering Goals:
- Enable professional broadcasters to use their desktop recording equipment
- No WebSocket connection to web client
- Low development overhead, minimize custom messages for Web App that won't be used by client
Web Client:
- Authenticate (store session)
- When Proxy is loaded, check if user is a speaker in a room 2a) if not a speaker, tell user to refresh when they are a speaker 2b) if a speaker, show audio controls and connect to Agora (Proxy will hear all audio, and allow broadcasting audio)
- Need a button to close Proxy
iOS Client:
- If Audio Proxy connects, chat-service will emit a message to user
- When client receives message, client will Lock Mute button, and tell user they are muted because Audio Proxy has taken over microphone (maybe instead of a mute badge on self, it could be a red computer icon)
- Client will also silence the agora channel, user will not be able to hear anything on phone
- If client receives message that proxy was closed, then Agora channel will be re-opened, broadcasting enabled, and mute button can be toggled again
Server:
- Needs to send messages to client, for proxy connecting/disconnecting
- Needs to be able to receive mute state from web client via REST endpoint (so other users can see if broadcaster is muted)
Test case considerations:
- Closing the Audio Proxy tab on accident
- Room closes
- Speaker is demoted