码迷,mamicode.com
首页 > 其他好文 > 详细

flv mp4视频播放

时间:2014-07-31 19:34:07      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:http   io   数据   ar   new   amp   数据库   type   

 protected void Page_Load(object sender, EventArgs e)         {             //这个你可以直接指定路径,当然可以接收从另外一页传过来的参数,再有一个就是从数据库取出来啦。             string file = ResolveUrl("~/Flv/歌曲:王菲《传奇》.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:自动播放|0:连续播放|100:默认音量|0:控制栏位置|2:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|:logo文字|:logo地址|:结束swf地址";         //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://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0‘ width=" + _Width + " height=" + _Height + ">"          + @" <param name=‘movie‘ 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>";     } }

flv mp4视频播放,布布扣,bubuko.com

flv mp4视频播放

标签:http   io   数据   ar   new   amp   数据库   type   

原文地址:http://www.cnblogs.com/huweijun/p/3880999.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!