remove video on error, remove logging
This commit is contained in:
parent
8f15db7d81
commit
435b6965b7
1 changed files with 1 additions and 1 deletions
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in a new issue