Fix webrtc multi

This commit is contained in:
gparant 2020-05-02 20:46:02 +02:00
parent aff77fe074
commit fdb40ec3e2
6 changed files with 195 additions and 117 deletions

View file

@ -6,7 +6,7 @@ export class MediaManager {
cinema: any = null;
microphoneClose: any = null;
microphone: any = null;
constraintsMedia = {audio: false, video: true};
constraintsMedia = {audio: true, video: true};
getCameraPromise : Promise<any> = null;
constructor() {
@ -37,9 +37,6 @@ export class MediaManager {
this.disabledCamera();
//update tracking
});
this.enabledCamera();
this.enabledMicrophone();
}
activeVisio(){
@ -127,6 +124,15 @@ export class MediaManager {
this.remoteVideo[(userId as any)] = document.getElementById(userId);
}
/**
*
* @param userId
* @param stream
*/
addStreamRemoteVideo(userId : string, stream : MediaStream){
this.remoteVideo[(userId as any)].srcObject = stream;
}
/**
*
* @param userId