Skip to content

Commit

Permalink
Fixed an alert that did not allow trailing Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzqyyds committed Nov 21, 2024
1 parent b8b99a5 commit a835815
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion webapp/components/device.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions webapp/components/player/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
3 changes: 1 addition & 2 deletions webapp/components/svg/speaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export default function SvgSpeaker() {
<path fill="currentColor" d="M4 7h4l5-5v20l-5-5H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2zm11.54 3.88l1.41-1.41c1.78 1.78 1.78 4.66 0 6.44l-1.41-1.41c1.17-1.17 1.17-3.07 0-4.24zm2.83-2.83l1.41-1.41c3.12 3.12 3.12 8.19 0 11.31l-1.41-1.41c2.34-2.34 2.34-6.13 0-8.49z"></path>
</svg>
)
}

}

0 comments on commit a835815

Please sign in to comment.