HTML and CSS Reference
In-Depth Information
Embedding Video in XHTML
Content from video-sharing services such as YouTube or Google Video, which serve movies through the Flash Player, 12
can be embedded using the Flash Satay method discussed earlier. Listing 9-22 shows an example.
Listing 9-22. Embedding a Flash Video Using Flash Satay
<object type="application/x-shockwave-flash"
data="http://video.google.com/videoplay?docid=4226784084458819393#" width="400"
height="326" id="VideoPlayback">
<param name="movie" value="http://video.google.com/videoplay?docid=4226784084458819393#" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
</object>
Window Media Video files ( .wmv ) can be embedded by using the MIME type video/x-ms-wmv (Listing 9-23).
Listing 9-23. Embedding a WMV Video File
<object type="video/x-ms-wmv"
data="http://www.example.com/dreamcar.wmv"
width="320" height="260">
<param name="src" value="http://www.example.com/dreamcar.wmv" />
<param name="autostart" value="true" />
<param name="controller" value="true" />
</object>
For QuickTime videos, there are dedicated MIME types: the video/quicktime and the application/x-
quicktime . IE tends to open such videos through an ActiveX control. To embed QuickTime videos in a browser-
independent way that also validates, you can use the method presented in Listing 9-24.
Listing 9-24. Embedding a QuickTime Video File
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase=" http://www.apple.com/qtactivex/qtplugin.cab " width="352" height="288">
<param name="src" value="http://www.example.com/video/dreamcars.mov" />
<param name="controller" value="true" />
<param name="autoplay" value="false" />
<!--[if !IE]>-->
<object type="video/quicktime" data="http:// www.example.com/video/dreamcars.mov"
width="352" height="288">
<param name="autoplay" value="false" />
<param name="controller" value="true" />
</object>
<!--<![endif]-->
</object>
The code provided as IE-style conditional comments 13 is used by all browsers except Internet Explorer, in which
these comments are hidden and the outer object is displayed.
12 Adobe Flash Player is widely used for streaming video playback on web sites.
13 The method was suggested by Lachlan Hunt.
 
Search WWH ::




Custom Search