Youtube video won't play on homepage

tim1123
New Member
2 0 0

Hi. We are brand new to Shopify and don't have any experience with writing code at all.  I added a YouTube video to my home page 2 days ago and it worked fine.  Now, the play button is spinning and the video won't play.  Any ideas as to why?  Thanks!

0 Likes
danstoj
Excursionist
16 0 16

If you are using the Debut theme, it is a known issue. Contact Shopify support and they will help you out. I just did and they fixed it for me. 

EmilioDev
Tourist
3 0 0

Any idea what they did to make it work. They said they couldn't help me because im in the partner program

0 Likes
danstoj
Excursionist
16 0 16

No sorry, I asked but they could only fix it for me. It was something to do with the YouTube API. It is a known issue. 

0 Likes
tim1123
New Member
2 0 0

Thank you.  I am having difficulty even contacting Shopify support.  When I click on the 24/7 support, nothing happens.  Any suggestions?

0 Likes
danstoj
Excursionist
16 0 16

They showed me what they did. Hope it helps!

 

In theme.js

 

Add:

function getVideoOptions(evt) {
    var $target = evt.target.a ? evt.target.a : evt.target.f;
    return videos[$target.id];
  }

Remove (or comment out using "//"):

function getVideoOptions(evt) {
      return videos[evt.target.a.id];
    }
EmilioDev
Tourist
3 0 0

You are saint! This worked perfectly thanks for your help

0 Likes
danstoj
Excursionist
16 0 16

No problem. Glad it worked!

natalia7
New Member
1 0 0

Hi, my video used to play fine, but all over sudden stopped (not loading). I tried finding theme.js to implement your suggestion, but can't find it. Can you please let me know how to find theme.js

Thanks!

0 Likes
EmilioDev
Tourist
3 0 0
in your dashboard click customize theme. To the left of the customize
button there is a dropdown menu thats says action. click action and select
edit code
0 Likes