diff --git a/static/js/grab-canvas.js b/static/js/grab-canvas.js index 6798604..6afac9c 100644 --- a/static/js/grab-canvas.js +++ b/static/js/grab-canvas.js @@ -46,11 +46,15 @@ throw new Error("Element don't habe video track") } - const AudioContext = window.AudioContext || window.webkitAudioContext; - if(AudioContext){ - const audioContext = new AudioContext(); - audioContext.createMediaStreamSource(canvasStream) - .connect(audioContext.destination) + try { + const AudioContext = window.AudioContext || window.webkitAudioContext; + if(AudioContext){ + const audioContext = new AudioContext(); + audioContext.createMediaStreamSource(canvasStream) + .connect(audioContext.destination) + } + } catch(e){ + console.warn(e) } const offer = await conn.createOffer();