Youtube video only plays after page refresh

Hello,

Im running into an issue where I link a youtube video but on the live site it doesn’t play. But, i’ve noticed that if I do a hard refresh/reload of the page then the video will load and play. Does anyone know why this is happening and how can I fix this?

1 Like

Hi @kmatthews15

Could you share your store URL?

Hi @Dan-From-Ryviu

Here is one of the pages where the video is not playing properly.
https://zamst.us/pages/thumb-sprain

Thank you. Using the custom html block and adding the iframe to the html
worked for me.

Hi @kmatthews15 ,

Thanks for reaching out to the community. We are MooseDesk, a comprehensive Live Chat, FAQ & Helpdesk App designed to elevate your customer support experience.

Hi, to be able to embed videos from youtube you can use the html tag iframe, if you want the video to open automatically when you visit your website, you will have to add the autoplay attribute to your video to be able to automatically run the video and because some browser permissions may be blocked, you must add the mute attribute to be able to automatically turn off the video and auto video when opening the web browser. Below is my example code, you can refer to the following code:

<iframe width="560" height="315" src="https://www.youtube.com/embed/{id video}?autoplay=1&mute=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="">
    </iframe>

in the code id will be the id of the video you want to add.

I hope this answer addresses your question effectively. If you found it helpful, we’d appreciate a ‘LIKE’ for MooseDesk. If your issue is resolved, please mark this as 'SOLUTION’.

In the meantime, our MooseDesk Team is always here to help with customer support solutions. We’re passionate about improving your customer experiences through our Live Chat, FAQ, and Helpdesk App.

With MooseDesk, you can engage with customers through omnichannel support, manage inquiries with a robust ticket system, and provide quick responses.