pandora_render/edits/player.html

26 lines
811 B
HTML
Raw Normal View History

2024-04-18 09:17:30 +00:00
<body></body>
<script>
var mp4 = document.location.hash.substr(1)
var vtt = mp4.replace(/.mp4/, '.vtt')
var video = document.createElement('video')
video.src = mp4
video.controls = true
var track = document.createElement('track')
track.label = 'English'
track.kind = 'subtitles'
track.srclang = 'en'
track.default = true
track.src = vtt
video.appendChild(track)
document.body.appendChild(video)
document.body.style.background = 'black'
document.body.style.textAlign = 'center'
document.body.style.display = 'flex'
document.body.style.height = '100vh'
document.body.style.overflow = 'hidden'
document.body.style.margin = '0'
document.body.style.padding = '0'
video.style.width = '100%'
video.style.height = '100%'
</script>