0
点赞
收藏
分享

微信扫一扫

如何在页面中插入播放器

下面以Windows Media Player和Real Player为例讲解如何在页面中插入播放器: 


插入Windows Media Player:

ID:6BF52A52-394A-11d3-B153-00C04F79FAA6

插入real:

<object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA/>


----------例子---------------


<object id="MediaPlayer" height="40" width="150"

classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>


//播放文件的地址

<param name="URL" value=http://歌曲地址.asx>


//指定流文件播放的速度,负数表示反向播放。

//当该值不是1时,ASF和 WMV文件在播放时会静音

//一般取值在-10到10

<param name="rate" value="1">


//介于-100和100的整数作用:指定平衡左右扬声器

<param name="balance" value="0">


//当前所在播放位置,单位:秒

<param name="currentPosition" value="0">


//指定流文件播放的次数

<param name="playCount" value="1">


//是否自动播放

<param name="autoStart" value="-1">

MediaPlayer播放器的例子:



<object id="MediaPlayer" height="150" width="150" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>


//播放文件的地址

<param name="URL" value="http://www.80sfm.com/asx/80sasx.asx">


//指定流文件播放的速度,负数表示反向播放。

//当该值不是1时,ASF和 WMV文件在播放时会静音

//一般取值在-10到10

<param name="rate" value="1">


//介于-100和100的整数作用:指定平衡左右扬声器

<param name="balance" value="0">


//当前所在播放位置,单位:秒

<param name="currentPosition" value="0">


//指定流文件播放的次数

<param name="playCount" value="1">


//是否自动播放

<param name="autoStart" value="-1">


<param name="currentMarker" value="0">


//指定URL路径是否启动浏览器打开

<param name="invokeURLs" value="-1">


//0到100的任何数值,指定音量大小

<param name="volume" value="50">


//指定音频是否静音

<param name="mute" value="0">


//None,mini,或full,指定Windows媒体播放器控制如何显示

<param name="uiMode" value="mini">


<param name="stretchToFit" value="0">


<param name="windowlessVideo" value="0">


//指定是否让播放器有效

<param name="enabled" value="-1">


//指定是否使右键菜单有效

<param name="enableContextMenu" value="0">


//指定是否采用全屏模式播放流文件内容

<param name="fullScreen" value="0">

</object>

在网页中插入播放器代码属性表:



<object id="MediaPlayer" height="40" width="150"

classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //播放文件的地址

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="URL" value=http://歌曲地址.asx>

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定流文件播放的速度,负数表示反向播放。

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //当该值不是1时,ASF和 WMV文件在播放时会静音

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //一般取值在-10到10

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="rate" value="1">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //介于-100和100的整数作用:指定平衡左右扬声器

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="balance" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //当前所在播放位置,单位:秒

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="currentPosition" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定流文件播放的次数

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="playCount" value="1">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //是否自动播放

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="autoStart" value="-1">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="currentMarker" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定URL路径是否启动浏览器打开

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="invokeURLs" value="-1">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //0到100的任何数值,指定音量大小

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="volume" value="50">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定音频是否静音

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="mute" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //None,mini,或full,指定Windows媒体播放器控制如何显示

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="uiMode" value="mini">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="stretchToFit" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="windowlessVideo" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定是否让播放器有效

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="enabled" value="-1">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定是否使右键菜单有效

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="enableContextMenu" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> //指定是否采用全屏模式播放流文件内容

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"> <param name="fullScreen" value="0">

javascript:if(this.width>screen.width-600)this.style.width=screen.width-600;"></object>

举报

相关推荐

0 条评论