• Resolved bowlerhat

    (@bowlerhat)


    Hi,

    I’m trying to stop a video from autoplaying when the page is loaded. I need to use iframe tags because when I use <video> the video doesn’t autoplay, but isn’t responsive on mobile for some reason.
    I’ve tried a variety of possible fixes e.g. adding variations of autostart=”0″, autoplay=”0″, autoplay=false, autostart=false, using plugins but nothing seems to make it responsive and not autoplay at the same time.
    I’ve also tried using media queries when using video tags but those didn’t seem to do anything.

    Does anyone have any other ideas about how this could be fixed?

    Here is the code I am using now:

    <iframe src=”(video link)” controls=”controls” width=”425″ height=”250″ &autoStart=false></iframe>

Viewing 2 replies - 1 through 2 (of 2 total)
  • ikaring

    (@ikaring)

    Is that video a YouTube video or your self hosting one?
    Since iframe tag does not support autoplay attribute, your tag will not work.
    If you use autoplay=0, it should be like

    <iframe width="420" height="315"
    src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1">
    </iframe>

    http://www.w3schools.com/html/html_youtube.asp

    If you can stop autoplay with video tag, why not using it?
    You can make it responsive with css setting, I guess.

    Thread Starter bowlerhat

    (@bowlerhat)

    Thanks for the reply, I think the best course of action would probably be to upload the video to youtube as you said, as currently it’s being self hosted, which doesn’t look like it’s doing us any favours.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stopping autoplay on iframe videos’ is closed to new replies.