Media stream
This commit is contained in:
parent
980d6822d0
commit
d5c8fcd055
@ -46,14 +46,11 @@
|
|||||||
throw new Error("Element don't habe video track")
|
throw new Error("Element don't habe video track")
|
||||||
}
|
}
|
||||||
|
|
||||||
const canvasAudioTracks = canvasStream.getAudioTracks()
|
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||||
if(canvasAudioTracks.length > 0){
|
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.createMediaStreamTrackSource(canvasAudioTracks[0])
|
|
||||||
.connect(audioContext.destination)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const offer = await conn.createOffer();
|
const offer = await conn.createOffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user