mirror of
https://github.com/jech/galene.git
synced 2024-11-12 19:55:59 +01:00
Make fullscreen work on Safari.
This commit is contained in:
parent
9bb2499b85
commit
b6a6165650
1 changed files with 7 additions and 1 deletions
|
@ -1195,11 +1195,17 @@ function registerControlHandlers(media, container) {
|
||||||
|
|
||||||
let fs = getVideoButton(container, 'fullscreen');
|
let fs = getVideoButton(container, 'fullscreen');
|
||||||
if(fs) {
|
if(fs) {
|
||||||
if(HTMLVideoElement.prototype.requestFullscreen) {
|
if(HTMLVideoElement.prototype.requestFullscreen ||
|
||||||
|
/** @ts-ignore */
|
||||||
|
HTMLVideoElement.prototype.webkitRequestFullscreen) {
|
||||||
fs.onclick = function(e) {
|
fs.onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(media.requestFullscreen) {
|
if(media.requestFullscreen) {
|
||||||
media.requestFullscreen();
|
media.requestFullscreen();
|
||||||
|
/** @ts-ignore */
|
||||||
|
} else if(media.webkitRequestFullscreen) {
|
||||||
|
/** @ts-ignore */
|
||||||
|
media.webkitRequestFullscreen();
|
||||||
} else {
|
} else {
|
||||||
displayWarning('Full screen not supported!');
|
displayWarning('Full screen not supported!');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue