mirror of
https://github.com/jech/galene.git
synced 2024-11-26 10:35:59 +01:00
do not listen on camera control button when it's not present
This commit is contained in:
parent
581d2439ab
commit
7cb73a501f
1 changed files with 19 additions and 16 deletions
|
@ -1092,22 +1092,25 @@ function registerControlEvent(peerid) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
peer.querySelector("span.camera").onclick = function(event) {
|
let camera = peer.querySelector("span.camera");
|
||||||
event.preventDefault();
|
if (camera) {
|
||||||
let video = getParentVideo(event.target);
|
peer.querySelector("span.camera").onclick = function(event) {
|
||||||
let id = video.id.split("-")[1];
|
event.preventDefault();
|
||||||
if (!settings.video)
|
let video = getParentVideo(event.target);
|
||||||
return;
|
let id = video.id.split("-")[1];
|
||||||
if (event.target.getAttribute("data-type") === "bt-camera") {
|
if (!settings.video)
|
||||||
addLocalMedia(id, true);
|
return;
|
||||||
event.target.setAttribute("data-type", "bt-camera-off");
|
if (event.target.getAttribute("data-type") === "bt-camera") {
|
||||||
event.target.parentElement.classList.add("disabled");
|
addLocalMedia(id, true);
|
||||||
} else {
|
event.target.setAttribute("data-type", "bt-camera-off");
|
||||||
event.target.setAttribute("data-type", "bt-camera");
|
event.target.parentElement.classList.add("disabled");
|
||||||
event.target.parentElement.classList.remove("disabled");
|
} else {
|
||||||
addLocalMedia(id);
|
event.target.setAttribute("data-type", "bt-camera");
|
||||||
}
|
event.target.parentElement.classList.remove("disabled");
|
||||||
};
|
addLocalMedia(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue