How do I play a local video file? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How do I play a local video file?

I have an offline website featuring videos I've made, and I've got the design finished, with video thumbnails featured on the home page. I want to make the thumbnails clickable, so that I can click on each one and have the video play off the local drive. Is that something I can do using HTML5, or do I need to write something in JS?

14th Mar 2019, 8:09 PM
Leo
Leo - avatar
3 Respostas
+ 4
//HTML5 do video playing part but as uou mentioned onclicking thumbnail start to play video you need some works with javascript too
14th Mar 2019, 8:47 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
Thank you, Shudarshan. I'm quite new to all of this, so JS in particular is a bit beyond my reach right now, although I'm working through it. Do you have a suggestion for how I would go about doing this? Even if I don't fully understand it, it could help to get me more familiar with things.
14th Mar 2019, 10:48 PM
Leo
Leo - avatar
0
In the end, I just created a second web page with the <video controls> attribute, and then linked my index page to that web page. It pretty much accomplished what I desired.
15th Mar 2019, 10:00 PM
Leo
Leo - avatar