mirror of
https://github.com/jech/galene.git
synced 2024-11-14 04:35:57 +01:00
Close camera on disconnect.
This commit is contained in:
parent
c540cad994
commit
0d2ca28ae1
1 changed files with 2 additions and 1 deletions
|
@ -333,6 +333,7 @@ function gotConnected() {
|
||||||
* @param {string} reason
|
* @param {string} reason
|
||||||
*/
|
*/
|
||||||
function gotClose(code, reason) {
|
function gotClose(code, reason) {
|
||||||
|
closeUpMedia();
|
||||||
setConnected(false);
|
setConnected(false);
|
||||||
if(code != 1000) {
|
if(code != 1000) {
|
||||||
console.warn('Socket close', code, reason);
|
console.warn('Socket close', code, reason);
|
||||||
|
@ -1461,7 +1462,7 @@ function stopStream(s) {
|
||||||
* closeUpMedia closes all up connections with the given label. If label
|
* closeUpMedia closes all up connections with the given label. If label
|
||||||
* is null, it closes all up connections.
|
* is null, it closes all up connections.
|
||||||
*
|
*
|
||||||
* @param {string} label
|
* @param {string} [label]
|
||||||
*/
|
*/
|
||||||
function closeUpMedia(label) {
|
function closeUpMedia(label) {
|
||||||
for(let id in serverConnection.up) {
|
for(let id in serverConnection.up) {
|
||||||
|
|
Loading…
Reference in a new issue