Open matheuscamarques opened 3 years ago
Funcitonal code.
async function startCapture() {
if (activeStream % 2) {
connection.addStream({
screen: true,
audio: true,
oneway: true,
});
console.log(activeStream);
activeStream++;
} else {
connection.addStream({
audio: true,
video: true,
oneway: true,
});
console.log("Connection video", activeStream);
activeStream++;
}
}
var stream1 = {}
connection.onstream = function (event) {
if (stream1) {
stream1.stop();
stream1 = event.stream;
}
//connection code is here
stream1 = event.stream;
}
how to change the video for screen capture?