ASP. NET background gets the FLV video address to play "go"

Source: Internet
Author: User

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 void Page_Load (object sender, EventArgs e) {this.video_content.            InnerHtml = Play ("sp.flv", 472, 385); public static string Play (string url, int width, int height) {string strtmp = URL.            ToLower ();            if (Strtmp.endswith (". flv")) {return flv (URL, width, height);            } else {return "video file data error"; }} private static string flv (string url, int width, int height) {System.Text.StringBuild            ER sb = new System.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/getfla            Shplayer\ "type=\" application/x-shockwave-flash\ "menu=\" false\ ">"); Sb.            Append ("</embed>"); Sb.            Append ("</object>"); Return SB. ToString ();         }

The FLV video playback plug-in that needs to be supported is: flvplayer.swf,flvplayer_progressive.swf

ASP. NET background gets the FLV video address to play "go"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.