Handle error on audio dispatching
This commit is contained in:
parent
d5c8fcd055
commit
e5b57dd3d7
@ -46,12 +46,16 @@
|
|||||||
throw new Error("Element don't habe video track")
|
throw new Error("Element don't habe video track")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||||
if(AudioContext){
|
if(AudioContext){
|
||||||
const audioContext = new AudioContext();
|
const audioContext = new AudioContext();
|
||||||
audioContext.createMediaStreamSource(canvasStream)
|
audioContext.createMediaStreamSource(canvasStream)
|
||||||
.connect(audioContext.destination)
|
.connect(audioContext.destination)
|
||||||
}
|
}
|
||||||
|
} catch(e){
|
||||||
|
console.warn(e)
|
||||||
|
}
|
||||||
|
|
||||||
const offer = await conn.createOffer();
|
const offer = await conn.createOffer();
|
||||||
await conn.setLocalDescription(offer);
|
await conn.setLocalDescription(offer);
|
||||||
|
Loading…
Reference in New Issue
Block a user