HTML and CSS Reference
A video played
using JW Player.
The code starts with the <script> tags used to include the SWFObject script and register
the player. If you look at the line that registers the player, you'll see that I'm registering
the <object> tag with the ID myId and that I'm specifying that version 9 of Flash is
required, because that's the first version of Flash that supported MP4 and H.264. Finally,
there's a reference to expressInstall.swf , a Flash movie that's included with
SWFObject that enables users to upgrade their Flash player in place if it's out-of-date.
Both the <object> tag for Internet Explorer and the nested <object> tag for other
browsers refer to the JW Player Flash file, player.swf . They also both use the flash-
vars param to point to the video file, video.mp4 . I've also included some alternative
content that points the users to the Flash download site if they don't have Flash installed.
JW Player is highly customizable. A wizard on the JW Player website enables you to
generate your own customized embed code at http://www.longtailvideo.com/support/
jw-player-setup-wizard . The code it produces uses the dynamic publishing feature from
an old version of SWFObject. You can see what the wizard looks like in Figure 12.13.
There's a detailed list of the configuration parameters in the documentation at the JW
Player website. All the configuration options are specified in the flashvars parameter.
Here's an example that moves the control bar to the top of the player:
<param name=”flashvars” value=”file=video.flv&controlbar=top” />