怎样在html中播放视频(IE和火狐都支持)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>夏日冰爽</title>
<script language="javascript">
var state;
function playerinit() {
WindowsMediaPlayer.url = "DQ_30s.mp4"; //定义你自己的文件
WindowsMediaPlayer.settings.autoStart = false;
}
function play() {
WindowsMediaPlayer.URL = "DQ_30s.mp4";
onload= "playerinit()"
if (WindowsMediaPlayer.controls.isavailable("play")) {
WindowsMediaPlayer.controls.play();
}
}
</script>
</SCRIPT>
</head>
<body onload="play()">
<div id="div" style="display:back;" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="table1">
<tr>
<td colspan="2" align="center">
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer" width="380" height="220">
<param name="URL" value="">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value="">
<param name="playCount" value="">
<param name="autoStart" value="0">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="0">
<param name="baseURL" value="">
<param name="volume" value="100">
<param name="mute" value="-1">
<param name="uiMode" value="none">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="false">
<param name="SAMIStyle" value="">
<param name="SAMILang" value="">
<param name="SAMIFilename" value="">
<param name="captioningID" value="">
<param name="enableErrorDialogs" value="0">
</object>
</td>
</tr>
</table>
</div>
</body>
</html>
[解决办法]
http://www.ok22.org/art_detail.aspx?id=377【flash 播放器代码实例下载】
[解决办法]
樓主參考下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
同時支持IE-Firefox-Chrome-Opera-Safari播放的WindowsMediaPlayer<br>可以加入.swf播放<br>
支持WindowsMediaPlayer可播放的一切音頻視頻<br>
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#B4C2E2">
<tr>
<td align="center">
<object id="mplayer" width="460" height="368" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" viewastext>
<param name="FileName" value="mms://video.fjtv.net/fjtv5?ZHVob25n">
<param name="ShowControls" value="1">
<param name="ShowPositionControls" value="0">
<param name="ShowAudioControls" value="1">
<param name="ShowTracker" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowCaptioning" value="0">
<param name="AutoStart" value="1">
<param name="PlayCount" value="0">
<param name="AnimationAtStart" value="0">
<param name="TransparentAtStart" value="0">
<param name="AllowScan" value="0">
<param name="EnableContextMenu" value="0">
<param name="ClickToPlay" value="0">
<param name="InvokeURLs" value="1">
<param name="DefaultFrame" value="datawindow">
<embed
src="mms://video.fjtv.net/fjtv5?ZHVob25n"
align="baseline" border="0"
width="460" height="368"
type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin&"
name="MediaPlayer" showcontrols="1" showpositioncontrols="0"
showaudiocontrols="1" showtracker="1" showdisplay="0"
showstatusbar="1"
autosize="0"
showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"
animationatstart="0" transparentatstart="0" allowscan="1"
enablecontextmenu="0" clicktoplay="0" invokeurls="1"
defaultframe="datawindow">
</embed>
</object>
</td>
</tr>
</table>
</body>
</html>