Play Video

原文链接:http://www.cnblogs.com/chyang/archive/2010/06/27/1766296.html

  Here are two ways to play video in your web page.

  At frist ,I all show you some pics:

Play Video

Play Video

The frist picture is use WMP to play video , Your can find lots of code from net.But it only support formats such as: wmv ,avi,mwa,mp3!

The second picture use PPS control to play video, It support most different format of video.

html as following:

Play VideoPlay Video代码
<object classid="clsid:5EC7C511-CD0F-42E6-830C-1BD9882F3458" codebase="http://www.ppStream.com/bin/powerplayer.cab#Version=1.0.0.27"
standby="加载播放器中..." width="486" height="390" id="powerplayer">
<param name="ShowControl" value="1">
<asp:Label ID="playit" runat="server" />
<param name="autostart" value="1">
</object>

 

C# code as following:

Play VideoPlay Video代码
 protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
basePath = ConfigurationManager.AppSettings["baseURL"];
string path = Page.Request.QueryString["filmPath"];

playit.Text = "<param name='src' value ='" + basePath + path + "'>";
//playit.Text = "<param name='src' value ='C:\\projects\\FilmPlay\\films\\1.rmvb'>";
Label_Title.Text = path.Replace("films/", "");
}

}

 

 

Of course, Your must download some of Components for it:PowerPlayer.dll ,fds.dll,PSNetwork.dll and Real_Alternative.exe!

and run the following commandline:

  • start Real_Alternative.exe
  • Regsvr32 C:\WINDOWS\FilmPlay\PowerPlayer.dll

And then your can

转载于:https://www.cnblogs.com/chyang/archive/2010/06/27/1766296.html

上一篇:安装moviepy


下一篇:如何解决git冲突:Your local changes to the following files would be overwritten by merge...