網(wǎng)頁(yè)播放器的參數(shù)含義 Windows Media Player 網(wǎng)頁(yè)播放器 參數(shù)含義
(默認(rèn)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">
<!--是否自動(dòng)調(diào)整播放大小-->
<param name="AutoStart" value="-1">
<!--是否自動(dòng)播放-->
<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">
<!--緩沖時(shí)間-->
<param name="CaptioningID" value>
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="0">
<!--當(dāng)前播放進(jìn)度 -1 表示不變,0表示開(kāi)頭 單位是秒,比如10表示從第10秒處開(kāi)始播放,值必須是-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處理,小數(shù)則采用四舍五入然后按前的處理-->
<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">
<!--是否允許拉動(dòng)播放進(jìn)度條到任意地方播放-->
<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">
<!--重復(fù)播放次數(shù),0為始終重復(fù)-->
<param name="PreviewMode" value="-1">
<param name="Rate" value="1">
<!--播放速率控制,1為正常,允許小數(shù)-->
<param name="SAMIStyle" value>
<!--SAMI樣式-->
<param name="SAMILang" value>
<!--SAMI語(yǔ)言-->
<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">
<!--是否顯示字幕,為一塊黑色,下面會(huì)有一大塊黑色,一般不顯示-->
<param name="ShowControls" value="-1">
<!--是否顯示控制,比如播放,停止,暫停-->
<param name="ShowAudioControls" value="-1">
<!--是否顯示音量控制-->
<param name="ShowDisplay" value="0">
<!--顯示節(jié)目信息,比如版權(quán)等-->
<param name="ShowGotoBar" value="0">
<!--是否啟用上下文菜單-->
<param name="ShowPositionControls" value="-1">
<!--是否顯示往前往后及列表,如果顯示一般也都是灰色不可控制-->
<param name="ShowStatusBar" value="-1">
<!--當(dāng)前播放信息,顯示是否正在播放,及總播放時(shí)間和當(dāng)前播放到的時(shí)間-->
<param name="ShowTracker" value="-1">
<!--是否顯示當(dāng)前播放跟蹤條,即當(dāng)前的播放進(jìn)度條-->
<param name="TransparentAtStart" value="-1">
<param name="VideoBorderWidth" value="0">
<!--顯示部的寬部,如果小于視頻寬,則最小為視頻寬,或者加大到指定值,并自動(dòng)加大高度.此改變只改變四周的黑框大小,不改變視頻大小-->
<param name="VideoBorderColor" value="0">
<!--顯示黑色框的顏色, 為RGB值,比如ffff00為黃色-->
<param name="VideoBorder3D" value="0">
<param name="Volume" value="0">
<!--音量大小,負(fù)值表示是當(dāng)前音量的減值,值自動(dòng)會(huì)取絕對(duì)值,最大為0,最小為-9640-->
<param name="WindowlessVideo" value="0">
<!--如果是0可以允許全屏,否則只能在窗口中查看-->
</object>
上面的這個(gè)播放器是老式的那種,6.4版本!新式播放器是在MediaPlayer9.0以后出現(xiàn)的,也就是說(shuō)只有裝了9.0或9.0以上的播放器才能正常使用的。
-------------------------------------------------------------------------------
下面是新式播放器代碼,相對(duì)以前的來(lái)說(shuō)要簡(jiǎn)單很多:<object id="player" height="64" width="260" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param NAME="AutoStart" VALUE="-1">
<!--是否自動(dòng)播放-->
<param NAME="Balance" VALUE="0">
<!--調(diào)整左右聲道平衡,同上面舊播放器代碼-->
<param name="enabled" value="-1">
<!--播放器是否可人為控制-->
<param NAME="EnableContextMenu" VALUE="-1">
<!--是否啟用上下文菜單-->
<param NAME="url" value="/blog/1.wma">
<!--播放的文件地址-->
<param NAME="PlayCount" VALUE="1">
<!--播放次數(shù)控制,為整數(shù)-->
<param name="rate" value="1">
<!--播放速率控制,1為正常,允許小數(shù),1.0-2.0-->
<param name="currentPosition" value="0">
<!--控件設(shè)置:當(dāng)前位置-->
<param name="currentMarker" value="0">
<!--控件設(shè)置:當(dāng)前標(biāo)記-->
<param name="defaultFrame" value="">
<!--顯示默認(rèn)框架-->
<param name="invokeURLs" value="0">
<!--腳本命令設(shè)置:是否調(diào)用URL-->
<param name="baseURL" value="">
<!--腳本命令設(shè)置:被調(diào)用的URL-->
<param name="stretchToFit" value="0">
<!--是否按比例伸展-->
<param name="volume" value="50">
<!--默認(rèn)聲音大小0%-100%,50則為50%-->
<param name="mute" value="0">
<!--是否靜音-->
<param name="uiMode" value="mini">
<!--播放器顯示模式:Full顯示全部;mini最簡(jiǎn)化;None不顯示播放控制,只顯示視頻窗口;invisible全部不顯示-->
<param name="windowlessVideo" value="0">
<!--如果是0可以允許全屏,否則只能在窗口中查看-->
<param name="fullScreen" value="0">
<!--開(kāi)始播放是否自動(dòng)全屏-->
<param name="enableErrorDialogs" value="-1">
<!--是否啟用錯(cuò)誤提示報(bào)告-->
<param name="SAMIStyle" value>
<!--SAMI樣式-->
<param name="SAMILang" value>
<!--SAMI語(yǔ)言-->
<param name="SAMIFilename" value>
<!--字幕ID-->
</object>
Real Player 網(wǎng)頁(yè)播放器 參數(shù)含義
參數(shù):autostart 屬性:True或是False 作用:指定是否自動(dòng)播放指定的源文件
參數(shù):backgroundcolor 屬性:任何用符號(hào)“#”開(kāi)頭的16進(jìn)制數(shù)值或是任何預(yù)定義的顏色作用:指定圖像窗口的背景顏色
參數(shù):center 屬性:True或是False 作用:指定片斷使用初始編碼大小播放,并且在圖像窗口的中央。
參數(shù):classid 屬性:"clsid:CFCDAA03-8BE4-1lcf-B84B0020AFBBCCFA:** 作用:用于指定ActiveX控件的唯一的字符串標(biāo)示,可以認(rèn)出嵌入的RealPalyer播放器。
參數(shù):console 屬性:任何字符串作用:可以將各種不同的RealPlayer控制聚集在網(wǎng)頁(yè)上,這樣它們可以交互使用或是保持獨(dú)立,而且互相不影響
參數(shù):controls 屬性:ImageWindow,All,ControlPanel,PlavButton,PlayOnlyButton, PauseButton,StopButton,F(xiàn)FCtrl,RWCtrl,MuteCtrl,MuteVolume,VolumeSlider,PositionSlider,TACCtrl,HomeCtrl,InfoVolumePanel,InfoPanel,StatusBar,StatusField,PositionField 作用:可以讓你指定那些控制是可見(jiàn)的。
參數(shù):height 屬性:任何整數(shù)值作用:指定RealPlayer元素的高度,單位:像素
參數(shù):id 屬性:任何字符串作用:為標(biāo)簽中的RealPlayer元素指定名字。
參數(shù):imagestatus 屬性:True或是False 作用:指定是否在圖像窗口中顯示狀態(tài)信息,默認(rèn)值是true
參數(shù):loop 屬性:True或是False 作用:可以讓你指定片斷是否無(wú)限循環(huán)
參數(shù):maintainaspect 屬性:True或是False 作用:默認(rèn)RealPlayer拉伸所有的片斷來(lái)充滿整個(gè)圖像窗口。
參數(shù):name 屬性:任何字符串作用:為標(biāo)簽中的RealPlayer元素指定名字(在標(biāo)簽中使用id)
參數(shù):nojava 屬性:True或是False 作用:避免啟動(dòng)Java虛擬機(jī)
參數(shù):nolabels 屬性:True或是False 作用:可以禁止顯示標(biāo)題或是版權(quán)信息(realplayer5.0以上時(shí),它是垃圾...)
參數(shù):nologo 屬性:True或是False 作用:避免RealPlayer啟動(dòng)時(shí)在圖像窗口中顯示
參數(shù):numloop 屬性:任何整數(shù)值作用:讓你能夠指定文件片循環(huán)的次數(shù),不需要參數(shù)loop
參數(shù):prefetch 屬性:True或是False 作用:指定在播放前,RealPlayer是否可以獲得流描述信息,默認(rèn)值是False
參數(shù):region 屬性:任何字符串作用:同SMIL一起使用。允許你指定使用HTML代替SMIL
參數(shù):scriptcallbacks 屬性:用逗號(hào)分割的列表作用:指定瀏覽器的回調(diào)監(jiān)控(好高級(jí)的東東!)
參數(shù):shuffle 屬性:True或是False 作用:同多文件片的ram文件或是SMIL文件一起使用??梢宰孯ealPlayer隨機(jī)播放列表中的文件
參數(shù):src 屬性:任何合法的相對(duì)或是完整的URL 作用:指定播放的文件或是源文件的地址
參數(shù):type 屬性:字符串作用:為嵌入插件指定MIME類型
參數(shù):width 屬性:任何整數(shù)值作用:指定RealPlayer元素的寬度
controls的屬性含義...
組件:imagewindow
作用:視頻顯示區(qū)域
組件:All
作用:嵌入RealPlaver的所有按鈕、滑動(dòng)條和信息面板
組件:ControlPanel
作用:顯示所有的控制按鈕,以及位置滑動(dòng)條和揚(yáng)聲器圖標(biāo),和調(diào)節(jié)聲音大小的滑動(dòng)條
組件:PlayButton
作用:顯示播放(play)按鈕和暫停(pause)按鈕
組件:PlayOnlyButton
作用:僅顯示播放按鈕
組件:PauseButton
作用:僅顯示暫停按鈕
組件:StopButton
作用:僅顯示停止(stop)按鈕
組件:FFCtrl
作用:僅顯示快進(jìn)(fastforward)按鈕
組件:RWCtrl
作用:僅顯示回放(rewind)按鈕
組件:MuteCtrl
作用:僅顯示揚(yáng)聲器圖標(biāo),用作靜音按鈕
組件:MuteVolume
作用:顯示小的揚(yáng)聲器圖標(biāo)(用于靜音)和其上的用于調(diào)節(jié)音量的滑動(dòng)條
組件:VolumeSlider
作用:僅顯示豎直的音量滑動(dòng)條
組件:PositionSlider
作用:顯示水平的位置滑動(dòng)條
組件:tacctrl
作用:顯示水平的消息框,輪流顯示標(biāo)題、作者以及版權(quán)信息
組件:HomeCtrl
作用:顯示小的Real標(biāo)識(shí)
組件:infoVolumePanel
作用:顯示黑的消息框,用綠色顯示標(biāo)題、作者以及版權(quán)信息,在右手方有揚(yáng)聲器圖標(biāo)和聲音調(diào)節(jié)滑動(dòng)條
組件:infoPanel
作用:同上面一樣,但是沒(méi)有靜音按鈕和聲音調(diào)節(jié)滑動(dòng)條
組件:StatusBar
作用:顯示水平的消息框,顯示片斷信息,比如片斷的時(shí)間,網(wǎng)絡(luò)狀況等等
組件:StatusField
作用:同StatusBar類似,但是只顯示消息區(qū)域,顯示網(wǎng)絡(luò)消息,比如顯示“Re-buffenng...”
組件:PositionField
作用:小的黑的消息框,顯示整個(gè)文件片斷長(zhǎng)度以及當(dāng)前幀在片內(nèi)的位置
嵌入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">
<!-- 此處設(shè)置播放的視頻連接 -->
<param name="ShowControls" value="0">
</object>
RealPlayer的一些函數(shù)、方法和過(guò)程
這是 Real Player ActiveX Control Library (Version 1.0) 的所有函數(shù)與方法,有興趣可以研究一下。
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>還有一種我在網(wǎng)上找的,沒(méi)有用,不過(guò)樓主好像說(shuō)功能好用,呵呵。
<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>
這個(gè)功能比較完整,支持原有的快捷鍵以及右鍵菜單
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">謝謝你的訪問(wèn)?。。。。?lt;/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("影片未開(kāi)始播放無(wú)法切換為全屏模式")
}
else
{
alert("點(diǎn)擊確定按鈕后進(jìn)入全屏播放模式,在全屏播放模式中按 Esc 鍵退出全屏模式")
document.playfull.SetFullScreen()
}
}
//-->
</script>在body入面
<a href="#" onclick="setFull();">全屏</a> 網(wǎng)頁(yè)播放器的參數(shù)含義 Windows Media Player 網(wǎng)頁(yè)播放器 參數(shù)含義
(默認(rèn)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">
<!--是否自動(dòng)調(diào)整播放大小-->
<param name="AutoStart" value="-1">
<!--是否自動(dòng)播放-->
<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">
<!--緩沖時(shí)間-->
<param name="CaptioningID" value>
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="0">
<!--當(dāng)前播放進(jìn)度 -1 表示不變,0表示開(kāi)頭 單位是秒,比如10表示從第10秒處開(kāi)始播放,值必須是-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處理,小數(shù)則采用四舍五入然后按前的處理-->
<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">
<!--是否允許拉動(dòng)播放進(jìn)度條到任意地方播放-->
<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">
<!--重復(fù)播放次數(shù),0為始終重復(fù)-->
<param name="PreviewMode" value="-1">
<param name="Rate" value="1">
<!--播放速率控制,1為正常,允許小數(shù)-->
<param name="SAMIStyle" value>
<!--SAMI樣式-->
<param name="SAMILang" value>
<!--SAMI語(yǔ)言-->
<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">
<!--是否顯示字幕,為一塊黑色,下面會(huì)有一大塊黑色,一般不顯示-->
<param name="ShowControls" value="-1">
<!--是否顯示控制,比如播放,停止,暫停-->
<param name="ShowAudioControls" value="-1">
<!--是否顯示音量控制-->
<param name="ShowDisplay" value="0">
<!--顯示節(jié)目信息,比如版權(quán)等-->
<param name="ShowGotoBar" value="0">
<!--是否啟用上下文菜單-->
<param name="ShowPositionControls" value="-1">
<!--是否顯示往前往后及列表,如果顯示一般也都是灰色不可控制-->
<param name="ShowStatusBar" value="-1">
<!--當(dāng)前播放信息,顯示是否正在播放,及總播放時(shí)間和當(dāng)前播放到的時(shí)間-->
<param name="ShowTracker" value="-1">
<!--是否顯示當(dāng)前播放跟蹤條,即當(dāng)前的播放進(jìn)度條-->
<param name="TransparentAtStart" value="-1">
<param name="VideoBorderWidth" value="0">
<!--顯示部的寬部,如果小于視頻寬,則最小為視頻寬,或者加大到指定值,并自動(dòng)加大高度.此改變只改變四周的黑框大小,不改變視頻大小-->
<param name="VideoBorderColor" value="0">
<!--顯示黑色框的顏色, 為RGB值,比如ffff00為黃色-->
<param name="VideoBorder3D" value="0">
<param name="Volume" value="0">
<!--音量大小,負(fù)值表示是當(dāng)前音量的減值,值自動(dòng)會(huì)取絕對(duì)值,最大為0,最小為-9640-->
<param name="WindowlessVideo" value="0">
<!--如果是0可以允許全屏,否則只能在窗口中查看-->
</object>
上面的這個(gè)播放器是老式的那種,6.4版本!新式播放器是在MediaPlayer9.0以后出現(xiàn)的,也就是說(shuō)只有裝了9.0或9.0以上的播放器才能正常使用的。
-------------------------------------------------------------------------------
下面是新式播放器代碼,相對(duì)以前的來(lái)說(shuō)要簡(jiǎn)單很多:<object id="player" height="64" width="260" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param NAME="AutoStart" VALUE="-1">
<!--是否自動(dòng)播放-->
<param NAME="Balance" VALUE="0">
<!--調(diào)整左右聲道平衡,同上面舊播放器代碼-->
<param name="enabled" value="-1">
<!--播放器是否可人為控制-->
<param NAME="EnableContextMenu" VALUE="-1">
<!--是否啟用上下文菜單-->
<param NAME="url" value="/blog/1.wma">
<!--播放的文件地址-->
<param NAME="PlayCount" VALUE="1">
<!--播放次數(shù)控制,為整數(shù)-->
<param name="rate" value="1">
<!--播放速率控制,1為正常,允許小數(shù),1.0-2.0-->
<param name="currentPosition" value="0">
<!--控件設(shè)置:當(dāng)前位置-->
<param name="currentMarker" value="0">
<!--控件設(shè)置:當(dāng)前標(biāo)記-->
<param name="defaultFrame" value="">
<!--顯示默認(rèn)框架-->
<param name="invokeURLs" value="0">
<!--腳本命令設(shè)置:是否調(diào)用URL-->
<param name="baseURL" value="">
<!--腳本命令設(shè)置:被調(diào)用的URL-->
<param name="stretchToFit" value="0">
<!--是否按比例伸展-->
<param name="volume" value="50">
<!--默認(rèn)聲音大小0%-100%,50則為50%-->
<param name="mute" value="0">
<!--是否靜音-->
<param name="uiMode" value="mini">
<!--播放器顯示模式:Full顯示全部;mini最簡(jiǎn)化;None不顯示播放控制,只顯示視頻窗口;invisible全部不顯示-->
<param name="windowlessVideo" value="0">
<!--如果是0可以允許全屏,否則只能在窗口中查看-->
<param name="fullScreen" value="0">
<!--開(kāi)始播放是否自動(dòng)全屏-->
<param name="enableErrorDialogs" value="-1">
<!--是否啟用錯(cuò)誤提示報(bào)告-->
<param name="SAMIStyle" value>
<!--SAMI樣式-->
<param name="SAMILang" value>
<!--SAMI語(yǔ)言-->
<param name="SAMIFilename" value>
<!--字幕ID-->
</object>
Real Player 網(wǎng)頁(yè)播放器 參數(shù)含義
參數(shù):autostart 屬性:True或是False 作用:指定是否自動(dòng)播放指定的源文件
參數(shù):backgroundcolor 屬性:任何用符號(hào)“#”開(kāi)頭的16進(jìn)制數(shù)值或是任何預(yù)定義的顏色作用:指定圖像窗口的背景顏色
參數(shù):center 屬性:True或是False 作用:指定片斷使用初始編碼大小播放,并且在圖像窗口的中央。
參數(shù):classid 屬性:"clsid:CFCDAA03-8BE4-1lcf-B84B0020AFBBCCFA:** 作用:用于指定ActiveX控件的唯一的字符串標(biāo)示,可以認(rèn)出嵌入的RealPalyer播放器。
參數(shù):console 屬性:任何字符串作用:可以將各種不同的RealPlayer控制聚集在網(wǎng)頁(yè)上,這樣它們可以交互使用或是保持獨(dú)立,而且互相不影響
參數(shù):controls 屬性:ImageWindow,All,ControlPanel,PlavButton,PlayOnlyButton, PauseButton,StopButton,F(xiàn)FCtrl,RWCtrl,MuteCtrl,MuteVolume,VolumeSlider,PositionSlider,TACCtrl,HomeCtrl,InfoVolumePanel,InfoPanel,StatusBar,StatusField,PositionField 作用:可以讓你指定那些控制是可見(jiàn)的。
參數(shù):height 屬性:任何整數(shù)值作用:指定RealPlayer元素的高度,單位:像素
參數(shù):id 屬性:任何字符串作用:為標(biāo)簽中的RealPlayer元素指定名字。
參數(shù):imagestatus 屬性:True或是False 作用:指定是否在圖像窗口中顯示狀態(tài)信息,默認(rèn)值是true
參數(shù):loop 屬性:True或是False 作用:可以讓你指定片斷是否無(wú)限循環(huán)
參數(shù):maintainaspect 屬性:True或是False 作用:默認(rèn)RealPlayer拉伸所有的片斷來(lái)充滿整個(gè)圖像窗口。
參數(shù):name 屬性:任何字符串作用:為標(biāo)簽中的RealPlayer元素指定名字(在標(biāo)簽中使用id)
參數(shù):nojava 屬性:True或是False 作用:避免啟動(dòng)Java虛擬機(jī)
參數(shù):nolabels 屬性:True或是False 作用:可以禁止顯示標(biāo)題或是版權(quán)信息(realplayer5.0以上時(shí),它是垃圾...)
參數(shù):nologo 屬性:True或是False 作用:避免RealPlayer啟動(dòng)時(shí)在圖像窗口中顯示
參數(shù):numloop 屬性:任何整數(shù)值作用:讓你能夠指定文件片循環(huán)的次數(shù),不需要參數(shù)loop
參數(shù):prefetch 屬性:True或是False 作用:指定在播放前,RealPlayer是否可以獲得流描述信息,默認(rèn)值是False
參數(shù):region 屬性:任何字符串作用:同SMIL一起使用。允許你指定使用HTML代替SMIL
參數(shù):scriptcallbacks 屬性:用逗號(hào)分割的列表作用:指定瀏覽器的回調(diào)監(jiān)控(好高級(jí)的東東!)
參數(shù):shuffle 屬性:True或是False 作用:同多文件片的ram文件或是SMIL文件一起使用。可以讓RealPlayer隨機(jī)播放列表中的文件
參數(shù):src 屬性:任何合法的相對(duì)或是完整的URL 作用:指定播放的文件或是源文件的地址
參數(shù):type 屬性:字符串作用:為嵌入插件指定MIME類型
參數(shù):width 屬性:任何整數(shù)值作用:指定RealPlayer元素的寬度
controls的屬性含義...
組件:imagewindow
作用:視頻顯示區(qū)域
組件:All
作用:嵌入RealPlaver的所有按鈕、滑動(dòng)條和信息面板
組件:ControlPanel
作用:顯示所有的控制按鈕,以及位置滑動(dòng)條和揚(yáng)聲器圖標(biāo),和調(diào)節(jié)聲音大小的滑動(dòng)條
組件:PlayButton
作用:顯示播放(play)按鈕和暫停(pause)按鈕
組件:PlayOnlyButton
作用:僅顯示播放按鈕
組件:PauseButton
作用:僅顯示暫停按鈕
組件:StopButton
作用:僅顯示停止(stop)按鈕
組件:FFCtrl
作用:僅顯示快進(jìn)(fastforward)按鈕
組件:RWCtrl
作用:僅顯示回放(rewind)按鈕
組件:MuteCtrl
作用:僅顯示揚(yáng)聲器圖標(biāo),用作靜音按鈕
組件:MuteVolume
作用:顯示小的揚(yáng)聲器圖標(biāo)(用于靜音)和其上的用于調(diào)節(jié)音量的滑動(dòng)條
組件:VolumeSlider
作用:僅顯示豎直的音量滑動(dòng)條
組件:PositionSlider
作用:顯示水平的位置滑動(dòng)條
組件:tacctrl
作用:顯示水平的消息框,輪流顯示標(biāo)題、作者以及版權(quán)信息
組件:HomeCtrl
作用:顯示小的Real標(biāo)識(shí)
組件:infoVolumePanel
作用:顯示黑的消息框,用綠色顯示標(biāo)題、作者以及版權(quán)信息,在右手方有揚(yáng)聲器圖標(biāo)和聲音調(diào)節(jié)滑動(dòng)條
組件:infoPanel
作用:同上面一樣,但是沒(méi)有靜音按鈕和聲音調(diào)節(jié)滑動(dòng)條
組件:StatusBar
作用:顯示水平的消息框,顯示片斷信息,比如片斷的時(shí)間,網(wǎng)絡(luò)狀況等等
組件:StatusField
作用:同StatusBar類似,但是只顯示消息區(qū)域,顯示網(wǎng)絡(luò)消息,比如顯示“Re-buffenng...”
組件:PositionField
作用:小的黑的消息框,顯示整個(gè)文件片斷長(zhǎng)度以及當(dāng)前幀在片內(nèi)的位置
嵌入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">
<!-- 此處設(shè)置播放的視頻連接 -->
<param name="ShowControls" value="0">
</object>
RealPlayer的一些函數(shù)、方法和過(guò)程
這是 Real Player ActiveX Control Library (Version 1.0) 的所有函數(shù)與方法,有興趣可以研究一下。
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>還有一種我在網(wǎng)上找的,沒(méi)有用,不過(guò)樓主好像說(shuō)功能好用,呵呵。
<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>
這個(gè)功能比較完整,支持原有的快捷鍵以及右鍵菜單
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">謝謝你的訪問(wèn)!?。。?!</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("影片未開(kāi)始播放無(wú)法切換為全屏模式")
}
else
{
alert("點(diǎn)擊確定按鈕后進(jìn)入全屏播放模式,在全屏播放模式中按 Esc 鍵退出全屏模式")
document.playfull.SetFullScreen()
}
}
//-->
</script>在body入面
<a href="#" onclick="setFull();">全屏</a>
更多信息請(qǐng)查看IT技術(shù)專欄