1.前台js
<script type="text/javascript">
function playMusic(width,height,isStart,videolink)
{
var oeTags = '<object id="mediaPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"'
+ 'width="' + width + '" height="' + height + '"'
+ 'codebase="
http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"' + 'standby="Loading Microsoft Windows Media Player components..."'
+ 'type="application/x-oleobject">'
+ ' <param name="autoStart" value="'+isStart+'"/>'
+ ' <param name="url" value="' + videolink + '" />'
+ ' <param name="wmode" value="transparent" />'
+ ' <param name="uiMode" value="full" />'
+ ' <param name="loop" value="false" />'
+ ' <embed id ="EmbedmediaPlayer"'
+ ' type ="application/x-mplayer2"'
+ ' src ="' + videolink + '"'
+ ' width ="' + width + '"'
+ ' height ="' + height + '">'
+' autoStart ="'+isStart+'" '
+ ' </embed>'
+ '</object>';
document.write(oeTags);
}
</script>
2.后台cs
protected void BtnStop_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>playMusic(0,0,false,'天路.wma')</script>");
}
可以更换数据库中的路径,及大小,是否显示。
分享到:
相关推荐
if(strTmp.EndsWith(".wmv")||strTmp.EndsWith(".wav")||strTmp.EndsWith(".mp3")||strTmp.EndsWith(".wma")||strTmp.EndsWith(".avi")||strTmp.EndsWith(".asf")||strTmp.EndsWith(".mpg")) { return wmv(url,...
{"media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb"}, {"file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2"} }; const int maxSize = 2000000; var imgFile = Request.Files["imgFile"]...
并且完美的支持多种格式音频、视频文件格式播放:mp3,mp2,mp1,wma,wmv,asp,avi,mpg,wav,mid…… 版本:1.0 build018 制作日期:2003年7月1日 操作系统:Microsoft Windows 95/98/Me/NT/2000/xp+ 软件类型:...
MPlayer 中文特别版是一个强大的多媒体播放器,但它是个命令行程序所以对很多人来说都很难用 SMPlayer 让...WMA 9 (WMAv3), Voxware audio, ACELP.net etc (using x86 DLLs) RealAudio: COOK, SIPRO, ATRAC3 (using Rea
常见的多媒体素材格式包括txt(文本)、bmp/jpg/gif/png(图片)、avi/mpg/asf/wmv/rm/MOV/qt(视频)、wav/mp3/wma/ra/mid(音频)以及swf/gif/3ds/flt/fli/pic(动画)。 设计多媒体课件时,需考虑是否使用数据库...
,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb"/> ,docx,xls,xlsx,ppt,pptx,pdf,htm,html,txt,js,zip,rar,gz,7z,bz2"/> 2.<system.web>............节点中加入以下代码 <!--kindeditor的配置需要设置,pages ...