Web visio, add and remove video element
This commit is contained in:
parent
e178712457
commit
d7d7be9ed0
4 changed files with 56 additions and 37 deletions
|
@ -116,10 +116,22 @@ export class MediaManager {
|
|||
*
|
||||
* @param userId
|
||||
*/
|
||||
addActiveVideo(userId : any){
|
||||
addActiveVideo(userId : string){
|
||||
let elementRemoteVideo = document.getElementById("activeCam");
|
||||
elementRemoteVideo.insertAdjacentHTML('beforeend', '<video id="'+userId+'" autoplay></video>');
|
||||
|
||||
this.remoteVideo[userId] = document.getElementById(userId);
|
||||
this.remoteVideo[(userId as any)] = document.getElementById(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
removeActiveVideo(userId : string){
|
||||
let element = document.getElementById(userId);
|
||||
if(!element){
|
||||
return;
|
||||
}
|
||||
element.remove();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue