I am trying to share screen and send audio at the same time, I have managed to follow the instructions of Adam Ullman from this link Opentok Screen Sharing with Audio but the sound is quite bad , it is heard doubled and with very poor quality.
I have asked the technical support of tokbox and they tell me that another option is to use the same person with two publishers (one for screen and another to share audio). The problem is that when I do this or share a screen or share the camera + microphone, how can I make the other person see the shared screen and listen to me?
Another option I have is: is there any way to improve the sound of setusermedia? or avoid duplicating sound?
I have the following code:
screenSharingPublisher = Promise.all ([
OT.getUserMedia ({
videoSource: 'screen'
}),
OT.getUserMedia ({
videoSource: null
})
])
.then (([screenStream, micStream]) => {
return OT.initPublisher (null, {
videoSource: screenStream.getVideoTracks () [0],
audioSource: micStream.getAudioTracks () [0]
});
});
screenSharingPublisher.then (publisher => {
l.publish (publisher, handleErrorScreen);
}). catch (handleErrorScreen);
Thanks for your help