0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.