Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How do I insert movie? Absolute path to local folder

I need to add a mp4 file. How do I do this? This is what I wrote:
<source src="Video/Dig 1 mp4.mp4" type="video/mp4">

But it isn't working. It shows up blank, although that is the path to the video I want.

Comments

  • Are you testing it in your twine editor or are you exporting it out to an HTML file and testing it from that?
  • edited August 2016
    That is assuming that your actual HTML looks at least something like the following:
    <video>
    <source src="Video/Dig 1 mp4.mp4" type="video/mp4">
    </video>
    

    note: I would strongly suggest replacing the space characters in your mp4 file name with either underscores or minus signs, because you can run into issues with spaces. It is also a good idea not to use mix-casing in folder and path names because some operating systems are case-sensitive.
    <video>
    <source src="video/dig-1-mp4.mp4" type="video/mp4">
    </video>
    
    <video>
    <source src="video/dig_1_mp4.mp4" type="video/mp4">
    </video>
    
  • I'm testing it online
  • @greyelf I actually just tried the code, it worked but my video is appear as a still image. Is there a way to get it to auto-play?
  • You want the autoplay attribute. For example:
    <video autoplay>
    <source src="video/dig-1-mp4.mp4" type="video/mp4">
    Apologies.  Your browser does not support this video.
    </video>
    
Sign In or Register to comment.