Вы находитесь на странице: 1из 4

FlashVars – JW Player – Trac

Search

Login

Wiki Roadmap Browse Source View Tickets Testing

Start PageIndexHistoryLast Change

Supported variables for Flash (flashvars)


Here's a list of all flashvars the player uses. Check the player setup PDF for a one-page
overview of all these flashvars. The setting of all these flashvars can be accessed by plugins/
javascript through the view.config/player.getConfig() call of the API.

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

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

<config>
<image>files/bunny.jpg</image>
<repeat>true</repeat>
<backcolor>333333</backcolor>
<volume>40</volume>
<controlbar>over</controlbar>
</config>

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

File properties

● author (undefined): author of the video, shown in the display or playlist.


● date (undefined): publish date of the media 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. 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.

http://developer.longtailvideo.com/trac/wiki/FlashVars (1 of 4) [27/05/2009 15:33:32]


FlashVars – JW Player – Trac

● title (undefined): title of the video, shown in the display or playlist.


● type (undefined): this is determines what type of mediafile this item is, and thus which
model the player should use for playback. Supported values in the player are:
❍ sound (for MP3 sounds)
❍ image (for JPG, PNG, GIF images)
❍ video (for FLV and MP4 videos)
❍ youtube (for Youtube videos)
❍ http (for HTTP streaming videos)
❍ rtmp (for RTMP streaming videos)
❍ lighttpd (for video from a Lighttpd webserver)
❍ bitgravity (for content from the Bitgravity CDN)
❍ highwinds (for content from the Highwinds CDN)
❍ edgecast (for HTTP streaming MP4 from the EdgeCast CDN)
❍ fcsubscribe (for live streams from the Limelight CDN)
❍ flvseek (for HTTP streaming FLV from the Limelight CDN)

Next to loading as flashvars, these items can also be assigned to every entry in playlists.

Colors

● backcolor (undefined): background color of the controlbar and playlist. This is white with the
default skin.
● frontcolor (undefined): color of all icons and texts in the controlbar and playlist.
● lightcolor (undefined): color of an icon or text when you rollover it with the mouse.
● screencolor (undefined): background color of the display.

All these colors are in so-called hexadecimal values as is common for web colors. The wizard
contains a colorpicker you can use if you're not proficient with web colors.

Layout

● controlbar (bottom): position of the controlbar. Can be set to bottom, over and none.
● dock (true): set this to false to hide the dock with large buttons in the top right of the player.
Available since 4.5.
● height (400): height of the display in pixels. When resizing is set to false, this is the overall
player height.
● icons (true): set this to false to hide the play button and buffering icon in the middle of the
video.
● 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 SWF file with the player graphics. Here's a skinning tutorial,
an overview of supported elements and a couple of example skins.
● width (280): width of the display in pixels. When resizing is set to false, this is the overall
player width.

http://developer.longtailvideo.com/trac/wiki/FlashVars (2 of 4) [27/05/2009 15:33:32]


FlashVars – JW Player – Trac

Behaviour

● 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 (play): what to do when one clicks the display. Can be play, link, fullscreen, none,
mute, next. When set to none, the handcursor is also not shown.
● fullscreen (false): fullscreen state of the player. This is a read-only flashvar, useful for
plugins.
● item (0): playlistitem that should start to play. Use this to set a specific start-item.
● linktarget (_blank): browserframe where link from the display are opened in. Some
possibilities are '_self' (same frame) or '_blank' (new browserwindow).
● logo (undefined): location of an external jpg, png or gif image to show in a corner of the
display. With the default skin, this is top-right, but every skin can freely place the logo.
● mute (false): mute all sounds on startup. Is saved in a cookie.
● 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.
● resizing (true): by default, the player will resize itself to fill the entire canvas. Set this to
false if you don't want the player to resize (e.g. when you load the player in a Flex
application).
● shuffle (false): shuffle playback of playlist items.
● 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.
● state (IDLE): current playback state of the player. Can be IDLE (no file loaded), BUFFERING
(loading a file), PLAYING (playing a file), PAUSED (pausing playback; loading continues),
COMPLETED (same as IDLE, but the file is player and loaded completely).
● 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. Is saved in a cookie.

API

● 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.
● debug (undefined): set this to either arthropod, console or trace to let the player log events.
Available since 4.5. More info in the building plugins tutorial.
● id (ply): ID of the player within the javascript DOM. Useful for javascript interaction. This is
automatically set for Windows / MAC, but under Linux you'll have to set the flashvar.
● plugins (undefined): a powerful new feature, this is a comma-separated list of swf plugins to
load (e.g. yousearch,viral). Each plugin has a unique ID and resides at plugins.longtailvideo.com.
Go to the LongTailVideo AddOns section to see all available plugins.
● version (4.x.rrr): exact major release, minor release and revision number of the player. sent
to javascript with every call. The revision number is always upped no matter the release, so
4.2.51 is the revision right after 4.1.50.

http://developer.longtailvideo.com/trac/wiki/FlashVars (3 of 4) [27/05/2009 15:33:32]


FlashVars – JW Player – Trac

Download in other formats:


Plain Text

http://developer.longtailvideo.com/trac/wiki/FlashVars (4 of 4) [27/05/2009 15:33:32]

Вам также может понравиться