mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Can stop streaming
This commit is contained in:
parent
74a05fbdde
commit
1de48a20a1
@ -212,6 +212,15 @@ class CallWindow extends CustomEvents {
|
||||
}
|
||||
},
|
||||
|
||||
// Stop streaming
|
||||
{
|
||||
icon: "fa-stop",
|
||||
text: "Stop streaming",
|
||||
onclick: () => {
|
||||
this.closeMainPeer()
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
//Add buttons
|
||||
@ -511,9 +520,11 @@ class CallWindow extends CustomEvents {
|
||||
const el = this.videoEls.get(peerID);
|
||||
this.videoEls.delete(peerID)
|
||||
|
||||
if(el) {
|
||||
el.pause()
|
||||
el.parentNode.remove()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a member connection
|
||||
@ -818,6 +829,9 @@ class CallWindow extends CustomEvents {
|
||||
this.mainStream.getTracks().forEach(e => e.stop())
|
||||
delete this.mainStream
|
||||
}
|
||||
|
||||
this.removeVideoElement(userID())
|
||||
this.refreshButtonsState()
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user