mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +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');
|
||||
if(fs) {
|
||||
if(HTMLVideoElement.prototype.requestFullscreen) {
|
||||
if(HTMLVideoElement.prototype.requestFullscreen ||
|
||||
/** @ts-ignore */
|
||||
HTMLVideoElement.prototype.webkitRequestFullscreen) {
|
||||
fs.onclick = function(e) {
|
||||
e.preventDefault();
|
||||
if(media.requestFullscreen) {
|
||||
media.requestFullscreen();
|
||||
/** @ts-ignore */
|
||||
} else if(media.webkitRequestFullscreen) {
|
||||
/** @ts-ignore */
|
||||
media.webkitRequestFullscreen();
|
||||
} else {
|
||||
displayWarning('Full screen not supported!');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue