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
|
video.currentTime = continueTimecode
|
||||||
}
|
}
|
||||||
function enterFullscreen(event) {
|
function enterFullscreen(event) {
|
||||||
video.requestFullscreen().catch(err => {
|
if (video.webkitEnterFullScreen) {
|
||||||
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
video.webkitEnterFullScreen();
|
||||||
video.remove()
|
} else {
|
||||||
});
|
video.requestFullscreen().catch(err => {
|
||||||
|
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
||||||
|
video.remove()
|
||||||
|
});
|
||||||
|
}
|
||||||
video.removeEventListener('play', enterFullscreen);
|
video.removeEventListener('play', enterFullscreen);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
video.style.display = 'block'
|
video.style.display = 'block'
|
||||||
|
|
Loading…
Reference in a new issue