1. Front-end 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. backend CS
Protected void btnstop_click (Object sender, eventargs E)
{
Page. clientscript. registerstartupscript (page. GetType (), "", "<SCRIPT> playmusic(0, 0, false,'path .wm') </SCRIPT> ");
}