This is a migrated thread and some comments may be shown as answers.

WMV won't play

3 Answers 102 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 13 Dec 2009, 07:35 PM
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>                 
 

 

3 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 16 Dec 2009, 04:36 PM
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.
0
Terry
Top achievements
Rank 1
answered on 16 Dec 2009, 10:51 PM
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. 


0
Kiril Stanoev
Telerik team
answered on 18 Dec 2009, 05:18 PM
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.
Tags
MediaPlayer
Asked by
Terry
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Terry
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or