1

In Cms Block, I'm trying to add an embed Youtube video that would autoplay upon the page is loaded. However, the part that defines autoplay "?autoplay=1&loop=999999999999&playlist=_bkTXNozzzQ" in the url is trimmed off after saving the block. Is there any way I can make it happen? enter image description here

1

If you want to add in cms block try below example:

<iframe width="420" height="315" src="http://www.youtube.com/embed/
oHg5SJYRHA0?autoplay=1" frameborder="0"
allowfullscreen></iframe>
|improve this answer|||||
  • I see that when I save the block, the html code is rendered by magento and saved in database. So where can I put those code to make it work? – Long Jackson Dec 30 '19 at 6:59
  • On the CMS page in the admin, click the Show/Hide Editor button and paste the HTML there. The standard WYSIWYG will not render HTML. First embed the required URL (embed.ly works). Then, copy paste into the CMS page Html render using WYSIWYG. Or, use the show/hide editor option and paste the HTML. – Birjitsinh Zala Dec 30 '19 at 7:22
  • Thank you. I added Elements > HTML code instead of Media > Video and it works. – Long Jackson Dec 31 '19 at 2:15
0

Go to Stores->Configuration->Catalog->Product Video (where you entered the youtube API key). There should be a field called Autostart base video. Set that to Yes after cache clean and check.

|improve this answer|||||
  • Does it work whether this block is placed on the homepage? That's no product related. – Long Jackson Dec 30 '19 at 6:56

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.