【文件属性】:
文件名称:asp.net视频播放器
文件大小:15KB
文件格式:CS
更新时间:2017-05-19 11:01:40
asp.net
public string Play(string url,int width,int height)
{
string strTmp = url.ToLower();
if(strTmp.EndsWith(".wmv")||strTmp.EndsWith(".wav")||strTmp.EndsWith(".mp3")||strTmp.EndsWith(".wma")||strTmp.EndsWith(".avi")||strTmp.EndsWith(".asf")||strTmp.EndsWith(".mpg"))
{
return wmv(url,width, height);
}
else if(strTmp.EndsWith(".mp3"))
{
return mp3(url,width,height);
}
else if (strTmp.EndsWith(".swf") ||strTmp.EndsWith(".fla")|| strTmp.EndsWith(".pdf")||strTmp.EndsWith(".flv"))
{
return swf(url,width, height);
}
else if(strTmp.EndsWith(".jpg")||strTmp.EndsWith(".gif"))
{
return img(url,width, height);
}
else if(strTmp.EndsWith(".rm"))
{
return rm(url,width, height);
}
else
{
return "数据错误";
}
}