mirror of
https://github.com/jech/galene.git
synced 2024-11-26 10:35:59 +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) {
|
let pip = /** @type {HTMLElement} */(peer.querySelector("span.pip"));
|
||||||
|
/** @ts-ignore */
|
||||||
|
if(HTMLVideoElement.prototype.requestPictureInPicture) {
|
||||||
|
pip.onclick = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let video = getParentVideo(event.target);
|
let video = getParentVideo(event.target);
|
||||||
videoPIP(video);
|
videoPIP(video);
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
pip.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
peer.querySelector("span.fullscreen").onclick = function(event) {
|
peer.querySelector("span.fullscreen").onclick = function(event) {
|
||||||
event.preventDefault();
|
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) {
|
if(camera) {
|
||||||
peer.querySelector("span.camera").onclick = function(event) {
|
peer.querySelector("span.camera").onclick = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue