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

Failed to Load Media

13 Answers 249 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Brett Winklesky
Top achievements
Rank 1
Brett Winklesky asked on 07 Oct 2010, 08:04 PM
Hi-

I noticed this is a common issue, and I'm not sure what is going on with my media player when trying to load a Smooth Streaming manifest I've created.  It works fine with the Big Buck Bunny manifest, but not on my encoded files.  I've created the cross domain xml files so that shouldn't be the issue.  I've handled the exception and it's a 3222 error coming back when loading the Smooth Stream.  Does anybody know what the error means?

I can send the project over if that helps.  Thanks in advance for any help. 

Brett 

13 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 13 Oct 2010, 02:17 PM
Hi Brett Winklesky,

Currently the RadMediaPlayer supports media encoded with Encoder 3. If you are trying to play a smooth streaming media encoded with another encoder, it would fail. We are considering supporting Encoder 4. You can vote for this in our PITS here under "RadMediaPlayer: Support for smooth streaming encoded with Encoder 4".

Greetings,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugeniy
Top achievements
Rank 2
answered on 06 Apr 2011, 12:05 PM
We can do SmoothStreaming 4 by ourselves:
1)we should use Microsoft.Web.Media.SmoothStreaming.dll and SmoothStreamingMediaElement
2)we should correct the template here:
<telerik:RadMediaPlayerWrapper x:Name="MediaPlayerWrapper" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Height="{Binding VideoHeight}" Grid.Row="1" Width="{Binding VideoWidth}">
  
<Grid>
  
<ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" MaxHeight="{Binding VideoHeight}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" MaxWidth="{Binding VideoWidth}" Margin="7"/>
  
<SmoothStreaming:SmoothStreamingMediaElement x:Name="MediaElement2" AutoPlay="True" BufferingTime="{Binding BufferingTime}" DataContext="{TemplateBinding SelectedMediaItem}" Height="{Binding VideoHeight}" Stretch="Uniform" Volume="{TemplateBinding Volume}" Width="{Binding VideoWidth}" SmoothStreamingSource="{Binding Source}"/>
  
<!--<MediaElement x:Name="MediaElement" AutoPlay="True" BufferingTime="{Binding BufferingTime}" DataContext="{TemplateBinding SelectedMediaItem}" Height="{Binding VideoHeight}" Stretch="Uniform" Volume="{TemplateBinding Volume}" Width="{Binding VideoWidth}"/>-->
  
</Grid>
  
</telerik:RadMediaPlayerWrapper>
The key thing is SmoothStreamingSource="{Binding Source}"

Actually SmoothStreamingMediaElement is a wrapper around the MediaElement to. The bad thing is that we cannot override MediaElement property inside RadMediaPlayer
0
Tina Stancheva
Telerik team
answered on 11 Apr 2011, 01:58 PM
Hi Eugeniy,

Does SmoothStreamingMediaElement inherits the MediaElement class? Because if it does, you should be able to work with it out-of-the-box as long as you define it with an x:Name="MediaElement" in the RadMediaPlayer ControlTemplate .

Can you please give this approach a try and let us know if it works for you? Thank you in advance.

Kind regards,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugeniy
Top achievements
Rank 2
answered on 11 Apr 2011, 02:11 PM
No, it does not. SmoothStreamingMediaElement includes MediaElement via Template like RadMediaPlayer does.
In your scenario you have to create OurPlayer, and inherit it from MediaElement, and then use SmoothStreamingPlayer in its template,(player in player, that inherits from player..) but MediaElement is sealed, this is the trouble... The only one way is to allow RadMediaPlayer to its inheritors to override MediaElement property, so inheritors can provide it's own MediaElement, not only by x:name="MediaElement" in template. It will allow us to do:

 

public class SmoothCustomPlayer : SmoothStreamingMediaElement 
{
         internal MediaElement mediaElement; 
  
          public override void  OnApplyTemplate() 
          {
                  base.OnApplyTemplate(); 
                  mediaElement = (MediaElement)GetTemplateChild("MediaElement"); 
           }
}

 

 


and

public class CustomRadMediaPlayer : RadMediaPlayer
{
               protected override MediaElement MediaElement
               {
                         get{ return SmoothMediaElementInTemplate.mediaElement;}
                }
}
0
Hristo
Telerik team
answered on 14 Apr 2011, 02:34 PM
Hi Brett Winklesky,

Indeed, MediaElement is a sealed class. Unfortunately we haven't take your case into consideration when designing and implementing the control. However I thik we could easily extend the flexibility of our control by making the property virtual and its setter protected.

The change will be present in our next internal build (probably the beginning of next week).

Hope this will enable you to implement your case. Let me know if you have any other difficulties regarding MediaPlayer or need further assistance.

Best wishes,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugeniy
Top achievements
Rank 2
answered on 14 Apr 2011, 05:07 PM
The video quality of smooth streaming depends on the size of MediaPlayer, and i see in your template, that while watching the fullscreen video the mediaplayer is still in size of it's parent - so it does not show the quality that is possible.
In my player I am using StackPanel in StackPanel, so MediaPlayer are trying to show the best quality, i think you have to work on it too.
Best regards.
0
Hristo
Telerik team
answered on 19 Apr 2011, 08:51 AM
Hi Brett Winklesky,

Thank you for the feed back. Your feedback is of great importance for us.

We've implemented the fullscreen with separate pop up that uses VideoBrush. The source of that brush is a MediaElement used to watch the movie in non fullscreen mode. While the popup is sized to take the whole screen MediaElement stays the size of its parent.

I'm not sure if I got you right, but you suggest to increase the size of that MediaElement?

All the best,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugeniy
Top achievements
Rank 2
answered on 19 Apr 2011, 08:57 AM
yes
0
Hristo
Telerik team
answered on 19 Apr 2011, 09:12 AM
Hi Brett Winklesky,

Great, we will have it in mind when refactoring the MediaPlayer. I would like to thank you again for your feedback.

Best wishes,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugeniy
Top achievements
Rank 2
answered on 19 Apr 2011, 12:50 PM
glad to help, but i'm not Brett, my name is Eugeniy
it's ok, but check it..
0
Petar Mladenov
Telerik team
answered on 19 Apr 2011, 02:23 PM
Hi Eugeniy,

Please accept our apologies for mistaking your name. Thank you again for your suggestion.

All the best,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
NrupalC
Top achievements
Rank 1
answered on 04 Jul 2011, 03:35 PM
Hi Hristo,

I am trying to give adaptive streaming output from Expression Encoder 4 to RadMediaPlayer.

I have version 2011 Q1 SP1 of Telerik Silverlight RadControls. The change document says that the RadMediaPlayer has been modified to have MediaElement as a virtual property. But the actual implementation doesn't have it marked as virtual. Can you please confirm that it has been marked virtual and the change made it into the dlls ?



Thank you
Nrupal
0
NrupalC
Top achievements
Rank 1
answered on 06 Jul 2011, 10:18 AM
Hi Hristo,

Even though the release notes doesn't mention the change to RadMediaPlayer, the change is present in this hot fix:

RadControls_for_Silverlight4_2011_1_0704_DEV_hotfix.zip

Nrupal 


Tags
MediaPlayer
Asked by
Brett Winklesky
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Eugeniy
Top achievements
Rank 2
Tina Stancheva
Telerik team
Hristo
Telerik team
Petar Mladenov
Telerik team
NrupalC
Top achievements
Rank 1
Share this question
or