在线播放器的问题。求高手帮助。
看代码
protected void Page_Load(object sender, EventArgs e)
{
//videoInfo();
string sql = "select * from videoInfo where id=4";
//string sql = "select * from videoInfo where id=" + Request["id"];
SqlDataReader sdr = operateData.getRow(sql);
sdr.Read();
//获取视频的路径
string link = sdr["videoPath"].ToString();
if (!link.StartsWith("http://"))
{
//获取当前的绝对路径
string sss = Request.Url.AbsoluteUri;
//查询play.aspx在字符串中的位置
int idx = sss.IndexOf("bff.aspx");
//获取指定字符串
sss = sss.Substring(0, idx);
link = sss + link;
Label1.Text = link;//这里显示的路径是对的,
this.Literal1.Text = operateMethod.GetFlashText(link);
}}
public static string GetFlashText(string url)
{
url = "player.swf?fileName=" + url;
string str = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='452' height='360' id='index' name='index'><param name='allowScriptAccess' value='always' /><param name='movie' value='" +
url + "'><embed src='" +
url + "' id='index1' name='index1' type='application/x-shockwave-flash' swLiveConnect=true allowScriptAccess='always' width='452' height='360'></embed></object>";
return str;
}现在的问题是,运行后,只有Label1显示路径,没有见Literal1播放。连播放器都不见,空白的。
------解决方案--------------------