jPlayer

HTML5 Audio & Video for jQuery

a project by happyworm

The jPlayer 1.2.0 release has been superseded by a new release.
Use the navigation bar above to access the latest release, jPlayer 2.4.0.

jPlayer 1.2.0 Release notes

  • Released: 11th July 2010
  • Major Bug: Fixed the operation of jPlayer on the iPad. The solution also fixed the Safari 4/5 (Mac/PC) problems with multiple instances on the same page. Solution uses a single <audio> element per jPlayer, that is re-used and is no longer replaced each time setFile is issued.
  • Major Bug: Corrected the use of playHead and playHeadTime immediately after setFile, where the src of the audio element was never being set. Also had to correct an issue specific to Opera 10.53, where using playHead immediately after setFile was causing NaN values and corrupting the audio element.
  • Minor Bug: Made the play ID's CSS display type set the default display type for both play and pause IDs. The pause ID can now be set to {display:none;} in the CSS. This stops the pause button being displayed briefly when the page loads. If you need different display types for play and pause, then set the cssId for play first, followed by setting pause.
  • Minor Bug: The internally delayed commands created by using playHead, playHeadTime or stop immediately after a setFile when the browser is using HTML5 native audio, are now cleared when issuing a setFile, pause or stop command. Eliminates chained commands from generating unexpected results.
  • Minor Bug: Fixed the volume command for Chrome 4, where it was not working when used between the setFile and play commands. Also fixed when setting the volume multiple times to the same value during the condition.
  • New feature: Changed the security settings of the Flash SWF using System.security.allowDomain('*'). This change allows cross-domain access of the SWF file and enables HTML to remote SWF scripting.
  • New feature: Enabled preloading of the audio file using a new preload constructor option. Default is {preload:'none'}. Options from HTML5 Draft Spec are: none, metadata, auto.
  • New feature: Added a new jPlayer method jPlayer('load') to preload the current audio file.

jPlayer 1.1.1 Release notes

  • Released: 29th April 2010
  • New feature: The click handlers created by jPlayer("cssId",fn,id) now issues a jQuery.blur() to the id that was clicked. This also affects the default cssIds, which use this function internally. This was added so that a link anchor <a> or form elements <input> and <button> would lose focus after being clicked on. ie., otherwise some browsers would highlight it until the user clicked elsewhere on the page.
  • Supporting Skin: The standard skin structure has been revised for accessibility. Added tabindex to the recommended HTML structure and changed controlling elements to <a>. This does not effect jPlayer directly, but since the default skin is widely used, we are mentioning it here in these notes.

jPlayer 1.1.0 Release notes

  • Released: 26th March 2010
  • Fixed major bug: Changed the HTML5 native audio coding so that it works on Opera 10.51. jPlayer now uses the Audio() object, which replaces the old method of inserting an <audio> tag into the page.
  • Fixed major bug: Reviewed the HTMLAudioElement.buffered coding so that it conforms with the current HTML5 Draft Spec. This fixes an issue in Opera 10.51, where the buffered property is being set to a TimeRanges object, but it is not actually being updated by the browser.
  • Fixed minor bug: The initial volume on Chrome 4 was not being set. This had also affected changing the track through jPlayer("setFile",mp3[,ogg]). Both issues are now fixed.
  • Fixed minor bug: When using jPlayer on secure https URLs the Internet Explorer browser was giving a non secured element warning. This issue has been fixed.
  • Fixed minor bug: Corrected the HTML5 behaviour to match the Flash behaviour so that commands affecting playback are ignored before a jPlayer("setFile",mp3[,ogg]) command is issued.
  • Fixed minor bug: The volume is now limited between 0 and 100 percent. Affects the constructor option {volume:percent} and the method jPlayer("volume",percent).
  • Fixed minor bug: The jPlayer("setFile",mp3[,ogg]) command now clears the internal controller on HTML5 browsers.
  • Fixed minor bug: The internally delayed commands created by using playHead, playHeadTime or stop immediately after a setFile when the browser is using HTML5 native audio, are now cleared before delaying a new command. Issuing a play command clears the delayed command.
  • New feature: Added the jPlayer("clearFile") command, which enables clearing the current audio file and disabling the playback commands.
  • New feature: Added JavaScript and Flash SWF file version check. Added internal variables: version, swfVersionRequired and swfVersion. The jPlayer version text has been added to the SWF file, so direct viewing of the SWF shows its version. Check failure will create an alert if {errorAlerts:true}, but no other action is taken.

jPlayer 1.0.0 Release notes

  • Released: 18th February 2010
  • Fixed major Bug: All calls to jPlayer are now passed through a single plugin method called jPlayer(). This breaks backwards compatibility and developers are advised to review the new documentation for the new control mechanism.
  • Fixed major bug: Fixed the problem where some browsers were not always detecting the end of the MP3 file in Flash. Used the Flash Sound.onSoundComplete to raise a flag, which is then captured by the progressBroker(). The values affected by the inaccurate Sound.position property are forced to their correct values. (Affects: playedTime, playedPercentRelative and playedPercentAbsolute.)
  • Fixed major bug: Using playHead, playHeadTime or stop immediately after a setFile when the browser is using HTML5 native audio, now works and does not throw an exception.
  • Fixed major bug: Local server testing on Firefox 3.6 developed a problem when inserting the Flash SWF file into the webpage. This caused the SWF to be loaded twice for an unknown reason. A 100ms delay was added to the initialization of the ExternalInterface.addCallback() declarations and the jPlayerReady signal. This solved the problem with local testing on Firefox 3.6.
  • Fixed minor bug: Event functions default to an empty function. Developer defined functions are checked that they are a function, otherwise an alert box will notify of the problem (when {warningAlerts:true}). Affects the constructor ready() function, onSoundComplete() and onProgressChange().
  • Fixed minor bug: Corrected the HTML5 jPlayer.play event code in IE, setInterval(function, time, argument), since IE only supports setInterval(function, time). (IE does not supports HTML5 at the moment.)
  • Fixed minor bug: When in an HTML5 browser, the setFile command caused the audio file to be pinged before a play command was given. This has been fixed so that the audio file will not be touched until a play command is given.
  • Fixed minor bug: When in an HTML5 browser that supports HTMLMediaElement.buffered.end(), such as Safari 4, stopping or pausing jPlayer while the download was in progress would freeze the load bar. This fix allows the load bar to function correctly, irrespective of whether jPlayer is playing or not.
  • Method renaming: jPlayerId method renamed to cssId to match data structure.
  • Removed Feature: Removed the bufferMsg method and associated code, since this feature was only supported when the Flash component was used.
  • Removed feature: Hover states are no longer managed through the jqjp_hover class. Originally added to correct IE6 :hover not working correctly. All hover states should now be defined using standard :hover CSS.
  • Removed feature: Buffer state is no longer managed through the jqjp_buffer class on the load bar. The original feature would only work when Flash was being used. The feature was removed so that the HTML5 and Flash solutions are identical.
  • New feature: jPlayer now has default CSS Ids built into it. Added customCssId constructor option to control whether the default CSS Ids are used. See documentation for more information. (Default: {customCssId:false}
  • New feature: Added nativeSupport constuctor option to force jPlayer to use the Flash component. (Default: {nativeSupport:true})
  • New feature: Added errorAlerts and warningAlerts constructor options to help debug jPlayer projects. (Default: {errorAlerts:false, warningAlerts:false}
  • New feature: Added graphicsFix constructor option to allow the hidden random number text to be disabled. The random number is used to fix graphical update problems with Safari and Chrome browsers.
  • New feature: All jPlayer configuration information is available via jPlayer("getData", dataName) method. This includes new diagnostic information such as whether jPlayer is playing a track or not. For advanced users, read/write access is provided through $("jpId").data("jPlayer.config"). See documentation for full details.
  • New feature: Changed swfPath logic to accommodate a trailing slash on the path. Eg. {swfPath: "myDir"} is the same as {swfPath: "myDir/"}.
  • New feature: Calls to the Flash are now in a try/catch statement. If the function fails, an alert notifies the developer (when {errorAlerts:true}) that there is a problem with the swfPath and/or Jplayer.swf file location.
  • New feature: The final call of onProgressChange happens after all internal configuration data has been updated. When onSoundComplete occurs, onProgressChange is called once afterwards. The HTML5 and Flash solutions mirror this sequence.
  • Code quality: Refactored code to remove all eval() statements.
  • Code quality: Unbound internal events when a new cssId is given. (Note: cssId was formerly jPlayerId.)
  • Code quality: jQuery selectors are stored internally, so that they are only called once. (Improves performance.)

jPlayer 0.2.5 beta Release notes

  • Released: 25th August 2009
  • Fixed major bug: The HTML canPlayType(MIME) now checks for an empty string and a "no". This corrects a bug that affected new browsers as they adopted changes to the HTML5 Draft Spec. This bug had affected updates to Firefox 3.5 and Safari 4.
  • Fixed bug with the volume constructor option when using HTML5. The new audio file is now initialised with the current volume. The current volume is now stored/maintained in the jPlayer config.
  • Removed all text from the hidden flash class. This was confusing screen readers as they were 'displaying' / 'reading out loud' the hidden flash text. This text was purely for development and testing and has been commented out in the AS2 code.
  • Fixed bug with the audio tag id, config.aid, being used before being defined.
  • Fixed minor bug with the HTML5 initiation call in IE, setTimeout(function, time, argument), since IE only supports setTimeout(function, time). (IE does not supports HTML5 at the moment.)

jPlayer 0.2.4 beta Release notes

  • Released: 1st July 2009
  • Added support for OGG files, where the browser is found to support HTML5 with OGG format. (Currently only Firefox 3.5) The constructor option {oggSupport: true} enables this feature, where an ogg file must then be given as a second attribute to all jPlayer.setFile(mp3, ogg) commands. Priority given as 1) HTML5/OGG, 2) HTML5/MP3, 3) Flash/MP3
  • Fixed bug in Safari 4 with jPlayer.setFile(mp3, [ogg]), where the mp3 file could not be changed from the 1st specified. This bug had affected browsers that supported HTML5 with mp3 format. (Currently only Safari 4)
  • Made the loadbar work with browsers that support HTML5 and have the HTMLMediaElement.buffered DOM object implemented. (Currently only Safari 4)
  • Added jPlayer.jPlayerGetInfo(element) method to enable access to basic diagnostic information.

jPlayer 0.2.3 beta Release notes

  • Released: 22nd June 2009
  • Added HTML5 support for the <audio> element on compliant browsers that can play mp3 format. At release, only the WebKit nightly builds for Mac OS X has implemented HTML5 support for mp3 format.
  • Revised coding of constructor option function ready() along with the methods jPlayer.onSoundComplete(fn) and jPlayer.onProgressChange(fn) to enable the use of $(this) within the user defined functions.
  • Fixed bug with multiple instances, where using: jPlayer.setFile(f) twice, jPlayer.stop(), jPlayer.playHead(p) or jPlayer.playHeadTime(t) on an instance that had never been played using jPlayer.play() would cause all sounds to stop, regardless of the jPlayer instance.
  • Added the constructor option volume to enable setting of the initial volume value.
  • Reviewed the naming of jPlayer's internal methods to improve compatibility with other plugins.

jPlayer 0.2.2 beta Release notes

  • Released: 20th May 2009
  • Renamed jPlayer.change(file) to jPlayer.setFile(file) to avoid jQuery naming conflict with the jQuery.change(fn) event.
  • Appropriate jPlayer methods now return a pointer to $(this), which enables chaining.
  • Removed the jPlayer.changeAndPlay(file) method, as chaining makes this redundent.
  • Added a check for Flash 8 and if not installed, gives a warning and a link to the Flash plugin. Adapted the function checkForFlash from FlashReplace by Robert Nyman.
  • Changed the getMovie() in the plugin to always return the document[fid]. Previously, Internet Explorer would return window[fid] instead. This removes a browser conditional statement, which was found to be redundent since the plugin adds the Flash object to the document definition in IE.
  • Debugged jPlayer.playHead(p) so that it could be used immediately after jPlayer.setFile(file) without needing a jPlayer.play() command prior to it.
  • Added a new method called jPlayer.playHeadTime(t) to make the play head jump to the time defined in seconds.

jPlayer 0.2.1 beta Release notes

  • Released: 4th May 2009
  • Initial beta release version of the jPlayer plugin
  • Released under the MIT licence