欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

在线播放器代码大全

程序员文章站 2022-06-26 08:38:50
1.avi格式

1.avi格式

<object id="video" width="400" height="200" border="0" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa">
<param name="showdisplay" value="0">
<param name="showcontrols" value="1">
<param name="autostart" value="1">
<param name="autorewind" value="0">
<param name="playcount" value="0">
<param name="appearance value="0 value=""">
<param name="borderstyle value="0 value=""">
<param name="moviewindowheight" value="240">
<param name="moviewindowwidth" value="320">
<param name="filename" value="file:///d|/work/vod/mbar.avi">
<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="file:///d|/work/vod/mbar.avi" src="mbar.avi">
</embed>
</object>

2.mpg格式

<object classid="clsid:05589fa1-c356-11ce-bf01-00aa0055595a" id="activemovie1" width="239" height="250">
<param name="appearance" value="0">
<param name="autostart" value="-1">
<param name="allowchangedisplaymode" value="-1">
<param name="allowhidedisplay" value="0">
<param name="allowhidecontrols" value="-1">
<param name="autorewind" value="-1">
<param name="balance" value="0">
<param name="currentposition" value="0">
<param name="displaybackcolor" value="0">
<param name="displayforecolor" value="16777215">
<param name="displaymode" value="0">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="-1">
<param name="enablepositioncontrols" value="-1">
<param name="enableselectioncontrols" value="0">
<param name="enabletracker" value="-1">
<param name="filename" value="../../../mpeg/halali.mpg" valuetype="ref">
<param name="fullscreenmode" value="0">
<param name="moviewindowsize" value="0">
<param name="playcount" value="1">
<param name="rate" value="1">
<param name="selectionstart" value="-1">
<param name="selectionend" value="-1">
<param name="showcontrols" value="-1">
<param name="showdisplay" value="-1">
<param name="showpositioncontrols" value="0">
<param name="showtracker" value="-1">
<param name="volume" value="-480">
</object>


3.rm格式

<object id=video1 classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" height=288 width=352>

<param name="_extentx" value="9313">
<param name="_extenty" value="7620">
<param name="autostart" value="0">
<param name="shuffle" value="0">
<param name="prefetch" value="0">
<param name="nolabels" value="0">
<param name="src" value="rtsp://203.207.131.35/vod/dawan-a.rm";>
<param name="controls" value="imagewindow">
<param name="console" value="clip1">
<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 src type="audio/x-pn-realaudio-plugin" console="clip1" controls="imagewindow" height="288" width="352" autostart="false">

</object>

4.wmv格式

<object id="nsplay" width=200 height=180 classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,5,715" standby="loading microsoft windows media player components..." type="application/x-oleobject" align="right" hspace="5">
<!-- asx file name -->
<param name="autorewind" value=1>
<param name="filename" value="xxxxxx.wmv">
<!-- display controls -->

<param name="showcontrols" value="1">
<!-- display position controls -->

<param name="showpositioncontrols" value="0">
<!-- display audio controls -->

<param name="showaudiocontrols" value="1">
<!-- display tracker controls -->

<param name="showtracker" value="0">
<!-- show display -->

<param name="showdisplay" value="0">
<!-- display status bar -->

<param name="showstatusbar" value="0">
<!-- diplay go to bar -->

<param name="showgotobar" value="0">
<!-- display controls -->

<param name="showcaptioning" value="0">
<!-- player autostart -->

<param name="autostart" value=1>
<!-- animation at start -->

<param name="volume" value="-2500">
<param name="animationatstart" value="0">
<!-- transparent at start -->

<param name="transparentatstart" value="0">
<!-- do not allow a change in display size -->

<param name="allowchangedisplaysize" value="0">
<!-- do not allow scanning -->

<param name="allowscan" value="0">
<!-- do not show contect menu on right mouse click -->

<param name="enablecontextmenu" value="0">
<!-- do not allow playback toggling on mouse click -->
<param name="clicktoplay" value="0">
</object>

最简单的播放代码

<embed src="http://wmt2.aboutmedia.com.tw/aboutmedia/warner/mtv/naying-021011_01v_120k.wmv";;
autostart="true" loop="true" width="200" height="150" >

把这个网址http://wmt2.aboutmedia.com.tw/aboutmedia/warner/mtv/naying-021011_01v_120k.wmv换成你要看的电影就行了


有图像的rm格式:

<object classid=clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa height=288 id=video1 width=305 viewastext>
<param name=_extentx value=5503>
<param name=_extenty value=1588>
<param name=autostart value=-1>
<param name=shuffle value=0>
<param name=prefetch value=0>
<param name=nolabels value=0>
<param name=src value=http://media.cdut.edu.cn/ram/new/xiaoxin1.ram>
<param name=controls value=imagewindow,statusbar,controlpanel>
<param name=console value=raplayer>
<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>
</object>

无图像的rm格式:如相声,歌曲。。。

<object id=video2 width=300 height=62 classid=clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa>
<param name=_extentx value=9657>
<param name=_extenty value=847>
<param name=autostart value=-1>
<param name=shuffle value=0>
<param name=prefetch value=0>
<param name=nolabels value=0>
<param name=src value=http://210.242.69.206/ramgen/broadcast/bcc/encoder/hipop.rm>
<param name=controls value=statusbar,controlpanel>
<param name=console value=clip1>
<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>
</object>

最简单的media格式的播放器。。自动识别有无图像,但是版本是你机器的!
<embed src=mms://61.175.132.221/tv/mtv/f4/makeawish.wmv width=200 height=200 autostart=true loop=true></embed>


有图像的media播放器,自动调用网上的插件。
<object id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=280 height=265 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701standby=loading microsoft? windows media? player components... type=application/x-oleobject>
<param name=url value=http://202.99.11.42/xiangsheng/ymjr.wma>
<param name=uimode value=full><param name=autostart value=true>
<param name=enabled value=true>
<param name=enablecontextmenu value=false>
<param name=windowlessvideo value=true></object>


无图像的media播放器。。。同上。
<object id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=280 height=60 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701standby=loading microsoft? windows media? player components... type=application/x-oleobject>
<param name=url value=http://202.99.11.42/xiangsheng/ymjr.wma>
<param name=uimode value=full><param name=autostart value=true>
<param name=enabled value=true>
<param name=enablecontextmenu value=false>
</object>

只是界面不同的media的调插件播放器。。建议不用这个,,你可以看!
<embed src=http://av.wanwa.com/fileroot/av/ramfiles/23809.ram type=audio/x-pn-realaudio-plugin console=clip1 controls=controlpanel,statusbar height=60 width=275 autostart=true></embed>


在线播放r m格式视频代码:

<object id="player" name="player" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="400" height="272">
<param name="_extentx" value="18415">
<param name="_extenty" value="9102">
<param name="autostart" value="-1">
<param name="shuffle" value="0">
<param name="prefetch" value="0">
<param name="nolabels" value="-1">
<param name="src" value="">
<param name="controls" value="imagewindow">
<param name="console" value="clip1">
<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">
</object><br>
<object id="rp2" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="400" height="57">
<param name="_extentx" value="18415">
<param name="_extenty" value="1005">
<param name="autostart" value="-1">
<param name="shuffle" value="0">
<param name="prefetch" value="0">
<param name="nolabels" value="-1">
<param name="src" value="">
<param name="controls" value="controlpanel,statusbar">
<param name="console" value="clip1">
<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">
</object>