Click here to Skip to main content
15,912,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to play videos in my asp.net website.

The video is already added to my website in files folder, the user just has to select it to play video.

Can any body help me?

Thank you.
Posted
Updated 9-Nov-10 21:35pm
v3
Comments
Dalek Dave 10-Nov-10 3:35am    
Edited for Grammar and Syntax.

Youtube videos are discussed here[^]. You could try a similar approach.
 
Share this answer
 
There are thousands of examples/stuff available in the Net, A simple Google search will solve you problem..,

Go through the below Google Search Link
Paly Video in Asp.Net page[^]
 
Share this answer
 
Found this simple one.

Display Videos in ASP.NET 2.0[^]
 
Share this answer
 
is there any scrit for playing it as i want to set the url run time ..

the script i try is this as it is not working.. i dont know what is error can any body help me??


my script is

XML
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script runat ="server" >
    protected void Page_Load(object sender, EventArgs e)
    {
        string myObjectTag = "";
        string sourceUrl = Request.QueryString["fpath"];
        sourceUrl = sourceUrl.Trim();
        if (sourceUrl.Length > 0)
        {   //Continue.
        }
        else
        {
            throw new System.ArgumentNullException("sourceUrl");
        }
        //Continue.  }  else  {   throw new System.ArgumentNullException("sourceUrl");  }    string myWidthAndHeight = "";


        myObjectTag = myObjectTag + "<OBJECT width='312px' height='248px' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' VIEWASTEXT>";
        myObjectTag = myObjectTag + "<param name='url' value='" + sourceUrl+ "' />";
        myObjectTag = myObjectTag + "<param name='src' value='" + sourceUrl + "' />";
        myObjectTag = myObjectTag + "<param name='AutoStart' value='true' />";
        myObjectTag = myObjectTag + "<PARAM name='enabled' value='True'>";//-100 is fully left, 100 is fully right.
        myObjectTag = myObjectTag + "<PARAM name='balance' value='0'>"; //Position in seconds when starting.
        myObjectTag = myObjectTag + "<PARAM name='currentPosition' value='0'>"; //Show play/stop/pause controls.
        myObjectTag = myObjectTag + "<param name='enablecontextmenu' value='true' /><PARAM name='enableContextMenu' value='True'><PARAM name='fullScreen' value='False'><PARAM name='mute' value='False'><PARAM name='playCount' value='1'><PARAM name='rate' value='1'><PARAM name='stretchToFi' value='False'><PARAM name='uiMode' value='full'>"; //Allow right-click.
        myObjectTag = myObjectTag + "<param name='fullscreen' value='false' />"; //Start in full screen or not.
        myObjectTag = myObjectTag + "<param name='mute' value='false' />";
        myObjectTag = myObjectTag + "<param name='PlayCount' value='1' />"; //Number of times the content will play.
        myObjectTag = myObjectTag + "<param name='rate' value='1.0' />"; //0.5=Slow, 1.0=Normal, 2.0=Fast
        myObjectTag = myObjectTag + "<param name='uimode' value='full' />"; // full, mini, custom, none, invisible
        myObjectTag = myObjectTag + "<param name='showdisplay' value='true' />"; //Show or hide the name of the file.
        myObjectTag = myObjectTag + "<param name='volume' value='50' />"; // 0=lowest, 100=highest
        myObjectTag = myObjectTag + "</object>";

   }
 </script>
</asp:Content>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900