Closed aliaaaaaaaaa closed 1 year ago
const localVideo = document.getElementById("local-video");
const serverUrl = "wss://test.ir/sfu-ws";
const signalLocal = new IonSFUJSONRPCSignal(serverUrl)
this.clientLocal = new Client(signalLocal);
let clientLocal = this.clientLocal
signalLocal.onopen = () => {
clientLocal.join("test 1")
console.log("test")
};
const streams = {};
let constraints;
LocalStream.getDisplayMedia(constraints = {
codec: 'vp8',
resolution: 'hd',
audio: true,
video: true,
simulcast: false,
})
.then((media) => {
this.stream = media;
localVideo.srcObject = media;
localVideo.autoplay = true;
localVideo.controls = true;
localVideo.muted = true;
clientLocal.publish(media);
})
.catch(console.error);
this is code i use for screen sharing but it not working can you tell me why?
LocalStream.getDisplayMedia({ codec: 'vp8', resolution: 'hd', audio: true, video: true, simulcast: false, })
try that you don't need that constraints =
how we can sreeen share to other peer