diff --git a/webapp/components/device.tsx b/webapp/components/device.tsx index 8ffc4ce..993bc61 100644 --- a/webapp/components/device.tsx +++ b/webapp/components/device.tsx @@ -96,7 +96,7 @@ export default function DeviceBar(props: { streamId: string }) { if (currentDeviceSpeaker === deviceNone.deviceId) { const device = speakers[0] if (device) setCurrentDeviceSpeaker(device.deviceId) - } + } if (currentDeviceAudio === deviceNone.deviceId) { const device = audios[0] diff --git a/webapp/components/player/player.tsx b/webapp/components/player/player.tsx index 8df97ee..7485782 100644 --- a/webapp/components/player/player.tsx +++ b/webapp/components/player/player.tsx @@ -48,10 +48,10 @@ export default function Player(props: { stream: MediaStream, muted: boolean, aud if (audioTrack && props.audio) { const el = document.createElement('audio') el.srcObject = new MediaStream([audioTrack]) - + if (el.setSinkId) { - el.setSinkId(currentDeviceSpeaker) - } + el.setSinkId(currentDeviceSpeaker) + } el.play() return () => { diff --git a/webapp/components/svg/speaker.tsx b/webapp/components/svg/speaker.tsx index 34edb7a..b969f4f 100644 --- a/webapp/components/svg/speaker.tsx +++ b/webapp/components/svg/speaker.tsx @@ -4,5 +4,4 @@ export default function SvgSpeaker() { ) -} - \ No newline at end of file +} \ No newline at end of file