safari is special
This commit is contained in:
parent
cd74ed455d
commit
0577adffb8
1 changed files with 8 additions and 4 deletions
|
@ -30,10 +30,14 @@ document.querySelector('a#play-fullscreen').addEventListener('click', event => {
|
|||
video.currentTime = continueTimecode
|
||||
}
|
||||
function enterFullscreen(event) {
|
||||
video.requestFullscreen().catch(err => {
|
||||
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
||||
video.remove()
|
||||
});
|
||||
if (video.webkitEnterFullScreen) {
|
||||
video.webkitEnterFullScreen();
|
||||
} else {
|
||||
video.requestFullscreen().catch(err => {
|
||||
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
||||
video.remove()
|
||||
});
|
||||
}
|
||||
video.removeEventListener('play', enterFullscreen);
|
||||
setTimeout(() => {
|
||||
video.style.display = 'block'
|
||||
|
|
Loading…
Reference in a new issue