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