0 votes
asked ago by (710 points)
edited ago by
    <video controls autoplay loop>
        <source src="pics/example 1/example 1.mp4" type="video/mp4">

The general commands like loop and show controls work except autoplay, I do not know if this can be a browser problem (I use chrome) or if this is a mistake of mine.

1 Answer

0 votes
answered ago by (137k points)
selected ago by
Best answer

Many modern web-browsers, especially those used on mobile devices, now require the user to interact with the current page before the autoplaying of media will work. This restriction was introduced mainly to stop malicious web-sites forcing the downloading & playing of large & unwanted media content.

So if you are trying to autoplay that video on the first Passage of your project then this may be the reason it isn't working. The solution in this case is to make the first Passage informational (welcome, credits, summary, etc..) instead and move the actual start to the second Passage.of your project (linked to from the first). This way the user will have interacted with the page at least once.

I also noted that you have space characters in the folder and file names of the video file, this is generally not a good idea when dealing with web based technologise. I suggest replacing those space characters with either an standard dash (minus sign) character or an underscore.


... also most operating systems (other than Windows) are case sensitive when it comes to the letters in folder and file names so make sure you keep using a single letter case (generally all lower) like you currently are.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.