jlEmbed is a plugin for jQuery, which makes it easier to add embedded media players to your webpage. With support for Adobe Flash, Quicktime, Real Player, Silverlight, Windows Media Player, and YouTube, you will no longer need to hard-code lengthy, cumbersome, and invalid HTML for your music or videos. jlEmbed also has built-in music playlist support, a customizable MP3, SWF, FLV, YouTube audio player, support for swfobject, YouTube videos, and custom YouTube video playlists.

jlEmbed’s YouTube API functions allow you to use the YouTube Javascript API and Chromeless YouTube player, giving you the power to create custom YouTube player controls and more!

With jlEmbed, you’ll never receive HTML validation errors again from your Flash or other embedded media! jlEmbed helps keep your webpage validating properly even while using embedded media players!

Valid XHTML 1.0 Transitional

jlEmbed also includes basic plugin detection which kindly links visitors to the appropriate plugin download page when a required plugin is not detected, or automatically loads the user’s default media player plugin.

Embedding music or video on your webpage is a snap with jlEmbed!
$("#example-id").jlEmbed({ url: 'http://jasonlau.biz/public/mixdown.mp3' });
That short, simple code installs the default Media Player with default options on the object example-id!

Tested on the latest versions of the following browsers:
Internet Explorer
Internet Explorer
Firefox
Firefox
Chrome
Chrome
Opera
Opera
Safari
Safari
Please report any bugs or errors by using the Contact Form. jQuery is required for jlEmbed to work. Be sure to include jQuery before attempting to include jlEmbed.
Changelog:
  • 4.9.7.2 – Removed some line breaks in the output code. Youtube video automatically cues when autoplay option is false. Shuffle now works with the playlist option to randomize the m3u when generated. Youtube and adobeflash default to swfobject format.
  • 4.9.7.1 – Fixed a typo. Saved as UTF-8 encoding.
  • 4.9.7 – Added m3u_url option (see options tab for more details).
  • 4.9.6 – Fixed plugin detection bug which crashed jlembed in IE7. Added value option (see options tab for details). Changed the way youtubedebug works. Added a few more hidden fields for the YouTube player. You can now see all of the hidden fields for the YouTube player by setting youtubedebug to true.
  • 4.9.5 – Fixed bug which caused YouTube player to not initiate playback when autostart option was set to true.
  • 4.9.4 – Fixed bug which caused Real Player to not work in Firefox while using object only format.
  • 4.9.3 – Fixed bug which caused Windows Media Player to not work in Firefox while using object only format.
  • 4.9.2 – The last update didn’t fix everything as I had thought. Had to go back and rearrange some code.
  • 4.9.1 – Fixed autoplay and loop bug which caused autoplay and loop to not work. Updated documentation to reflect some of the recent updates. For example, all playlist links must be separated by a |pipe symbol.
  • 4.9 – Fixed YouTube autoplay.
  • 4.8 – Fixed swfobject params bug which caused an error when using params to set player parameters.
    YouTube wmode is now set to opaque by default to correct potential z-index issues.
    Now, the z-index for the YouTube player object can be set to allow other objects with a higher z-index to float on top of the video window.
    YouTube allowscriptaccess is set to always by default as this is required for javascript api interaction.
  • 4.7 – Fixed YouTube player default volume and set to value of 100.
  • 4.6 – Fixed private option youtubeapiid bug which caused SWFObject to reverse the order of multiple embedded videos because all instances of jlEmbed used the same SWFObject div id.
    Changed private option youtubeapiid to swfobjectuniqueid as it is a more accurately descriptive name.
  • 4.5 – Added YouTube hidden field jlembed_yt_player_state_{playerId} for ease of event listening.
    Added YouTube hidden field jlembed_yt_loop_{playerId}
    Added YouTube hidden field jlembed_yt_playlist_{playerId}
    Added YouTube hidden field jlembed_yt_current_playlist_item_{playerId}
    Removed depreciated YouTube hidden field jlembed_yt_volume_{playerId}
    Changed span id’s for YouTube debug output to include jlembed_debug_ prefix.
    All YouTube functions which did not previously return data now return a boolean value.
    To avoid confusion and errors, all playlist and titles array items should now be separated by a |pipe symbol where there was previously a space or comma.
    To avoid confusion and errors, all options which had string values yes and no are now boolean values true and false except the musicplayer options. youtube option now accepts a playlist consisting of |pipe separated YouTube video Id’s.
    Added the option shuffle for YouTube playlist.
    loop option is now accessible to the YouTube player.
  • 4.4 – Fixed SWFObject to work with all Adobe Flash when the format is set to swfobject.
  • 4.3 – Changed function onYouTubePlayerReady to cue the chromeless player when autoplay is off.
    Added missing variable startSeconds to function cueVideoByUrl.
    Published jlEmbed YouTube demo page.
  • 4.2 – Removed depreciated reference to jlembedplayer in YouTube functions.
    Removed depreciated function jlembed_clearVideo.
  • 4.1 – Fixed bug in YouTube function jlembed_loadVideoByUrl
  • 4.0 – Major version change.
    Added swfobject support, which can be accessed using the format option. Refer to the documentation for the format option.
    Added support and options for YouTube, a full array of YouTube javascript API functions , and YouTube chromeless player support.
    Added youtube, youtubekey, youtubechromeless, youtubevolume, youtubedebug, youtubedisplay, flash_version options.
  • 3.1 – Fixed plugin detection bug.
    Defined default settings for a few options which were previously undefined.
    Changed default height to 45px from 48px.
    Fixed url and src option bug.
    Renamed base64 and utf8 encoding functions for compatability.
    Beautified code structure.
    Added YouTube support for the Flash music player.
  • 3.0 – Numerous changes since the earlier versions. Added musicplayer, playlist, and titles options, which incorporate some of my other scripts into jlEmbed. Also, added this changelog to help keep track of what I’ve changed with each version.

Filed under .