/ Published in: HTML
For cross-browser code--which is not necessarily valid--the [Embedded Media HTML Generator](http://cit.ucsf.edu/embedmedia/step1.php) provides a great starting point.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- **************************************** Embedding objects in HTML (cross-browser) **************************************** --> <!--Flash--> <object width="320" height="240" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"> <param name="movie" value="flash_object.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFF"> <param name="play" value="true"> <param name="loop" value="false"> <embed type="application/x-shockwave-flash" src="flash_object.swf" width="320" height="240" quality="high" bgcolor="#FFF" play="true" loop="false" pluginspage="http://get.adobe.com/flashplayer/"> </embed> </object> <!--QuickTime - add 16px to height for controls--> <object type="video/quicktime" width="320" height="256" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=7,3,0,0"> <param name="src" value="quicktime_movie.mov" /> <param name="autoplay" value="true"> <param name="controller" value="true"> <param name="loop" value="false"> <embed src="quicktime_movie.mov" width="320" height="256" autoplay="true" controller="true" loop="false" pluginspage="http://www.apple.com/quicktime/download/"> </embed> </object> <!--Windows Media - add 45px to height for controls--> <object type="application/x-oleobject" width="320" height="285" style="background-color:#000;" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..."> <param name="filename" value="windows_media_video.wmv" /> <param name="animationAtStart" value="true" /> <param name="transparentAtStart" value="true" /> <param name="autoStart" value="true" /> <param name="showControls" value="true" /> <param name="loop" value="false" /> <embed type="application/x-mplayer2" src="windows_media_video.wmv" width="320" height="285" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" displaysize="4" autosize="-1" bgcolor="black" showcontrols="true" showtracker="-1" showdisplay="0" showstatusbar="-1" videoborder3d="-1" autostart="true" designtimesp="5311" loop="false"> </embed> </object> <!-- **************************************** Embedding objects in HTML (ideally, but not cross-browser) **************************************** --> <object data="flash_object.swf" type="application/x-shockwave-flash" width="320" height="240"> <param name="movie" value="flash_object.swf"/> <param name="bgcolor" value="#FFF"/> Flash player is not installed. </object> <object data="quicktime_movie.mov" type="video/quicktime" width="320" height="256"> <param name="src" value="quicktime_movie.mov"/> </object> <!--Using HTML 5 video element:--> <video src="video.ogg" type="video/ogg" controls> </video> <video controls> <source src="video.ogg" type="video/ogg"/> <source src="video.mp4"/> </video> <video src="video.ogv" type="video/ogg" controls> <object data="flash_video.swf" type="application/x-shockwave-flash" width="320" height="240"> <param name="movie" value="flash_video.swf"/> <param name="bgcolor" value="#FFF"/> </object> </video> <video src="video.ogg" type="video/ogg" controls> <object type="application/x-java-applet"> <param name="url" value="video.ogg"/> <param name="archive" value="cortado.jar"/> <param name="code" value="com.fluendo.player.Cortado.class"/> </object> </video> <!--Using HTML 5 audio element:--> <audio src="audio.wav"> </audio>
URL: https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox