remove video on error, remove logging

This commit is contained in:
j 2021-10-23 15:18:30 +01:00
parent 8f15db7d81
commit 435b6965b7

View file

@ -22,13 +22,13 @@ document.querySelector('a#play-fullscreen').addEventListener('click', event => {
var video = document.createElement('video')
video.classList.add('player')
setVideoSrc(video, 'https://pad.ma/' + film.id + '/480p.webm')
console.log(video.src)
video.controls = true
document.querySelector('main').appendChild(video)
video.style.display = 'none'
function enterFullscreen(event) {
video.requestFullscreen().catch(err => {
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
video.remove()
});
video.removeEventListener('play', enterFullscreen);
setTimeout(() => {