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:
@@ -89,12 +89,19 @@ export function DmCallView() {
|
||||
toggleCamera();
|
||||
};
|
||||
|
||||
const handleScreenShare = () => {
|
||||
const handleScreenShare = async () => {
|
||||
const room = getActiveRoom();
|
||||
if (room) {
|
||||
room.localParticipant.setScreenShareEnabled(!isScreenSharing);
|
||||
if (!room) return;
|
||||
try {
|
||||
if (!isScreenSharing) {
|
||||
await room.localParticipant.setScreenShareEnabled(true, { audio: true });
|
||||
} else {
|
||||
await room.localParticipant.setScreenShareEnabled(false);
|
||||
}
|
||||
toggleScreenShare();
|
||||
} catch (err) {
|
||||
console.error('[DmCallView] Failed to toggle screen share:', err);
|
||||
}
|
||||
toggleScreenShare();
|
||||
};
|
||||
|
||||
const handleEndCall = () => {
|
||||
|
||||
Reference in New Issue
Block a user