We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Why is my homepage video constantly loading on debut theme?

Why is my homepage video constantly loading on debut theme?

Pathway_Sucess
Visitor
3 0 2

 I'm trying to insert this video into the homepage of the debut theme.The video is forever loading and the play button doesn't work. How can I fix this?

 

https://www.youtube.com/watch?v=p7DjwxFcUdA

 

Heres the link to my store:

https://simplywooden.myshopify.com/

Replies 161 (161)

Visely-Team
Shopify Partner
1843 210 488

Hey there,

 

The reasons is a javascript error that happens during video loading. Make a copy of your currently live theme, locate your theme.js.liquid file and find a snippet similar to this one:

  function getVideoOptions(evt) {
    return videos[evt.target.h.id];
  }

adjust it to read:

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

notice the exchange of .h. with .a.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
MaximS
Excursionist
43 0 11

This fix isn't working, I am unable to save the file after making the change.  See attached.  Any thoughts?  

 

Screenshot 2019-05-10 at 10.34.49.png

marciamax
Tourist
5 0 0

This worked like a charm! Thank you so much! 

digitalmirrors
Visitor
2 0 1

I'm having the same problem.

 

I checked theme.js, but it already has
return videos[evt.target.a.id];
 Any idea on how to fix this?
Ababusa
Excursionist
21 0 11

I check the js file and cant even find

return videos[evt.target.a.id];

Video not loading up for me 

Visely-Team
Shopify Partner
1843 210 488

@Ababusa @digitalmirrors share your store's URL so I can take a look, it might not be related.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Ababusa
Excursionist
21 0 11

I'm terribly sorry, I should have returned once I figured out my fix, kind of simple and actually embarrassed I didn't pick up on it

For anyone else having this issue please do firstly check the video you're using is at least accessible by using a shareable link

Rookie mistake I know

Agail
Tourist
6 0 3

@Visely-Team wrote:

@Ababusa @digitalmirrors share your store's URL so I can take a look, it might not be related.


Can you take a look at mine too ?

Visely-Team
Shopify Partner
1843 210 488

@Agail please share a preview URL.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Agail
Tourist
6 0 3

Hi Visley,

 

This is my link : agail-air.myshopify.com

Please help

Agail
Tourist
6 0 3

@Visely-Team wrote:

@Agail please share a preview URL.


Hi Visley 

 

The following is the preview link

 

https://2dqybtl1wm4rzsij-36715790381.shopifypreview.com

Visely-Team
Shopify Partner
1843 210 488

@Agail in your theme.js find the following snippet:

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

and adjust it to read:

  function getVideoOptions(evt) {
    return videos[evt.target.l.id];
  }
Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Visely-Team
Shopify Partner
1843 210 488

@EXLNCE please see my reply to @Agail  above. You should do the same.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
cprtrakr
Visitor
3 0 0

I am having the same problem many people are having.   My video is not playing and tried changing the one letter to "l" and still not working.  My defaultis..

 

function getVideoOptions(evt) {
return videos[evt.target.a.id];

 

Can you help?

TwentySomething
Tourist
3 0 0

Are you able to adjust mine as well? My stores URL is TwentySomethingsCloset.com 

Agail
Tourist
6 0 3

Thank you very much, works like a charm now

EXLNCE
Visitor
2 0 0

It works now! Thanks!

SankarN
Visitor
2 0 6

Hi, I had this issue about a year ago and your initial solution of changing the "H" to "A" worked. The problem returned except changing the "A" to "L" results in a playback error. Any ideas?

Visely-Team
Shopify Partner
1843 210 488

@SankarN what's your store URL?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
SankarN
Visitor
2 0 6

Thank you for your prompt response.

 

Someone helped me solve the problem.

 

Changed [evt.target.a.id] to [evt.target.g.g.id] and it worked for anyone else having the issue

oralf
Visitor
2 0 3

"g.g."     Thanks!

FlyNovaBE
Tourist
3 0 0

Thank you for taking the time to write this down. It helps alot.

franksuarez
Visitor
1 0 0

This works on my end. Thanks!

cprtrakr
Visitor
3 0 0
I solved the problem. Thank you.
Sistasaidso
Visitor
1 0 0

This worked for me too. Thanks SankarN.

ACNT47
Visitor
1 0 0

Yay thank you, I used the [evt.target.g.g.id] and it worked amazingly.

 

I was using a link from youtube that was on public and it wasn't working until i tried this code. 

Much appreciated!

Clawbak
Tourist
3 0 7

 

return videos[evt.target.h.id];
return videos[evt.target.a.id];
return videos[evt.target.l.id];
return videos[evt.target.g.g.id];
The very last one worked for me.  Thank you!!!!

 

foundonthemoon
Visitor
3 0 0

hi my stores doing the same i found the section and ive changed the code from .a to .l and still no fix for me 

oralf
Visitor
2 0 3
I changed mine to "g.g." and it worked out!
sublimajewelry
Tourist
3 0 0

Changing the code from "l" to "g.g" (see red text below) worked for me: 

function getVideoOptions(evt) {
return videos[evt.target.l.id];

to

function getVideoOptions(evt) {
return videos[evt.target.g.g.id];

Though I had changed the code from "a" to "l" a few weeks ago, and that worked then... A bit frustrating that the video was broken again and that there was another fix that had to be made so soon after.

Visely-Team
Shopify Partner
1843 210 488

@sublimajewelry true, it is frustrating. I am providing this simple fix so it can be easily done by anybody, no matter the skillset and familiarity with coding.

Here is a better fix for Brooklyn theme that shouldn't break with updates to the theme:

 function getVideoOptions(evt) {
    var id = evt.target.getIframe().id;
    return videos[id];
  }
Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
sublimajewelry
Tourist
3 0 0

Hi @Visely-Team - Thank you for responding! I use the Debut theme - is it the same code for that, too? Thank you!

Visely-Team
Shopify Partner
1843 210 488

@sublimajewelry the exact same code snippet would apply to Debut theme.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Visely-Team
Shopify Partner
1843 210 488

@foundonthemoon what's your store URL?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Tlrobinson
Visitor
2 0 0

My url is www.royaltyHolistics.com I’ve tried changing to .a, .l, and g.g neither works 

Razi
Excursionist
13 0 9

Visely helped me with this and it worked

Looks like the theme got updated. Change it to:

var $target=evt.target.h;
fontaine
Tourist
7 0 0

Hi! Could you look at my website and see if you can identify why my homepage video is not loading? Much appreciated! https://bluequail.com/

Razi
Excursionist
13 0 9

var $target = evt.target.h;

suzairoo
Visitor
1 0 0

https://vitalvybz.com this is my url can you please help me with the same problem.  can you please help me out.   

publicidad_gdl
Visitor
1 0 0

linea 2215

sublimajewelry
Tourist
3 0 0

This worked for me too - thank you for posting!


@Visely-Team wrote:

@Agail in your theme.js find the following snippet:

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

and adjust it to read:

  function getVideoOptions(evt) {
    return videos[evt.target.l.id];
  }

 

bruce-donaldson
Visitor
2 0 0

Hey Visely,

I tried this fix and changed it to L, and now the video is loading but still no audio.  

This is my preview link:

https://precisionkush.com/?_cd=0a72dfbe9b75a272fc5a7ce2b1cd4adfd02027b1b29263ae0e21e79f201c44b2&_uid...

 

I'd appreciate your help.

MeganGdo
Visitor
1 0 0

TOTALLY worked for me. Thank you!

tanningclub
Visitor
1 0 0

Hey there, 

Im using debut as well and the youtube videos that were playing initially are not now. Just a continuous load.  Ive read along where there you say there is a coding issue, but where do i find that?  Im a novice with Shopify...here is my URL.  Any help is appreciated!

https://tanningclub.myshopify.com/

 

Tyler

Razi
Excursionist
13 0 9

Hi! Watch this video it will show you where to find the code

https://www.youtube.com/watch?v=dzfUQvIX2IE

Hemangini
Visitor
1 0 0

My code has the same: "return videos[evt.target.f.id];"

 

Would you be able to fix mine as well? My store url is https://arteisch.com/?key=71b3b3662c062601396fd1bd1d9fb84ad1dcac7ea2f24e34f429b07631d22221

Youtube link - https://www.youtube.com/watch?v=RvP3g2I67kw

 

Mangrovedesign
Visitor
1 0 0

Hi we are having the same problem with two of our videos . Can you help me wtih this ?  https://mangrovebayporlacasa.com/ is store front.

FDtims
Visitor
1 0 0

Worked for me too!!! Thanks!

Akhilkotha96
Excursionist
50 0 3

Hi, 

when i add video it is not loading

my code is 

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

what you have said to add is  already present in my code.can you please tell how to fix it