Developpement Informatique

février 20, 2010

JW Player: Flashvars

Filed under: Lecteurs, Video — izaam01 @ 3:44

JW Player: Flashvars

Here’s a list of all flashvars the player accepts. Flashvars are variables entered in the embed HTML code to set how the player looks and functions. The setting of all these flashvars can be accessed through javascript and by plugins. For more info, see the API page.

Some of these flashvars represent a certain status: they are read-only and automatically updated by the player. Plugins and Javascripts may request through the API.

Note that you must urlencode the three glyphs ? = & inside flashvars, because of the way these flashvars are loaded into the player. The urlencoded values for these symbols are listed here:

  • ? → %3F
  • = → %3D
  • & → %26

So if, fore example, your file flashvar is at the location getplaylist.php?id=123&type=flv, you must set the file flashvar to getplaylist.php%3Fid%3D123%26type%3Dflv.

Playlist properties

To load a playlist, only a single flashvars is required:

  • playlistfile (undefined): Location of an XML playlist which will be loaded as the player starts.

The following flashvars can be set instead of playlist, and are used to create a playlist with a single item. They set various properties of the media item to load (e.g. the source file, preview image or title).

  • author (undefined): author of the video, shown in the display or playlist.
  • date (undefined): publish date of the media file. Available since 4.3.
  • description (undefined): text description of the file.
  • duration (0): duration of the file in seconds.
  • file (undefined): location of the mediafile or playlist to play.
  • image (undefined): location of a preview image; shown in display and playlist.
  • link (deprecated): This option is no longer supported as of 5.0.
  • start (0): position in seconds where playback has to start. Won’t work for regular (progressive) videos, but only for streaming (HTTP / RTMP).
  • streamer (undefined): location of an rtmp/http server instance to use for streaming. Can be an RTMP application or external PHP/ASP file. More info here.
  • tags (undefined): keywords associated with the media file. Available since 4.3.
  • title (undefined): title of the video, shown in the display or playlist.
  • provider (undefined): this is determines what type of mediafile this item is, and thus which provider the player should use for playback. By default, the type is detected by the player based upon the file extension. If there’s no suitable extension or the player detects the type wrong, it can be manually set. The following default types are supported:
    • video: progressively downloaded FLV / MP4 video, but also AAC audio.
    • sound: progressively downloaded MP3 files.
    • image: JPG/GIF/PNG images.
    • youtube: videos from Youtube.
    • http: FLV/MP4 videos played as http pseudo-streaming.
    • rtmp: FLV/MP4/MP3 files played from an RTMP server.

In addition to these default providers, the player has specific support for certain streaming servers or CDNs. A full list of mediafile types can be found on the supported filetypes page.


These flashvars control the look and layout of the player.

  • backcolor (undefined): background color of the controlbar and playlist. This is white with the default skin.
  • controlbar (bottom): position of the controlbar. Can be set to bottom, over and none.
  • dock (false): set this to true to show the dock with large buttons in the top right of the player. Available since 4.5.
  • frontcolor (undefined): color of all icons and texts in the controlbar and playlist.
  • height (400): height of the display in pixels.
  • icons (true): set this to false to hide the play button and buffering icon in the middle of the video. Available since 4.2.
  • lightcolor (undefined): color of an icon or text when you rollover it with the mouse.
  • logo.file (undefined): location of an external jpg, png or gif image which replaces the watermark image (Licensed players only)
  • (undefined): link to direct to when the watermark image is clicked on (Licensed players only)
  • logo.hide (true): When set to true, the logo will auto-hide (Licensed players only)
  • logo.position (bottom-left): The corner in which to display the logo. Can be bottom-left, bottom-right, top-left or top-right (Licensed players only)
  • playlist (none): position of the playlist. Can be set to bottom, over, right or none.
  • playlistsize (180): when below this refers to the height, when right this refers to the width of the playlist.
  • skin (undefined): location of a skin file containing the player graphics. The SVN repository contains a couple of example skins.
  • screencolor (undefined): background color of the display
  • width (280): width of the display in pixels.

The four color flashvars must be entered using hexadecimal values, as is common for web colors (e.g. FFCC00 for bright yellow). They are not supported by bitmap skins.


These flashvars control the playback behavior of the player.

  • autostart (false): Automatically start the player on load.
  • bufferlength (1): Number of seconds of the file that has to be loaded before starting. Set this to a low value to enable instant-start and to a high value to get less mid-stream buffering.
  • displayclick (deprecated): This option is no longer supported as of 5.0.
  • displaytitle (false): Set this to true to print the title of a video in the display. (Currently not implemented)
  • fullscreen (false): Fullscreen state of the player. This is a read-only flashvar, useful for plugins. Available since 4.4.
  • item (0): PlaylistItem that should start to play. Use this to start the player with a specific item selected.
  • linktarget (_blank): Browser frame where link from the display are opened in. Some possibilities are ‘_self’ (same frame) or ‘_blank’ (new browser window).
  • mute (false): Mute all sounds on startup. This can be overridden by a user’s cookie, which stores the user’s last muting state.
  • playerready (undefined): Javascript callback when the player has completed its setup.
  • repeat (none): Set to list to play the entire playlist once, to always to continously play the song/video/playlist and to single to continue repeating the selected file in a playlist.
  • shuffle (false): Randomly choose which playlist item to play.
  • smoothing (true): This sets the smoothing of videos, so you won’t see blocks when a video is upscaled. Set this to false to get performance improvements with old computers / big files. Available since 4.4.
  • stretching (uniform): Defines how to resize images in the display. Can be none (no stretching), exactfit (disproportionate), uniform (stretch with black borders) or fill (uniform, but completely fill the display).
  • volume (90): Startup volume of the player. Can be 0 to 100. The user’s last volume setting is saved in a cookie and overrides this flashvar.


These flashvars relate to the API of the player:

  • debug (undefined): Set this to either arthropod, console or trace to let the player log events. Available since 4.5. Also saved as cookie since 4.6. More info in the plugins documentation.
  • plugins (undefined): This is a comma-separated list of swf plugins to load (e.g. yousearch,viral). Each plugin has a unique ID and resides at Go to the LongTailVideo AddOns section to see all available plugins.
  • client (deprecated): This flashvar has been deprecated, as of 5.0
  • id (deprecated): This flashvar has been deprecated, as of 5.0
  • version (deprecated): This flashvar has been deprecated, as of 5.0

The former flashvars, client, id and version are sent as parameters with every event the player broadcasts.

Config XML

All of the above flashvars can also be listed in an XML file and then fed to the player with a single flashvars:

  • config (undefined): location of a XML file with flashvars. Useful for short embed codes or CDN stream redirecting. Here’s an example:

Flashvars set in the embed code will overwrite those in the config XML.


Créez un site Web ou un blog gratuitement sur