当前位置: 移动技术网 > IT编程>网页制作>HTML > 通用网页播放器

通用网页播放器

2017年12月08日  | 移动技术网IT编程  | 我要评论
网页播放器的参数含义 windows media player 网页播放器 参数含义

(默认0为否,-1或1为是)<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1" width="286" height="225">
 <param name="audiostream" value="-1">
 <param name="autosize" value="-1">
 <!--是否自动调整播放大小-->
 <param name="autostart" value="-1">
 <!--是否自动播放-->
 <param name="animationatstart" value="-1">
 <param name="allowscan" value="-1">
 <param name="allowchangedisplaysize" value="-1">
 <param name="autorewind" value="0">
 <param name="balance" value="0">
 <!--左右声道平衡,最左-9640,最右9640-->
 <param name="baseurl" value>
 <param name="bufferingtime" value="15">
 <!--缓冲时间-->
 <param name="captioningid" value>
 <param name="clicktoplay" value="-1">
 <param name="cursortype" value="0">
 <param name="currentposition" value="0">
 <!--当前播放进度 -1 表示不变,0表示开头 单位是秒,比如10表示从第10秒处开始播放,值必须是-1.0或大于等于0-->
 <param name="currentmarker" value="0">
 <param name="defaultframe" value>
 <param name="displaybackcolor" value="0">
 <param name="displayforecolor" value="16777215">
 <param name="displaymode" value="0">
 <param name="displaysize" value="0">
 <!--视频1-50%, 0-100%, 2-200%,3-全屏 其它的值作0处理,小数则采用四舍五入然后按前的处理-->
 <param name="enabled" value="-1">
 <param name="enablecontextmenu" value="-1">
 <!-是否用右键弹出菜单控制-->
 <param name="enablepositioncontrols" value="-1">
 <param name="enablefullscreencontrols" value="-1">
 <param name="enabletracker" value="-1">
 <!--是否允许拉动播放进度条到任意地方播放-->
 <param name="filename" value="/blog/01.wma" valuetype="ref">
 <!--播放的文件地址-->
 <param name="invokeurls" value="-1">
 <param name="language" value="-1">
 <param name="mute" value="0">
 <!--是否静音-->
 <param name="playcount" value="10">
 <!--重复播放次数,0为始终重复-->
 <param name="previewmode" value="-1">
 <param name="rate" value="1">
 <!--播放速率控制,1为正常,允许小数-->
 <param name="samistyle" value>
 <!--sami样式-->
 <param name="samilang" value>
 <!--sami语言-->
 <param name="samifilename" value>
 <!--字幕id-->
 <param name="selectionstart" value="-1">
 <param name="selectionend" value="-1">
 <param name="sendopenstatechangeevents" value="-1">
 <param name="sendwarningevents" value="-1">
 <param name="senderrorevents" value="-1">
 <param name="sendkeyboardevents" value="0">
 <param name="sendmouseclickevents" value="0">
 <param name="sendmousemoveevents" value="0">
 <param name="sendplaystatechangeevents" value="-1">
 <param name="showcaptioning" value="0">
 <!--是否显示字幕,为一块黑色,下面会有一大块黑色,一般不显示-->
 <param name="showcontrols" value="-1">
 <!--是否显示控制,比如播放,停止,暂停-->
 <param name="showaudiocontrols" value="-1">
 <!--是否显示音量控制-->
 <param name="showdisplay" value="0">
 <!--显示节目信息,比如版权等-->
 <param name="showgotobar" value="0">
 <!--是否启用上下文菜单-->
 <param name="showpositioncontrols" value="-1">
 <!--是否显示往前往后及列表,如果显示一般也都是灰色不可控制-->
 <param name="showstatusbar" value="-1">
 <!--当前播放信息,显示是否正在播放,及总播放时间和当前播放到的时间-->
 <param name="showtracker" value="-1">
 <!--是否显示当前播放跟踪条,即当前的播放进度条-->
 <param name="transparentatstart" value="-1">
 <param name="videoborderwidth" value="0">
 <!--显示部的宽部,如果小于视频宽,则最小为视频宽,或者加大到指定值,并自动加大高度.此改变只改变四周的黑框大小,不改变视频大小-->
 <param name="videobordercolor" value="0">
 <!--显示黑色框的颜色, 为rgb值,比如ffff00为黄色-->
 <param name="videoborder3d" value="0">
 <param name="volume" value="0">
 <!--音量大小,负值表示是当前音量的减值,值自动会取绝对值,最大为0,最小为-9640-->
 <param name="windowlessvideo" value="0">
 <!--如果是0可以允许全屏,否则只能在窗口中查看-->
</object>
上面的这个播放器是老式的那种,6.4版本!新式播放器是在mediaplayer9.0以后出现的,也就是说只有装了9.0或9.0以上的播放器才能正常使用的。

-------------------------------------------------------------------------------

下面是新式播放器代码,相对以前的来说要简单很多:<object id="player" height="64" width="260" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6">
 <param name="autostart" value="-1">
 <!--是否自动播放-->
 <param name="balance" value="0">
 <!--调整左右声道平衡,同上面旧播放器代码-->
 <param name="enabled" value="-1">
 <!--播放器是否可人为控制-->
 <param name="enablecontextmenu" value="-1">
 <!--是否启用上下文菜单-->
 <param name="url" value="/blog/1.wma">
 <!--播放的文件地址-->
 <param name="playcount" value="1">
 <!--播放次数控制,为整数-->
 <param name="rate" value="1">
 <!--播放速率控制,1为正常,允许小数,1.0-2.0-->
 <param name="currentposition" value="0">
 <!--控件设置:当前位置-->
 <param name="currentmarker" value="0">
 <!--控件设置:当前标记-->
 <param name="defaultframe" value="">
 <!--显示默认框架-->
 <param name="invokeurls" value="0">
 <!--脚本命令设置:是否调用url-->
 <param name="baseurl" value="">
 <!--脚本命令设置:被调用的url-->
 <param name="stretchtofit" value="0">
 <!--是否按比例伸展-->
 <param name="volume" value="50">
 <!--默认声音大小0%-100%,50则为50%-->
 <param name="mute" value="0">
 <!--是否静音-->
 <param name="uimode" value="mini">
 <!--播放器显示模式:full显示全部;mini最简化;none不显示播放控制,只显示视频窗口;invisible全部不显示-->
 <param name="windowlessvideo" value="0">
 <!--如果是0可以允许全屏,否则只能在窗口中查看-->
 <param name="fullscreen" value="0">
 <!--开始播放是否自动全屏-->
 <param name="enableerrordialogs" value="-1">
 <!--是否启用错误提示报告-->
 <param name="samistyle" value>
 <!--sami样式-->
 <param name="samilang" value>
 <!--sami语言-->
 <param name="samifilename" value>
 <!--字幕id-->
</object>
real player 网页播放器 参数含义

参数:autostart 属性:true或是false 作用:指定是否自动播放指定的源文件 
参数:backgroundcolor 属性:任何用符号“#”开头的16进制数值或是任何预定义的颜色作用:指定图像窗口的背景颜色 
参数:center 属性:true或是false 作用:指定片断使用初始编码大小播放,并且在图像窗口的中央。 
参数:classid 属性:"clsid:cfcdaa03-8be4-1lcf-b84b0020afbbccfa:** 作用:用于指定activex控件的唯一的字符串标示,可以认出嵌入的realpalyer播放器。 
参数:console 属性:任何字符串作用:可以将各种不同的realplayer控制聚集在网页上,这样它们可以交互使用或是保持独立,而且互相不影响 
参数:controls 属性:imagewindow,all,controlpanel,plavbutton,playonlybutton, pausebutton,stopbutton,ffctrl,rwctrl,mutectrl,mutevolume,volumeslider,positionslider,tacctrl,homectrl,infovolumepanel,infopanel,statusbar,statusfield,positionfield 作用:可以让你指定那些控制是可见的。 
参数:height 属性:任何整数值作用:指定realplayer元素的高度,单位:像素 
参数:id 属性:任何字符串作用:为标签中的realplayer元素指定名字。 
参数:imagestatus 属性:true或是false 作用:指定是否在图像窗口中显示状态信息,默认值是true 
参数:loop 属性:true或是false 作用:可以让你指定片断是否无限循环 
参数:maintainaspect 属性:true或是false 作用:默认realplayer拉伸所有的片断来充满整个图像窗口。 
参数:name 属性:任何字符串作用:为标签中的realplayer元素指定名字(在标签中使用id) 
参数:nojava 属性:true或是false 作用:避免启动java虚拟机 
参数:nolabels 属性:true或是false 作用:可以禁止显示标题或是版权信息(realplayer5.0以上时,它是垃圾...) 
参数:nologo 属性:true或是false 作用:避免realplayer启动时在图像窗口中显示 
参数:numloop 属性:任何整数值作用:让你能够指定文件片循环的次数,不需要参数loop 
参数:prefetch 属性:true或是false 作用:指定在播放前,realplayer是否可以获得流描述信息,默认值是false 
参数:region 属性:任何字符串作用:同smil一起使用。允许你指定使用html代替smil 
参数:scriptcallbacks 属性:用逗号分割的列表作用:指定浏览器的回调监控(好高级的东东!) 
参数:shuffle 属性:true或是false 作用:同多文件片的ram文件或是smil文件一起使用。可以让realplayer随机播放列表中的文件 
参数:src 属性:任何合法的相对或是完整的url 作用:指定播放的文件或是源文件的地址 
参数:type 属性:字符串作用:为嵌入插件指定mime类型 
参数:width 属性:任何整数值作用:指定realplayer元素的宽度

controls的属性含义... 

组件:imagewindow
作用:视频显示区域

组件:all
作用:嵌入realplaver的所有按钮、滑动条和信息面板

组件:controlpanel 
作用:显示所有的控制按钮,以及位置滑动条和扬声器图标,和调节声音大小的滑动条

组件:playbutton
作用:显示播放(play)按钮和暂停(pause)按钮

组件:playonlybutton
作用:仅显示播放按钮

组件:pausebutton
作用:仅显示暂停按钮

组件:stopbutton
作用:仅显示停止(stop)按钮

组件:ffctrl
作用:仅显示快进(fastforward)按钮

组件:rwctrl 
作用:仅显示回放(rewind)按钮

组件:mutectrl
作用:仅显示扬声器图标,用作静音按钮

组件:mutevolume
作用:显示小的扬声器图标(用于静音)和其上的用于调节音量的滑动条

组件:volumeslider
作用:仅显示竖直的音量滑动条

组件:positionslider
作用:显示水平的位置滑动条

组件:tacctrl
作用:显示水平的消息框,轮流显示标题、作者以及版权信息

组件:homectrl
作用:显示小的real标识

组件:infovolumepanel 
作用:显示黑的消息框,用绿色显示标题、作者以及版权信息,在右手方有扬声器图标和声音调节滑动条

组件:infopanel
作用:同上面一样,但是没有静音按钮和声音调节滑动条

组件:statusbar 
作用:显示水平的消息框,显示片断信息,比如片断的时间,网络状况等等

组件:statusfield 
作用:同statusbar类似,但是只显示消息区域,显示网络消息,比如显示“re-buffenng...”

组件:positionfield 
作用:小的黑的消息框,显示整个文件片断长度以及当前帧在片内的位置

嵌入realone播放器<object id="rplayer" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" height="100%" width="100%">
<param name="_extentx" value="23627">
<param name="_extenty" value="15187">
<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://www.blogerhome.com/address.asp?num=24009987&id=10019">
<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>
嵌入mediaplayer播放器
<object id="mediaplayer" width="478" height="300" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.
cab#version=6,1,5,217" type="application/x-oleobject" standby="loading microsoft windows media player components..." classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" viewastext>
<param name="displaybackcolor" value="0">
<param name="displayforecolor" value="16777215">
<param name="displaymode" value="0">
<param name="displaysize" value="-1">
<param name="filename" value="mms://www.webjx.com/视频文件.wmv">
<!-- 此处设置播放的视频连接 -->
<param name="showcontrols" value="0">
</object>

realplayer的一些函数、方法和过程

这是 real player activex control library (version 1.0) 的所有函数与方法,有兴趣可以研究一下。

function getsource: widestring;
procedure setsource(const lpsznewvalue: widestring);
function getconsole: widestring;
procedure setconsole(const lpsznewvalue: widestring);
function getcontrols: widestring;
procedure setcontrols(const lpsznewvalue: widestring);
function getnolabels: wordbool;
procedure setnolabels(bnewvalue: wordbool);
function getautostart: wordbool;
procedure setautostart(bnewvalue: wordbool);
function getautogotourl: wordbool;
procedure setautogotourl(bnewvalue: wordbool);
function getvolume: smallint;
procedure setvolume(nvol: smallint);
function getmute: wordbool;
procedure setmute(bmute: wordbool);
function getloop: wordbool;
procedure setloop(bval: wordbool);
function getimagestatus: wordbool;
procedure setimagestatus(benable: wordbool);
function getpacketstotal: integer;
function getpacketsreceived: integer;
function getpacketsoutoforder: integer;
function getpacketsmissing: integer;
function getpacketsearly: integer;
function getpacketslate: integer;
function getbandwidthaverage: integer;
function getbandwidthcurrent: integer;
procedure doplaypause;
procedure dostop;
procedure donextitem;
procedure doprevitem;
function canplaypause: wordbool;
function canstop: wordbool;
function hasnextitem: wordbool;
function hasprevitem: wordbool;
function hasnextentry: wordbool;
function haspreventry: wordbool;
procedure donextentry;
procedure dopreventry;
procedure aboutbox;
procedure editpreferences;
procedure hideshowstatistics;
function isstatisticsvisible: wordbool;
procedure dogotourl(const url: widestring; const target: widestring);
procedure doplay;
procedure dopause;
function getposition: integer;
function getplaystate: integer;
function getlength: integer;
function gettitle: widestring;
function getauthor: widestring;
function getcopyright: widestring;
function getclipwidth: integer;
function getclipheight: integer;
function canplay: wordbool;
function canpause: wordbool;
procedure setposition(lposition: integer);
function getnumloop: integer;
procedure setnumloop(lval: integer);
function getcenter: wordbool;
procedure setcenter(bval: wordbool);
function getnologo: wordbool;
procedure setnologo(bval: wordbool);
function getmaintainaspect: wordbool;
procedure setmaintainaspect(bval: wordbool);
function getbackgroundcolor: widestring;
procedure setbackgroundcolor(const pval: widestring);
function getstereostate: wordbool;
function getlivestate: wordbool;
function getshowstatistics: wordbool;
procedure setshowstatistics(bval: wordbool);
function getshowpreferences: wordbool;
procedure setshowpreferences(bval: wordbool);
function getshowabout: wordbool;
procedure setshowabout(bval: wordbool);
function getoriginalsize: wordbool;
procedure setoriginalsize;
function getdoublesize: wordbool;
procedure setdoublesize;
function getfullscreen: wordbool;
procedure setfullscreen;
function getenablecontextmenu: wordbool;
procedure setenablecontextmenu(bval: wordbool);
function getenableoriginalsize: wordbool;
procedure setenableoriginalsize(bval: wordbool);
function getenabledoublesize: wordbool;
procedure setenabledoublesize(bval: wordbool);
function getenablefullscreen: wordbool;
procedure setenablefullscreen(bval: wordbool);
function getenablemessagebox: wordbool;
procedure setenablemessagebox(bval: wordbool);
procedure settitle(const pval: widestring);
procedure setauthor(const pval: widestring);
procedure setcopyright(const pval: widestring);
function getwantkeyboardevents: wordbool;
procedure setwantkeyboardevents(bwantsevents: wordbool);
function getwantmouseevents: wordbool;
procedure setwantmouseevents(bwantsevents: wordbool);
function getnumentries: smallint;
function getcurrententry: smallint;
function getentrytitle(uentryindex: smallint): widestring;
function getentryauthor(uentryindex: smallint): widestring;
function getentrycopyright(uentryindex: smallint): widestring;
function getentryabstract(uentryindex: smallint): widestring;
procedure setcanseek(bcanseek: wordbool);
function getcanseek: wordbool;
function getbufferingtimeelapsed: integer;
function getbufferingtimeremaining: integer;
function getconnectionbandwidth: integer;
function getpreferedlanguagestring: widestring;
function getpreferedlanguageid: integer;
function getusercountryid: integer;
function getnumsources: smallint;
function getsourcetransport(nsourcenum: smallint): widestring;
function getwanterrors: wordbool;
procedure setwanterrors(bval: wordbool);
function getshuffle: wordbool;
procedure setshuffle(bval: wordbool);
function getversioninfo: widestring;
function getlastmessage: widestring;
function getlasterrorseverity: integer;
function getlasterrorrmacode: integer;
function getlasterrorusercode: integer;
function getlasterroruserstring: widestring;
function getlasterrormoreinfourl: widestring;
procedure setprefetch(bval: wordbool);
function getprefetch: wordbool;
procedure setregion(const pval: widestring);
function getregion: widestring;
function getisplus: wordbool;
function getconsoleevents: wordbool;
procedure setconsoleevents(bval: wordbool);
function getdrminfo(const pval: widestring): widestring;
property controlinterface: irealaudio read getcontrolinterface;
property defaultinterface: irealaudio read getcontrolinterface;
全屏:

1、media player全屏方法

 <script language="javascript">
 <!--

 var real;
 real='mediaplayer1.';
 var mute=false;
 var cansetpos=true;
 var setposstart=false;
 var setvolstart=false;
 var loop, timer, initialised;
 var speed=50;
 var oldwidth=566,oldheight=502;

 function dofull()
 {
 eval(real+'displaysize=3');
 }

netshowserver = "" ;

var mpath = netshowserver + "";

function loadvideo(c1,c2) {
 if (c1=="") return;
 video_filename = c1;

 musicplayer.cancel()
 timer=window.settimeout("video_play()",2000)
}
function video_play(fn) {
 var mname = mpath + video_filename;
 musicplayer.open(mname)
}
 //-->
 </script>
 <td width="39%" height="1" bgcolor="#e0e0e0">
 <input type="button" onmousedown="dofull()" value="全屏显示" style="border-style: ridge; border-width: 1">
 <span lang="en-us">esc</span>返回</td>
 </tr>
 </table>
 </td>
 </tr>
 <tr>
 <td width="100%">
 <p align="center">

 <object id=mediaplayer1 classid=clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95 width=468 height=358>
 <param name="filename" value=/film/play.asp>
 <param name="autostart" value="-1">
 <param name="enabled" value="-1">
 <param name="showcontrols" value="-1">
 <param name="showgotobar" value="0">
 <param name="showstatusbar" value="-1">
 <param name="enablefullscreencontrols" value="0">
 <param name="enablepositioncontrols" value="0">
 <param name="volume" value="0">
 <param name="displaysize" value="4">
 <param name="senderrorevents" value="0">
 <param name="enablecontextmenu" value="0">
 <param name="enabletracker" value="-1">
 <param name="audiostream" value="-1">
 <param name="autosize" value="0">
 <param name="animationatstart" value="-1">
 <param name="allowscan" value="-1">
 <param name="allowchangedisplaysize" value="-1">
 <param name="autorewind" value="0">
 <param name="balance" value="0">
 <param name="baseurl" value>
 <param name="bufferingtime" value="5">
 <param name="captioningid" value>
 <param name="clicktoplay" value="-1">
 <param name="cursortype" value="0">
 <param name="currentposition" value="-1">
 <param name="currentmarker" value="0">
 <param name="defaultframe" value>
 <param name="displaybackcolor" value="0">
 <param name="displayforecolor" value="16777215">
 <param name="displaymode" value="0">
 <param name="invokeurls" value="-1">
 <param name="language" value="-1">
 <param name="mute" value="0">
 <param name="playcount" value="1">
 <param name="previewmode" value="0">
 <param name="rate" value="1">
 <param name="samilang" value>
 <param name="samistyle" value>
 <param name="samifilename" value>
 <param name="selectionstart" value="-1">
 <param name="selectionend" value="-1">
 <param name="sendopenstatechangeevents" value="-1">
 <param name="sendwarningevents" value="-1">
 <param name="sendkeyboardevents" value="0">
 <param name="sendmouseclickevents" value="0">
 <param name="sendmousemoveevents" value="0">
 <param name="sendplaystatechangeevents" value="-1">
 <param name="showcaptioning" value="0">
 <param name="showaudiocontrols" value="-1">
 <param name="showdisplay" value="0">
 <param name="showpositioncontrols" value="-1">
 <param name="showtracker" value="-1">
 <param name="transparentatstart" value="0">
 <param name="videoborderwidth" value="0">
 <param name="videobordercolor" value="0">
 <param name="videoborder3d" value="0">
 <param name="windowlessvideo" value="0">
 </object>

 </td>
 </tr>
 </table>还有一种我在网上找的,没有用,不过楼主好像说功能好用,呵呵。
<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1" width="580" height="435">
<param name="audiostream" value="-1">
<param name="autosize" value="0">
<param name="autostart" value="-1">
<param name="animationatstart" value="-1">
<param name="allowscan" value="-1">
<param name="allowchangedisplaysize" value="-1">
<param name="autorewind" value="0">
<param name="balance" value="0">
<param name="baseurl" value>
<param name="bufferingtime" value="5">
<param name="captioningid" value>
<param name="clicktoplay" value="-1">
<param name="cursortype" value="0">
<param name="currentposition" value="-1">
<param name="currentmarker" value="0">
<param name="defaultframe" value>
<param name="displaybackcolor" value="0">
<param name="displayforecolor" value="16777215">
<param name="displaymode" value="0">
<param name="displaysize" value="2">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="-1">
<param name="enablepositioncontrols" value="-1">
<param name="enablefullscreencontrols" value="0">
<param name="enabletracker" value="-1">
<param name="filename" value="http://www.blogerhome.com/videos/刘德华-缺憾美.mpg">
<param name="invokeurls" value="-1">
<param name="language" value="-1">
<param name="mute" value="0">
<param name="playcount" value="1">
<param name="previewmode" value="0">
<param name="rate" value="1">
<param name="samilang" value>
<param name="samistyle" value>
<param name="samifilename" value>
<param name="selectionstart" value="-1">
<param name="selectionend" value="-1">
<param name="sendopenstatechangeevents" value="-1">
<param name="sendwarningevents" value="-1">
<param name="senderrorevents" value="-1">
<param name="sendkeyboardevents" value="0">
<param name="sendmouseclickevents" value="0">
<param name="sendmousemoveevents" value="0">
<param name="sendplaystatechangeevents" value="-1">
<param name="showcaptioning" value="0">
<param name="showcontrols" value="-1">
<param name="showaudiocontrols" value="-1">
<param name="showdisplay" value="0">
<param name="showgotobar" value="0">
<param name="showpositioncontrols" value="-1">
<param name="showstatusbar" value="-1">
<param name="showtracker" value="-1">
<param name="transparentatstart" value="0">
<param name="videoborderwidth" value="0">
<param name="videobordercolor" value="0">
<param name="videoborder3d" value="0">
<param name="volume" value="-40">
<param name="windowlessvideo" value="0">
</object>
这个功能比较完整,支持原有的快捷键以及右键菜单

 2、real player全屏的方法一

realplayer播放4(带视频)
<script language=javascript>
real='document.raocx.'
function doplay()
{eval(real+'doplay()');}
function dostop()
{eval(real+'dostop()');}
function doplaypause()
{eval(real+'doplaypause()');}
function setfullscreen()
{
eval(real+'setfullscreen()');
fullscreen=true;
doplaypause();
doplay();
}
function getfullscreen()
{
if(eval(real+'getfullscreen()'))
return true;
else
return false;
}
</script>

<object classid=clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa class=object id=raocx width=376 height=248>
<param name=src value="../upload/<%=rsp("path")%>">
<param name=console value=clip1>
<param name=controls value=imagewindow>
<param name=autostart value=true></object><br/>
<object classid=clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa height=24 id=video2 width=376>
<param name=src value="../upload/<%=rsp("path")%>">
<param name=autostart value=-1>
<param name=controls value=controlpanel>
<param name=console value=clip1></object>

<a href="#" title="全屏幕欣赏,按esc键还原。" style="cursor: hand" onclick=setfullscreen()>□全屏播放□</a>

 3、real player全屏的方法二 

<html>
<head>
<title>在线播放</title>
<script>
<!--
function bookmarkit(){window.external.addfavorite('http://lipingtao.jblog.cn/','魔幻天空')} 
//-->
</script>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#000000" scroll="no" oncontextmenu="window.event.returnvalue=false" ondragstart="window.event.returnvalue=false" onselectstart="event.returnvalue=false">
<script language="javascript">
<!-- begin
var ap_name = navigator.appname;
var ap_vinfo = navigator.appversion;
var ap_ver = parsefloat(ap_vinfo.substring(0,ap_vinfo.indexof('(')));

var time_start = new date();
var clock_start = time_start.gettime();
var dl_ok=false;

function init ()
{
if(ap_name=="netscape" && ap_ver>=3.0)
dl_ok=true;
return true;
}

function get_time_spent ()
{
var time_now = new date();
return((time_now.gettime() - clock_start)/1000);
}

function show_secs () 
{
var i_total_secs = math.round(get_time_spent());
var i_secs_spent = i_total_secs % 60;
var i_mins_spent = math.round((i_total_secs-30)/60);
var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent);
var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent);
document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;
window.settimeout('show_secs()',1000);
}
init();
window.settimeout('show_secs()',1);
// end -->
 </script>
<center>
<p></p>
</center>
<div align="center">
 <center>
 <table border="0" cellspacing="0" width="337" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
 <tr>
 <td width="100%">
 <table border="0" cellspacing="0" style="border-collapse: collapse" width="108%" id="autonumber1" bgcolor="#f0f0f0" cellpadding="0">
 <tr>
 <td width="55%" height="1" bgcolor="#e0e0e0">
 <p align="left"> <font size="2">谢谢你的访问!!!!!</font></td>
 <form name="fm0" onsubmit="0">
 <td width="7%" height="1" bgcolor="#e0e0e0">
 <input type="text" name="time_spent" size="5" onfocus="this.blur()" style="border-style: groove; border-width: 1; background-color: #eeeeee"></td>
 </form>
 <script language="javascript">
 <!--

 var real;
 real='document.rp1.';
 var mute=false;
 var cansetpos=true;
 var setposstart=false;
 var setvolstart=false;
 var loop, timer, initialised;
 var speed=50;
 var oldwidth=566,oldheight=502;

 function dofull()
{//全屏播放
eval(real+'setfullscreen()');
}

 

netshowserver = "" ;

var mpath = netshowserver + "";

function loadvideo(c1,c2) {
 if (c1=="") return;
 video_filename = c1;

 musicplayer.cancel()
 timer=window.settimeout("video_play()",2000)
}
function video_play(fn) {
 var mname = mpath + video_filename;
 musicplayer.open(mname)
}
 //-->
 </script>
 <td width="38%" height="1" bgcolor="#e0e0e0">
 <input type="button" onmousedown="dofull()" value="全屏显示" style="border-style: ridge; border-width: 1">
 <span lang="en-us"><font size="2">esc</font></span><font size="2">返回</font></td>
 </tr>
 </table>
 </td>
 </tr>
 <tr>
 <td width="100%"> <p align="center"> 
 <object id="rp1" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width=468 height=358>
 <param name="_extentx" value="4445"> 
<param name="_extenty" value="3334"> 
<param name="autostart" value="-1"> 
<param name="shuffle" value="0"> 
<param name="prefetch" value="0"> 
<param name="nolabels" value="-1"> 
<param name="src" value="rtsp://61.177.95.61:554/ent/2005/promise_1104.rm"> 
<param name="controls" value="imagewindow,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"><embed src="rtsp://61.177.95.61:554/ent/2005/promise_1104.rm" type="audio/x-pn-realaudio-plugin"> 
</object>
 </td>
 </tr>
 </table>
 </center>
</div>
</body>
</html>4、real player全屏的方法三

如果是realone要全屏只要head加入以下这段js代码<script>
function setfull()
{
if(!document.playfull.canstop())
{
alert("影片未开始播放无法切换为全屏模式")
}
else
{
alert("点击确定按钮后进入全屏播放模式,在全屏播放模式中按 esc 键退出全屏模式")
document.playfull.setfullscreen()
}
}
//-->
</script>在body入面
<a href="#" onclick="setfull();">全屏</a> 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网