Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Let's download and install the MediaElement player in an existing webpage.
Link
- Note: Heads up! The MediaElement page layout has changed since this was recorded. Click "Installation" after following the link above to find the instructions.
Obtaining jQuery
jQuery is no longer Included in MediaElement download. MediaElement still requires jQuery to work, though. To get jQuery, the best way is to link to a CDN, as in the snippet below under the "Code" heading. If you'd like to download it yourself and serve it from your js
folder, the way it is done in the video, you can get a copy by clicking here. If that link renders a page of text, you can just select all (cmd or ctrl + A) and copy the text, pasting it into a new file called jquery.js
. Alternatively, you could go to the jQuery download page, and download the version you want to use.
Code
Links to the documents in index.html
<script src="js/jquery.js"></script>
<script src="js/mediaelement-and-player.min.js"></script>
<link href="css/mediaelementplayer.css" rel="stylesheet">
Alternatively, you can use a CDN to serve jQuery, which is generally recommended. Instead of linking to it from the js folder as demonstrated above, use a link from this page. The script tag will look something like this:
<script
src="http://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
Centering an Element with CSS
This video, from the Treehouse course CSS Layout Basics, covers the CSS centering technique used in this video.
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
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