.
This commit is contained in:
@@ -9,11 +9,11 @@ export function WebRTCConnectionManager() {
|
||||
const voiceState = useVoiceStateStore();
|
||||
const webrtc = useWebRTCStore();
|
||||
|
||||
const remoteStream = useWebRTCStore(state => state.remoteStream);
|
||||
const audioRef = useRef<HTMLAudioElement>(null)
|
||||
const remoteStream = useWebRTCStore((state) => state.remoteStream);
|
||||
const audioRef = useRef<HTMLAudioElement>(null);
|
||||
|
||||
if (audioRef.current) {
|
||||
audioRef.current.srcObject = remoteStream
|
||||
audioRef.current.srcObject = remoteStream;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -25,7 +25,7 @@ export function WebRTCConnectionManager() {
|
||||
audio: {
|
||||
noiseSuppression: false,
|
||||
},
|
||||
video: false
|
||||
video: false,
|
||||
});
|
||||
|
||||
webrtc.createOffer(stream);
|
||||
@@ -41,7 +41,6 @@ export function WebRTCConnectionManager() {
|
||||
if (webrtc.status === ConnectionState.DISCONNECTED) {
|
||||
voiceState.leaveVoiceChannel();
|
||||
}
|
||||
|
||||
}, [webrtc.status]);
|
||||
|
||||
return (
|
||||
@@ -49,4 +48,4 @@ export function WebRTCConnectionManager() {
|
||||
<audio autoPlay ref={audioRef} className="hidden" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user