Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hey just wondering how can you embed videos in HTML code? Now I know that you can embed videos using Youtube but since YouTube provides recommended videos at the end, it feels distracting and removes the customer from looking through the product. Please respond as soon as you can with step by step instructions.
Hey, Wally!
Savannah here from the Shopify Guru Team. 🙂
Absolutely! You can use a code like this one to embed another video. Simply upload your video to the settings>files area of your admin and replace the link.mp4 bit with your own CDN link.
Let me know if that makes sense!
<video width="320" height="240" controls="controls">
<source src="link.mp4" type="video/mp4" />
<source src="movie.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>
Savannah | Shopify Guru
support@shopify.com
Savannah | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I have a whole page with 12 videos I want users to choose from. But when I add embed codes, they are autoplaying. How do I turn off autoplay?
Hi! I'm using this embed code for self-hosted videos and it works great! Only question I have - is there a way to add a thumbnail so it's not just a blank rectangle until the user clicks the video?
Hi,
Yes you can.
Using the poster attribute like I have below in your opening video tag you can pick a thumbnail for your video.
<video class="video-player hidden" id="5" autoplay="autoplay" controls preload="auto" width="640" height="264" poster="//cdn.shopify.com/s/files/1/0201/3347/8500/t/4/assets/ytthumb.jpg?13431113366972767101" data-setup="{}">
Just replace the piece inside the quotes after "poster" with the link to your thumbnail.
Could you please mark my answer as the correct solution please? Thank you.
It's letting me do that for some reason...
Hi Savannah,
Is there a way to remove the controls from the video once it has been uploaded?
Thanks,
Lamide
Hi Lamide,
Just leave out the controls tag from the code. So it would look something like this if you were working from Savannah's code.
<video width="320" height="240"> <source src="link.mp4" type="video/mp4" /> <source src="movie.ogg" type="video/ogg" />Your browser does not support the video tag.</video>
Hi so I have used this code to imbed a video in shogun, but I want to know how to make it responsive to any screen size.
If the cdn link is from an outer source, will it work?
Is it possible to make these videos responsive?
It depends on the app. What are you using to embed them?
If you're pasting HTML with a <video> "tag", you might see something like <video src="myvideo.mp4" autoplay ...> You can just delete the autoplay part.
But other sites that have embed codes have their own way of changing the setting.
Hey aceduck,
Yeah, usually you can embed from another CDN. Just take the original <video> example, but change the src to the full URL (including https://).
You can experiment with it on a new page, that way if it doesn't work, you can paste the URL here and someone can help you 🙂
Hey LincolnB, if you have a sample page link, it would help a lot!
Sometimes, you can make it responsive by simply adding style="max-width: 100%" inside of the video tag but it could depend a lot on your site, etc.
It might look something like:
<video ...bunch of settings... style="max-width: 100%">
...
</video>
Thank you! That worked like a charm!
@AndrewWalters wrote:Hey LincolnB, if you have a sample page link, it would help a lot!
Sometimes, you can make it responsive by simply adding style="max-width: 100%" inside of the video tag but it could depend a lot on your site, etc.
It might look something like:
<video ...bunch of settings... style="max-width: 100%">...
</video>
Wow, awesome, and good job! I was sure it'd take more back and forth to get it setup smoothly 🙂 Glad I could help!
Is there a way to remove the "download" option?
User | RANK |
---|---|
7 | |
4 | |
4 | |
3 | |
3 |