Open bhavinshiroya1994 opened 6 years ago
Hi, i am also having the same problem, were you able to solve yours. Can you help me.
+1, has anyone figured out how to share a tab with the tab audio?
i have this problem
I have one solutions for this problem take a see code in my project
connection.onstream = async function (event) {
console.log(stream1);
if (stream1) {
stream1.stop();
stream1 = event.stream;
navigator.mediaDevices.getUserMedia({ audio: true }).then(function (mic) {
stream1.addTrack(mic.getTracks()[0]);
});
}
//connection code
stream1 = event.stream;
}
var activeStream = 1;
async function startCapture() {
if (activeStream % 2) {
connection.addStream({
audio: true,
screen: true,
oneway: true,
});
console.log(activeStream);
activeStream++;
} else {
connection.addStream({
audio: true,
video: true,
oneway: true,
});
console.log("Connection video", activeStream);
activeStream++;
}
}
how to add audio for screen-sharing? i am usign RTCMulticonnection v3.0 and i need one way screen sharing and two way audio. I try to get two-way audio with screen sharing as below in screen-sharing.html
connection.session = { audio:'two-way', //here i added screen: true, oneway: true }; connection.sdpConstraints.mandatory = { OfferToReceiveAudio:true, //here i change to true OfferToReceiveVideo: false };
but i cant get audio stream.i can share screen but no audio,what's wrong with me?any lead? best regards!