JW Player for Flash - supported variables (flashvars)
General flashvars
- config (undefined): location of a XML file with flashvars. Useful for short embed codes or CDN stream redirecting. example.
File properties
- author (undefined): author of the video, shown in the display or playlist.
- captions (undefined): location of a TT captions XML file.
- 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 (undefined): url to an external page the display, controlbar and playlist can link to.
- start (0): position in seconds where playback has to start.
- title (undefined): title of the video, shown in the display or playlist.
- type (undefined): type of file, can be sound, image, video, youtube, camera, http or rtmp. Use this to override auto-detection.
All these file properties can be loaded as flashvars into the player, but they can also be assigned to every entry in playlists.
Layout
- controlbar (bottom): position of the controlbar. Can be set to bottom, over and none.
- logo (undefined): location of an external jpg,png or gif image to show in the display.
- playlist (none): position of the playlist. Can be set to bottom, over, right or none.
- playlistsize (180): size of the playlist. When below or above, this refers to the height, when right, this refers to the width of the playlist.
- skin (undefined): location of a SWF file with the player graphics.
Playback
- autostart (false): automatically start the player on load.
- bufferlength (1): number of seconds of the file that has to be loaded before starting.
- displayclick (play): what to do when one clicks the display. Can be play, link, fullscreen, none, mute, next.
- fullscreen (false): set to true to enable fullscreen.
- item (0): playlistitem that should start to play. Use this to set a specific start-item.
- mute (false): mute all sounds on startup. Is saved as cookie.
- quality (true): enables high-quality playback. This sets the smoothing of videos on/off, the deblocking of videos on/off and the dimensions of the camera small/large. Is saved as cookie.
- repeat (none): set to list to play the entire playlist once and to always to continously play the song/video/playlist.
- shuffle (false): shuffle playback of playlistitems.
- 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. Is saved as cookie.
External communication
- abouttext (undefined): text to show in the rightclick menu. Please do not change this if you don't have a commercial license! When undefined it shows the player version.
- aboutlink (http://www.jeroenwijering.com/?page=about): url to link to from the rightclick menu. Do not change this if you don't have a commercial license!
- linktarget (_blank): browserframe where the links from display are opened in. Some possibilities are '_self' (same frame) , '_blank' (new browserwindow) or 'none' (links are ignored in the player, so javascript can handle it).
- streamscript (undefined): location of an external PHP file to use for HTTP streaming. If set to lighttpd, the player presumes a Lighttpd server is used to stream videos.
- tracecall (undefined): name of a javascript function that can be used for tracing the player activity. All events from the view, model and controller are sent there.
Check the player setup PDF for an overview of all flashvars the player can handle.
Variables that are read-only
In addition to the variables listed above here, the player's 'config' object also contains a couple of variables that cannot be set through flashvars. They might be useful to request though, since they contain interesting info:
- client (Flash MAC X,0,XXX,0): Version and platform of the Flash client plugin. Useful to check for e.g. MP4 playback or fullscreen capabilities.
- controlbarsize (20): height of the controlbar, is automatically set after loading the skin.
- height (300): height of the display, is automatically set on load and resize.
- state (IDLE): current playback state of the player (IDLE, BUFFERING, PLAYING, PAUSED, COMPLETED).
- margins (0,0): stage margins the player should take when resizing. Set these if you embed the player into another SWF.
- version (4.x.rrr): exact major release, minor release and revision number of the player. sent to javascript with every call.
- width (400): width of the display, is automatically set on load and resize.
