SOURCE Download: http://download.csdn.net/detail/njxiaogui/7609687
Front desk:. aspx
<table> <tr> <td><div id="video_content" runat=" server" style=" "></div> </td> </tr> </ Table>
Backstage. CS ( get the address of FLV through the background for video playback )
protected voidPage_Load (Objectsender, EventArgs e) { This. video_content. InnerHtml = Play ("sp.flv",472,385); } Public Static stringPlay (stringUrlintWidthintheight) { stringStrtmp =URL. ToLower (); if(Strtmp.endswith (". flv")) { returnflv (URL, width, height); } Else { return "Video File Data error"; } } Private Static stringflvstringUrlintWidthintheight) {System.Text.StringBuilder SB=NewSystem.Text.StringBuilder (); Sb. Append ("<object codebase=\ "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= 10,0,22,87\ ""); Sb. Append ("classid=\ "Clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\""); Sb. Append ("height=\ ""+ Height +"\ "Width=\""+ width +"\ ">"); Sb. Append ("<param name=\ "flashvars\" value=\ "vcastr_file="+ URL +"&logotext=www.um173.com&buffertime=3\ ">"); Sb. Append ("<param name=\ "movie\" value=\ "flvplayer.swf\" >"); Sb. Append ("<param name=\ "allowfullscreen\" value=\ "true\" >"); Sb. Append ("<param name=\ "wmode\" value=\ "window\" >"); Sb. Append ("<param name=\ "play\" value=\ "1\" >"); Sb. Append ("<param name=\ "loop\" value=\ " -1\" >"); Sb. Append ("<param name=\ "quality\" value=\ "high\" >"); Sb. Append ("<param name=\ "salign\" value=\ "\" >"); Sb. Append ("<param name=\ "menu\" value=\ "0\" >"); Sb. Append ("<param name=\ "base\" value=\ "\" >"); Sb. Append ("<param name=\ "allowscriptaccess\" value=\ "always\" >"); Sb. Append ("<param name=\ "scale\" value=\ "showall\" >"); Sb. Append ("<param name=\ "devicefont\" value=\ "0\" >"); Sb. Append ("<param name=\ "embedmovie\" value=\ "0\" >"); Sb. Append ("<param name=\ "bgcolor\" value=\ "\" >"); Sb. Append ("<param name=\ "swremote\" value=\ "\" >"); Sb. Append ("<param name=\ "moviedata\" value=\ "\" >"); Sb. Append ("<param name=\ "seamlesstabbing\" value=\ "1\" >"); Sb. Append ("<param name=\ "profile\" value=\ "0\" >"); Sb. Append ("<param name=\ "profileaddress\" value=\ "\" >"); Sb. Append ("<param name=\ "profileport\" value=\ "0\" >"); Sb. Append ("<embed src=\ "flvplayer_progressive.swf\" flashvars=\ "vcastr_file="+ URL +"&logotext=www.um173.com\ "Height=\""+ Height +"\ "Width=\""+ width +"\ "quality=\" high\ "pluginspage=\" Http://www.macromedia.com/go/getflashplayer\ "type=\" application/ X-shockwave-flash\ "menu=\" false\ ">"); Sb. Append ("</embed>"); Sb. Append ("</object>"); returnsb. ToString (); }
The FLV video playback plug-in that needs to be supported is: flvplayer.swf,flvplayer_progressive.swf