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>");
}
可以更换数据库中的路径,及大小,是否显示。
asp.net 在线 mp3,wma, avi
转载wx634e1c97257c6 博主文章分类:[网站分类]ASP.NET
下一篇:9:04 2009-7-28
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Asp.Net Core 配置动态WebApi
.Net Core 配置动态WebApi
动态生成 Web 应用服务 -
如何快速将无损音频WMA格式转换为MP3
许多人都知道WMA音频格
音频格式 格式转换 应用程序