mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Remove PIP button when not supported.
This commit is contained in:
parent
01192d69fc
commit
85df898101
1 changed files with 12 additions and 6 deletions
|
@ -1090,11 +1090,17 @@ function registerControlEvent(peerid) {
|
|||
}
|
||||
};
|
||||
|
||||
peer.querySelector("span.pip").onclick = function(event) {
|
||||
event.preventDefault();
|
||||
let video = getParentVideo(event.target);
|
||||
videoPIP(video);
|
||||
};
|
||||
let pip = /** @type {HTMLElement} */(peer.querySelector("span.pip"));
|
||||
/** @ts-ignore */
|
||||
if(HTMLVideoElement.prototype.requestPictureInPicture) {
|
||||
pip.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
let video = getParentVideo(event.target);
|
||||
videoPIP(video);
|
||||
};
|
||||
} else {
|
||||
pip.style.display = 'none';
|
||||
}
|
||||
|
||||
peer.querySelector("span.fullscreen").onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
@ -1106,7 +1112,7 @@ function registerControlEvent(peerid) {
|
|||
}
|
||||
};
|
||||
|
||||
let camera = peer.querySelector("span.camera");
|
||||
let camera = /** @type {HTMLElement} */(peer.querySelector("span.camera"));
|
||||
if(camera) {
|
||||
peer.querySelector("span.camera").onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue