Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Video and Audio Media Basics The Video Element

Autoplay not working

As the title describes

2 Answers

you must include the 'muted' attribute alongside with 'autoplay', as some browsers will ignore 'autoplay' alone.

Taison Fragao
Taison Fragao
3,061 Points

Thanks mk37, it worked with muted attribute.

Michael Newman
Michael Newman
37,806 Points

muted attribute also worked for me! Thanks!

Jan Oberreiter
Jan Oberreiter
77,985 Points

in the HTML, Nick changes "controls" to "autoplay" ... if you just leave controls, it will automatically get the boolean value "true" assigned and the controls will appear, but if you change it to "Autoplay" ... as soon as you hit the site, the player will start the clip ... hope that helped ... regards, Jan.