Fix Firefox WebRTC support

This commit is contained in:
Nick Mowen 2022-12-22 07:21:59 -07:00
parent d999575832
commit 6b0df120c6

View File

@ -19,7 +19,7 @@ export default function WebRtcPlayer({ camera, width, height }) {
const msg = JSON.parse(ev.data); const msg = JSON.parse(ev.data);
if (msg.type === 'webrtc/candidate') { if (msg.type === 'webrtc/candidate') {
pc.addIceCandidate({ candidate: msg.value, sdpMid: '' }); pc.addIceCandidate({ candidate: msg.value, sdpMid: '0' });
} else if (msg.type === 'webrtc/answer') { } else if (msg.type === 'webrtc/answer') {
pc.setRemoteDescription({ type: 'answer', sdp: msg.value }); pc.setRemoteDescription({ type: 'answer', sdp: msg.value });
} }