Fix multi video
This commit is contained in:
parent
89db8558f6
commit
575054fe4f
4 changed files with 65 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
|||
export class MediaManager {
|
||||
localStream: MediaStream;
|
||||
remoteStream: MediaStream;
|
||||
remoteVideo: any;
|
||||
remoteVideo: Array<any> = new Array<any>();
|
||||
myCamVideo: any;
|
||||
cinemaClose: any = null;
|
||||
cinema: any = null;
|
||||
|
@ -11,7 +11,6 @@ export class MediaManager {
|
|||
getCameraPromise : Promise<any> = null;
|
||||
|
||||
constructor() {
|
||||
this.remoteVideo = document.getElementById('activeCamVideo');
|
||||
this.myCamVideo = document.getElementById('myCamVideo');
|
||||
|
||||
this.microphoneClose = document.getElementById('microphone-close');
|
||||
|
@ -112,4 +111,15 @@ export class MediaManager {
|
|||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
addActiveVideo(userId : any){
|
||||
let elementRemoteVideo = document.getElementById("activeCam");
|
||||
elementRemoteVideo.insertAdjacentHTML('beforeend', '<video id="myCamVideo'+userId+'" autoplay></video>');
|
||||
|
||||
this.remoteVideo[userId] = document.getElementById('myCamVideo'+userId);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue