Hello, I have come a long way in my app using Ant media server but have been stuck on this issue for about 8 days now. In my app, only one peer will handle all the video and audio for all the peers.. One main Source.
I get no sound on the peer, and a very nasty echo (I am listening and monitoring on same computer)
Basically please tell me the correct way to have 1 Main Audio Stream, and peers connect and disconnect from it (which will eventually have a mixer and gain controls via web audio api)
Create a video stream from a Video, but it does not have an audio stream yet..
createMedaStreamDestination as the audio stream for the video stream above.
Add MediaStreamDestination track from #2 to Video Stream from #1
InitWebRTCAdaptor with Video & Audio Streams above
GetUserMedia - Connect audio stream to MediaStreamDestination
var AudioContext = window.AudioContext || window.webkitAudioContext;
var Context = new AudioContext();
var MasterAudioStream = Context.createMediaStreamDestination();
var MasterAudioVideoStream = document.getElementById("theVideo").srcObject; // does not have an audio stream
Question
Tim Davis
Hello, I have come a long way in my app using Ant media server but have been stuck on this issue for about 8 days now. In my app, only one peer will handle all the video and audio for all the peers.. One main Source.
I get no sound on the peer, and a very nasty echo (I am listening and monitoring on same computer)
Basically please tell me the correct way to have 1 Main Audio Stream, and peers connect and disconnect from it (which will eventually have a mixer and gain controls via web audio api)
var Context = new AudioContext();
var MasterAudioStream = Context.createMediaStreamDestination();
var MasterAudioVideoStream = document.getElementById("theVideo").srcObject; // does not have an audio stream
MasterAudioVideoStream.addTrack(MasterAudioStream.stream.getAudioTracks()[0]);
// Get ECHOS at this Point
initWebRTCAdaptor(MasterAudioVideoStream);
navigator.mediaDevices.getUserMedia({
video: true, audio: true
})
.then(function (UserAudioVideoStream) {
var streamSourceNode = Context.createMediaStreamSource(UserAudioVideoStream);
streamSourceNode.connect(MasterAudioStream);
}
Link to comment
Share on other sites
Top Posters For This Question
2
1
1
Popular Days
Nov 19
2
Nov 18
1
Nov 20
1
Top Posters For This Question
Tahir 2 posts
Tim Davis 1 post
Mohamed Kamil Mansor 1 post
Popular Days
Nov 19 2020
2 posts
Nov 18 2020
1 post
Nov 20 2020
1 post
3 answers to this question
Recommended Posts