FLV MP4 video playback

Source: Internet
Author: User

Protected void page_load (Object sender, eventargs e) {// you can specify the path directly. Of course, you can receive parameters from another page, the other one is getting it from the database. String file = resolveurl ("~ /FLV/Song: Faye Wong legend. FLV ");

FLV objflv = new FLV (800,600, file); this. literal1.text = objflv. Player ();}

 

Public class FLV {private string _ file; private int _ width; private int _ height;

Public int width {set {_ width = value ;}}

Public int height {set {_ Height = value ;}}

Public String file {set {_ file = value ;}}

Public FLV () {// todo: Add constructor logic here //}

Public FLV (INT width, int height, string file) {This. _ width = width; this. _ Height = height; this. _ file = file ;}

Public string player () {string texts = string. empty; string Config = "0: automatic playback | 0: continuous playback | 100: Default volume | 0: control bar position | 2: control bar display | 0x000033: subject color | 60: Subject transparency | 0x66ff00: Halo color | 0 xffffff: icon color | 0 xffffff: text color |: logo text |: logo address |: End SWF address "; // string swffile = httpcontext. current. request. applicationpath + "/FLV/vcastr22.swf"; string swffile = "/FLV/vcastr22.swf"; return @ "<object classid = 'clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 'codebase = 'HTTP: // adjust width = "+ _ width +" Height = "+ _ height +"> "+ @" <Param name = 'movi' value = "+ swffile +">" + @ "<Param name = 'quality' value = 'high'>" + @ "<Param name = 'menu 'value = 'false'>" // + @ "< param name = 'isautoplay' value = '1'> "autoplay =" true "+ @" <Param name = 'autoplay' value = 'true'> "+ @" <Param name = 'wmode' value = 'opaque'> "+ @" <Param name = 'allowfullscreen 'value = 'true'> "+ @" <Param name = 'flashvars' Value = 'vcastr _ file = "+ _ file +" & vcastr_title = "+ texts +" & vcastr_config = "+ config +" '> "+ @" <embed src = "+ swffile + "wmode = 'opaque 'flashvars = 'vcastr _ file =" + _ file + "& vcastr_title =" + texts + "& vcastr_config =" + config + "'menu = 'false' Quality = 'high' width = "+ _ width +" Height = "+ _ height +" type = 'application/X-Shockwave-flash' pluginspage = 'HTTP: // www.macromedia.com/go/getflashplayer'/> "+ @" </Object> ";}}

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.