Posted By

wizard04 on 07/20/09


Tagged

object html flash embed


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
LeeRJohnson


Embedding Objects in HTML


 / Published in: HTML
 

URL: https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox

For cross-browser code--which is not necessarily valid--the Embedded Media HTML Generator provides a great starting point.

  1. <!--
  2. ****************************************
  3. Embedding objects in HTML (cross-browser)
  4. ****************************************
  5. -->
  6.  
  7. <!--Flash-->
  8. <object width="320" height="240"
  9. classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  10. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
  11. <param name="movie" value="flash_object.swf">
  12. <param name="quality" value="high">
  13. <param name="bgcolor" value="#FFF">
  14. <param name="play" value="true">
  15. <param name="loop" value="false">
  16. <embed type="application/x-shockwave-flash" src="flash_object.swf" width="320" height="240"
  17. quality="high" bgcolor="#FFF" play="true" loop="false"
  18. pluginspage="http://get.adobe.com/flashplayer/">
  19. </embed>
  20.  
  21. <!--QuickTime - add 16px to height for controls-->
  22. <object type="video/quicktime" width="320" height="256"
  23. classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
  24. codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=7,3,0,0">
  25. <param name="src" value="quicktime_movie.mov" />
  26. <param name="autoplay" value="true">
  27. <param name="controller" value="true">
  28. <param name="loop" value="false">
  29. <embed src="quicktime_movie.mov" width="320" height="256"
  30. autoplay="true" controller="true" loop="false"
  31. pluginspage="http://www.apple.com/quicktime/download/">
  32. </embed>
  33. <a href="quicktime_movie.mov" target="_blank">Download this video</a>
  34.  
  35. <!--Windows Media - add 45px to height for controls-->
  36. <object type="application/x-oleobject" width="320" height="285" style="background-color:#000;"
  37. classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
  38. codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  39. standby="Loading Microsoft Windows Media Player components...">
  40. <param name="filename" value="windows_media_video.wmv" />
  41. <param name="animationAtStart" value="true" />
  42. <param name="transparentAtStart" value="true" />
  43. <param name="autoStart" value="true" />
  44. <param name="showControls" value="true" />
  45. <param name="loop" value="false" />
  46. <embed type="application/x-mplayer2" src="windows_media_video.wmv"
  47. width="320" height="285"
  48. pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
  49. displaysize="4" autosize="-1"
  50. bgcolor="black" showcontrols="true" showtracker="-1"
  51. showdisplay="0" showstatusbar="-1" videoborder3d="-1"
  52. autostart="true" designtimesp="5311" loop="false">
  53. </embed>
  54. <a href="windows_media_video.wmv" target="_blank">Download this video</a>
  55.  
  56. <!--
  57. ****************************************
  58. Embedding objects in HTML (ideally, but not cross-browser)
  59. ****************************************
  60. -->
  61.  
  62. <object data="flash_object.swf" type="application/x-shockwave-flash" width="320" height="240">
  63. <param name="movie" value="flash_object.swf"/>
  64. <param name="bgcolor" value="#FFF"/>
  65. Flash player is not installed.
  66.  
  67. <object data="quicktime_movie.mov" type="video/quicktime" width="320" height="256">
  68. <param name="src" value="quicktime_movie.mov"/>
  69. <a href="quicktime_movie.mov">View this video</a>
  70.  
  71. <!--Using HTML 5 video element:-->
  72.  
  73. <video src="video.ogg" type="video/ogg" controls>
  74. <code>video</code> element or media type is not supported.
  75. </video>
  76.  
  77. <video controls>
  78. <source src="video.ogg" type="video/ogg"/>
  79. <source src="video.mp4"/>
  80. <code>video</code> element or media type is not supported.
  81. </video>
  82.  
  83. <video src="video.ogv" type="video/ogg" controls>
  84. <object data="flash_video.swf" type="application/x-shockwave-flash" width="320" height="240">
  85. <param name="movie" value="flash_video.swf"/>
  86. <param name="bgcolor" value="#FFF"/>
  87. <code>video</code> element or media type is not supported. Flash player is not installed.
  88. </object>
  89. </video>
  90.  
  91. <video src="video.ogg" type="video/ogg" controls>
  92. <object type="application/x-java-applet">
  93. <param name="url" value="video.ogg"/>
  94. <param name="archive" value="cortado.jar"/>
  95. <param name="code" value="com.fluendo.player.Cortado.class"/>
  96. <code>video</code> element or media type is not supported. Java is not installed.
  97. </object>
  98. </video>
  99.  
  100. <!--Using HTML 5 audio element:-->
  101.  
  102. <audio src="audio.wav">
  103. <code>audio</code> element or media type is not supported.
  104. </audio>

Report this snippet  

You need to login to post a comment.