fix play button
This commit is contained in:
parent
6ed4aa02d8
commit
5bad648fe0
1 changed files with 5 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
|||
var videoExtension
|
||||
|
||||
function setVideoSrc(video, src) {
|
||||
var ext
|
||||
if (!videoExtension) {
|
||||
|
@ -15,9 +17,12 @@ function setVideoSrc(video, src) {
|
|||
}
|
||||
|
||||
document.querySelector('a#play-fullscreen').addEventListener('click', event => {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
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'
|
||||
|
@ -48,7 +53,4 @@ document.querySelector('a#play-fullscreen').addEventListener('click', event => {
|
|||
}
|
||||
});
|
||||
video.play()
|
||||
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue