mirror of
https://github.com/jech/galene.git
synced 2024-11-26 18:45:57 +01:00
Mirror video in fullscreen.
This commit is contained in:
parent
50a3d8b855
commit
28394bbc05
1 changed files with 8 additions and 4 deletions
|
@ -1074,7 +1074,11 @@ async function setMedia(c, isUp, mirror, video) {
|
||||||
/** @ts-ignore */
|
/** @ts-ignore */
|
||||||
media.playsinline = true;
|
media.playsinline = true;
|
||||||
media.id = 'media-' + c.id;
|
media.id = 'media-' + c.id;
|
||||||
div.appendChild(media);
|
|
||||||
|
let mirrorDiv = document.createElement('div');
|
||||||
|
div.appendChild(mirrorDiv);
|
||||||
|
mirrorDiv.appendChild(media);
|
||||||
|
|
||||||
if(!video)
|
if(!video)
|
||||||
addCustomControls(media, div, c);
|
addCustomControls(media, div, c);
|
||||||
if(mirror)
|
if(mirror)
|
||||||
|
@ -1234,11 +1238,11 @@ function registerControlHandlers(media, container) {
|
||||||
fs.onclick = function(e) {
|
fs.onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(media.requestFullscreen) {
|
if(media.requestFullscreen) {
|
||||||
media.requestFullscreen();
|
media.parentNode.requestFullscreen();
|
||||||
/** @ts-ignore */
|
/** @ts-ignore */
|
||||||
} else if(media.webkitRequestFullscreen) {
|
} else if(media.parentNode.webkitRequestFullscreen) {
|
||||||
/** @ts-ignore */
|
/** @ts-ignore */
|
||||||
media.webkitRequestFullscreen();
|
media.parentNode.webkitRequestFullscreen();
|
||||||
} else {
|
} else {
|
||||||
displayWarning('Full screen not supported!');
|
displayWarning('Full screen not supported!');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue