WMV won't play

4 posts, 0 answers
  1. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 13 Dec 2009 Link to this post

    What's wrong with the following code.  When I click the playlist item, the counter remains at zero, although the play button changes to a pause symbol.

    The WMV is valid.  I can play it in Windows Media Player.  And I can play videos when I give them full http:// urls.

    Video and Images are both child directories of the Views directory where this page sits.

     
                <telerik:RadMediaPlayer   
                    AutoReverse="True"   
                    x:Name="RadMediaPlayer1" Margin="5" 
                    IsPlaylistVisible="True" Height="420" Width="480" AutoPlay="False" > 
                    <telerik:RadMediaItem Source="Video/McDonaldsGreatestAd.wmv" 
                                           ImageSource="Images/Vein_Images/AngelaPhoto.jpg" 
                            Description="Video">  
                        <telerik:RadMediaChapter Position="00:01:00" Title="Minute 1" /> 
                        <telerik:RadMediaChapter Position="00:02:00" Title="Minute 2" /> 
                        <telerik:RadMediaChapter Position="00:03:00" Title="Minute 3" /> 
                    </telerik:RadMediaItem>                  
                </telerik:RadMediaPlayer>                 
     

     

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 16 Dec 2009 Link to this post

    Hi Terry,

    Please find attached a sample project that shows how to play a local WMV in RadMediaPlayer.
    In your case may be the uri is incorrect  or the build action of the video file.
    In the sample I removed only the Video file from the project. All you need to do is just to add some video file named "test.wmv" in the Video folder of your project and set its buildaction to "Resource".
    I hope that this will help you.
    You can also take a look at the following article:
    http://nerddawg.blogspot.com/2008/03/silverlight-2-demystifying-uri.html

    Greetings,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 16 Dec 2009 Link to this post

    Thanks, I got it working.  However, I have a 21 mb video that most people won't play.  I only want to download it when people go to the video page (1 of 60 pages on the site), so I want it in the Web project, not in the XAP.  Is there any way to use a relative URL to a Video folder in the Web project?  We're staging this on 3 different machines and I also want it to work when debugging.  So I can't use an absolute http:// url. 


  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 18 Dec 2009 Link to this post

    Hello Terry,

    You can place your video in the ClientBin folder of your web project and access it the same way as if being in the xap. I have attached a sample project demonstrating this. Have a look at it and let me know if this is of any help.

    Best wishes,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top