Eujomnoma
Eujomnoma

Reputation: 57

Auto Play Youtube Embedded Video without editing the embedding code

I am working on a music site for a client (in Wordpress), and they would like the 'Featured Youtube video' that will display on the homepage to autoplay when the page loads. I'm looking for a solution that wouldn't require client to edit the code when they paste the embedding code for Youtube. Is there a way I can hard code this to my template files?

Most solutions out there are about editing the code to enable autoplay. Any ideas?

Upvotes: 0

Views: 373

Answers (1)

cih
cih

Reputation: 1980

You could manipulate the html using jQuery, you would target the element and insert the html required to autoplay, this way it can be inserted each time the page loads.

W3Schools and this JQuery link should get you going.

Upvotes: 1

Related Questions