1. Windows Media Player
<object id="avewmplayer" height="320" width="400" classid="CLSID:{6BF52A52-394A-11d3-B153-00C04F79FAA6}"> <param name="AutoStart" value="0"> <param name="Balance" value="0"> <param name="enabled" value="-1"> <param name="EnableContextMenu" value="-1"> <param name="url" value="filename"> <param name="PlayCount" value="1"> <param name="rate" value="1"> <param name="currentPosition" value="0"> <param name="currentMarker" value="0"> <param name="defaultFrame" value=""> <param name="invokeURLs" value="0"> <param name="baseURL" value=""> <param name="stretchToFit" value="0"> <param name="volume" value="50"> <param name="mute" value="0"> <param name="uiMode" value="Full"> <param name="windowlessVideo" value="0"> <param name="fullScreen" value="0"> <param name="enableErrorDialogs" value="-1"> <embed style="FILTER: xray" mce_style="FILTER: xray" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="filename" mce_src="filename" width="400" height="320" type="application/x-mplayer2" autosize="False" autostart="true" showcontrols="true" ShowStatusBar="1" loop="undefined" EnableContextMenu="0"> </embed> </object>
2. Real Player
<object id="RP" classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" height="320" width="400"> <param name="_ExtentX" value="10583"> <param name="_ExtentY" value="8467"> <param name="SRC" value="filename"> <param name="AUTOSTART" value="0"> <param name="SHUFFLE" value="0"> <param name="PREFETCH" value="0"> <param name="NOLABELS" value="0"> <param name="CONTROLS" value="ImageWindow,ControlPanel"> <param name="CONSOLE" value="AveClip"> <param name="LOOP" value="0"> <param name="NUMLOOP" value="0"> <param name="CENTER" value="0"> <param name="MAINTAINASPECT" value="0"> <param name="BACKGROUNDCOLOR" value="#000000"> <embed autostart="False" console="AveClip" controls="ImageWindow,ControlPanel" height="320" src="filename" mce_src="filename" type="audio/x-pn-realaudio-plugin" width="400"> </embed> </object>
3. Flash Player
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="400" height="320"> <param name="movie" value="flashpalyerurl//.swf" /> <param name="quality" value="high" /> <param name="allowFullScreen" value="true" /> <param name="FlashVars" value="vcastr_file=filename" /> <embed src="flashpalyerurl//.swf" mce_src="flashpalyerurl/.swf" allowfullscreen="true" flashvars="vcastr_file=filename" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="320"> </embed> </object>
4. QuickTime Player
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="640" width="800"> <param name="autoplay" value="False" /> <param name="controller" value="true" /> <param name="quality" value="high" /> <param name="kioskmode" value="true" /> <param name="CORRECTION" value="none" /> <param name="src" value="filename" /> <embed autoplay="False" controller="true" height="640" quality="high" src="filename" mce_src="filename" type="video/quicktime" width="800"> </embed> </object>
PS: The QuickTime Player plug-in has a shortage that if the size set smaller than the video, the video will can't be display totally.
5. PDF
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="100%"> <param name="SRC" value="filename"> <param name="_StockProps" value="0"> <param name="_Version" value="65539"> <param name="_ExtentX" value="20108"> <param name="_ExtentY" value="10866"> <embed src="filename" mce_src="filename" type="application/pdf" width="100%" height="100%"> </embed> </object>
Note:
Object label is used for IE browser of Windows platform, and the embed label is for Netscape Navigator browser of Windows and Macintosh platforms and IE browser of Macintosh platform. The IE of Windows platform plays video by Active-X plug-in but others by Netscape plug-in. So when we use this, be sure we write both of them to support as many browsers as possible.
多媒体文件播放代码
本文提供了在不同浏览器上使用多种播放器(如Windows Media Player、RealPlayer、Flash Player、QuickTime Player)及PDF阅读器的HTML代码示例。通过这些代码,可以确保网页上的多媒体文件能在各种环境下正常播放。
3408

被折叠的 条评论
为什么被折叠?



