1

Programs:Opencart 2.3.0.2, journal 2.

Hello, I have a youtube clip on a banner that I have placed on my websides Home-menu. I want this clip to start playing as soon as someone opens the webpage. I know that to make a youtube clip play automatically on a productpage you change the autoplay variable from 0 to 1, but I can not find a corresponding autoplay variable for the clip on my banner.

Any solutions out here from someone more experienced than me?

Thanks in advance!

Edit: I am not using HTML5 or Vimeo, I have copied the Url directly from Youtube.

  • 1
    You are using HTML5 whether you think you are or not. – Rob May 14 '19 at 12:40
1

You can pass the variable in your YouTube Link this way:

http://www.youtube.com/embed/VideoIDhere?autoplay=1&mute=1

Don't forget the mute=1 argument for the 2018 Autoplay Policy Changes as described on this answer.

|improve this answer|||||
  • Is that when you use HTML5, I am currently using a Url from Youtube? – Moonprogram May 14 '19 at 9:37
  • It shall work on any link provided by YouTube, just add the " ?autoplay=1 " at the end of your link. – gael May 14 '19 at 9:47
  • It does not seem to work. my youtube link looks like this: youtube.com/watch?v=T..... – Moonprogram May 15 '19 at 13:22
  • Sorry, then it will also depend on the way Open Cart transform your Link to be embeded. If you look at the source code of your page you should find your video with the embed link. – gael May 16 '19 at 13:15
-1

Just put "?autoplay=1" in the url the video will autoload

|improve this answer|||||
  • 1
    This doesn't say anything the other answer doesn't say. The other answer says that just autoplay=1 isn't sufficient. mute=1 also need sot be there because of new rules made in 2018. It is possible that you are trying to say that things have changed again and that the mute is no longer needed, if so you should say so and link to a reference. Otherwise your answer is redundant and unclear. – Stephen Ostermiller Nov 26 '19 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.