HTML5 Audio & Video for jQuery

a project by happyworm

Step 1 : Upload the jPlayer plugin

next step

Perform the following actions:

  • Download or clone the jPlayer repository from the download page.
  • View the dist/jplayer folder.
  • Upload the jPlayer JavaScript file and SWF file to your web server.
    ie., Upload the jquery.jplayer.min.js and jquery.jplayer.swf files.

For the purpose of this guide, upload them to a directory called "js" located at the root of your domain. This will allow you to easily reference the jPlayer plugin from anywhere on your site using:

Additionally, this allows you to easily set an important jPlayer option, the swfPath, by using the constructor option:
{ swfPath: "/js" }

next step


The swfPath is important because jPlayer must know where the SWF file is for the Flash fallback to work. Failure to upload the SWF file and set the swfPath correctly will cause your site to have problems on older browsers that do not support HTML5 Media in the formats you supplied.

We recommend using absolute paths so that you can use jPlayer once or many times throughout your entire site structure. You can of course use relative paths if you want and understand why it is appropriate for your site.