mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
fixing state when cant connect to media
This commit is contained in:
parent
00f4769505
commit
d6b642d6a2
@ -323,6 +323,7 @@ export function useRingContext() {
|
||||
videoTrack.current = false;
|
||||
audioTrack.current = false;
|
||||
accessVideo.current = false;
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({
|
||||
video: false,
|
||||
audio: true,
|
||||
@ -338,6 +339,10 @@ export function useRingContext() {
|
||||
}
|
||||
pc.current.addTrack(track);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
const protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
|
||||
ws.current = createWebsocket(`${protocol}${window.location.host}/signal`);
|
||||
|
Loading…
Reference in New Issue
Block a user