Add feature to mute or switch off cam
This commit is contained in:
parent
c48073b908
commit
fb255140e5
5 changed files with 41 additions and 71 deletions
|
@ -17,7 +17,9 @@ export class SimplePeer {
|
|||
constructor(Connexion: ConnexionInterface, WebRtcRoomId: string = "test-webrtc") {
|
||||
this.Connexion = Connexion;
|
||||
this.WebRtcRoomId = WebRtcRoomId;
|
||||
this.MediaManager = new MediaManager();
|
||||
this.MediaManager = new MediaManager((stream : MediaStream) => {
|
||||
this.updatedLocalStream();
|
||||
});
|
||||
this.PeerConnexionArray = new Array<any>();
|
||||
|
||||
this.initialise();
|
||||
|
@ -100,7 +102,7 @@ export class SimplePeer {
|
|||
{
|
||||
urls: 'turn:numb.viagenie.ca',
|
||||
username: 'g.parant@thecodingmachine.com',
|
||||
credential: 'Muzuvo$6'
|
||||
credential: 'itcugcOHxle9Acqi$'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -202,4 +204,10 @@ export class SimplePeer {
|
|||
console.error(`addMedia => addMedia => ${userId}`, e);
|
||||
}
|
||||
}
|
||||
|
||||
updatedLocalStream(){
|
||||
this.Users.forEach((user) => {
|
||||
this.addMedia(user.userId);
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue