Video not playing in Brooklyn Theme

Solved
Highlighted
Tourist
6 1 2

Hi, I've added a video to the homepage using a Custom HTML block and adding a <video> tag. The video loads but does not play. I've searched the forum and found similar issues with the Debut Theme. Have you found the same for the Brooklyn Theme? Current code looks like this - 

 

<video autoplay loop playsinline>
    <source src="webm file" type="video/webm">
</video>

 

Do you know what the issue could be? Thanks!

0 Likes
Shopify Expert
175 34 56

Can you please try this and replace source with your video 

<video autoplay loop playsinline>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>

Problem Solved? ✔️Accept the solution so you can help others.
* Email: fayyazraza@gmail.com * Skype: fayyaz_raza
1 Like

Success.

Tourist
6 1 2

SOLVED - if anyone has this issue, apparently many browsers can only autoplay the videos with sound off, so you'll need to add the "muted" attribute to the video tag, too.

 

via stack overflow

1 Like
Shopify Expert
175 34 56

Exactly, Here is list of attributes

 

Attribute Value Description

autoplayautoplaySpecifies that the video will start playing as soon as it is ready
controlscontrolsSpecifies that video controls should be displayed (such as a play/pause button etc).
heightpixelsSets the height of the video player
looploopSpecifies that the video will start over again, every time it is finished
mutedmutedSpecifies that the audio output of the video should be muted
posterURLSpecifies an image to be shown while the video is downloading, or until the user hits the play button
preloadauto
metadata
none
Specifies if and how the author thinks the video should be loaded when the page loads
srcURLSpecifies the URL of the video file
widthpixelsSets the width of the video player
Problem Solved? ✔️Accept the solution so you can help others.
* Email: fayyazraza@gmail.com * Skype: fayyaz_raza
1 Like