Results 1 to 4 of 4

Thread: [RESOLVED] object (movie) not playing live - works on local

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2007
    Posts
    56

    Resolved [RESOLVED] object (movie) not playing live - works on local

    I have a small web app (using vb.net/asp.net) that I have created a control with an oject and I show a short video. The video is a .mov file. When I run the page on my local testing machine, it works just fine. When I move the files to the server and test it, the movie just won't play. There are no errors on the page or anything, the movie just won't play. I know the path to the video is correct. When I click play, it says 'Opening Media' for 1 or 2 seconds and then it goes back to the ready state. I'm wondering why it works locally but not on the server. Does the server need a media player?

    Here's my control:
    HTML Code:
    <object id="<%= ClientID %>_Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="<%= Me.Width %>" height="<%= Me.Height %>" style="margin:0px auto; z-index:10000">    
    <param name="URL" value="<%= me.VideoUrl %>" />    
    <param name="autoStart" value="false" />    
    <param name="uimode" value="Full" />    
    <%--<param name="autoplay" value="True" />--%>    
    <embed id="<%= ClientID %>_Embed" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="<%= Me.Width %>" height="<%= Me.Height %>" src="<%= Me.VideoUrl %>" style="margin:0px auto;z-index:10000" showcontrols="0">    
    </object>  
    Then on my .aspx source page I call the control like this:
    HTML Code:
    <uc2:cntVideo ID="cntVideo1" runat="server" Height="242"    
    Width="315" VideoUrl="<%= VideoFile %>" />
    And finally in that .aspx code behind I set the path:
    Code:
    VideoPath = "C:/Videos/DWI_labtable_assembly.mov"    
    cntVideo1.VideoUrl = VideoPath
    Any help would be greatly appreciated. Please let me know if you have any questions or ideas. Thanks!

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: object (movie) not playing live - works on local

    Hello,

    I believe the problem here is that you are not using a path, relative to the server. You are using C:\, which basically means, try and get the file from the C:\ drive of the client machine, which clearly won't exist. Provide either a relative path to the file, i.e. /Videos/DWI_labtable_assembly.mov, or, provide an absolute url, i.e. http://www.yourdomain.com/Videos/DWI...e_assembly.mov.

    Gary

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2007
    Posts
    56

    Resolved Re: object (movie) not playing live - works on local

    Huh, that was it! I actually wasn't hard coding a path in, this is what i was originally using:
    Code:
    Dim VideoFiles() As String
            VideoFiles = IO.Directory.GetFiles(Server.MapPath(path))
    and then I'd loop through each one to grab the file name and path and i just used that full path. When I used only the relative path, it works now. Thank you so much!!!!!!!!

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: object (movie) not playing live - works on local

    Not a problem at all, happy to help!

    Can you remember to mark your thread as resolved?

    Thanks
    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width