Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Adding MediaElement.js

Daniel Painter
Daniel Painter
8,734 Points

Not working with the class="mejs__player". no controls for video or audio.

Not working with the class="mejs_player". no controls for video or audio. "mejs_player" not found is js or css files.

Tiffany Du
Tiffany Du
15,651 Points

Did you use 2 underscores in the class name? It should be class="mejs__player"

6 Answers

Elinor Armsby
Elinor Armsby
13,654 Points

Thanks. I ended up deleting all the mejs files that were in my project and re-downloading them from mejs and then following more carefully the way the instructor shows in the video and then it worked. :)

Martin Chaffee
seal-mask
.a{fill-rule:evenodd;}techdegree
Martin Chaffee
Front End Web Development Techdegree Student 15,278 Points

Make sure you're uploading the files from MediaElement.js zip into the right locations. I had the mejs-controls.svg file in my JS folder, and it was causing problems until I moved it to my CSS folder, and that took care of it.

Todd Moody
Todd Moody
8,169 Points

Thanks I had the same issue and this worked for me too.

lifelonglearner
lifelonglearner
7,280 Points

I had the same issue. There is no "mejs__player" class in the css folder.

Elinor Armsby
Elinor Armsby
13,654 Points

It's not working for me either. Plus, when I go to the mejs site there isn't an "instructions" page that lists the files he's referring to. :(

Chisom Okoye
Chisom Okoye
13,786 Points

I wasn't working for me either. There were no controls for video and audio. But then I noticed the downloaded file from the mejs zip folder was "mejs-control.png" and not "mejs-control.svg". So i went into the mediaelementplayer.css file and changed all the mejs-control.svg to mejs-control.png. That solved the problem.

For me it took adding the correct files. I had incorrectly added mediaelement-and-player.js instead of mediaelement-and-player.min.js.