Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Create a Media Player with MediaElement.js!
You have completed Create a Media Player with MediaElement.js!
Preview
Learn how to customize the functionality of the MediaElement player.
Links
MediaElementPlayer configuration docs
Code
This is the code we use in the video to customize the player:
$('video, audio').mediaelementplayer({
features: ['playpause', 'tracks', 'progress'],
startLanguage: 'en'
});
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We'll just use a play/pause button,
a closed caption, and
0:00
a progress bar, like in this example.
0:04
To do that, we're gonna have to change
the way that MediaElement is connecting
0:08
to our media on the page.
0:12
So in the last video,
you saw we added the class mejs__player
0:15
to the video and
the audio elements, and that way
0:21
MediaElementPlayer was able to target
these elements and work its magic on them.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up