HTML and CSS Reference
In-Depth Information
Flash Video Players
You've learned how to embed video in pages with the <video> tag and how to embed
Flash content in pages. Next I introduce some Flash players that can play the same
videos you created for use with the <video> tag. These players are useful because they
enable anyone who has Flash to view your videos. A number of such video players are
available. In this section, I discuss two of them: JW Player and Flowplayer.
JW Player
JW Player is a popular Flash video (and audio) player. It is licensed under a Creative
Commons noncommercial license, so it's free to use so long as it's not for a commercial
purpose. It also requires you to attribute the work to its creator when you use it; in other
words, you have to link back to the JW Player website when you embed the player.
There's also a commercial version available that you can use for any purpose without the
link to the JW Player website. If your website includes advertising, you must use the
commercial version of JW Player.
To download JW Player, go to http://www.longtailvideo.com/players/jw-flv-player.
After you've downloaded the player, you'll need your video file as well as the Flash
player itself, player.swf . JW Player includes an example file that uses the <object> and
<embed> tags, but you should use a standards-complaint approach. You can use
SWFObject to embed JW Player, as shown in Figure 12.12, using the following code:
<script type=”text/javascript” src=”swfobject.js”></script>
<script type=”text/javascript”>
swfobject.registerObject(“myId”, “9”, “expressInstall.swf”);
</script>
<div>
<object id=”myId” classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”
width=”400” height=”315”>
<param name=”movie” value=”player.swf” />
<param name=”flashvars” value=”file=video.mp4” />
<!—[if !IE]>—>
<object type=”application/x-shockwave-flash” data=”player.swf”
width=”400” height=”315”>
<param name=”flashvars” value=”file=video.mp4” />
<!—<![endif]—>
<div>
<!— Alternative content —>
<p > <a href=”http://www.adobe.com/go/getflashplayer”> Download Flash </a></p>
</div>
<!—[if !IE]>—>
</object>
<!—<![endif]—>
</object>
</div>
 
 
Search WWH ::




Custom Search