feat: add screen share audio support
Pass audio: true to setScreenShareEnabled so the browser offers the "Share audio" checkbox. Track ScreenShareAudio from remote participants and play it through a dedicated audio element with the same volume pipeline (including boost >100%).
This commit is contained in:
@@ -96,7 +96,11 @@ export function VoiceControlBar() {
|
||||
const room = getActiveRoom();
|
||||
if (!room) return;
|
||||
try {
|
||||
await room.localParticipant.setScreenShareEnabled(!isScreenSharing);
|
||||
if (!isScreenSharing) {
|
||||
await room.localParticipant.setScreenShareEnabled(true, { audio: true });
|
||||
} else {
|
||||
await room.localParticipant.setScreenShareEnabled(false);
|
||||
}
|
||||
toggleScreenShare();
|
||||
} catch (err) {
|
||||
console.error('[VoiceControlBar] Failed to toggle screen share:', err);
|
||||
|
||||
Reference in New Issue
Block a user