Failed to Load Media

14 posts, 0 answers
  1. Brett Winklesky
    Brett Winklesky avatar
    3 posts
    Member since:
    Dec 2009

    Posted 07 Oct 2010 Link to this post

    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 
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 13 Oct 2010 Link to this post

    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
  3. DevCraft banner
  4. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 06 Apr 2011 Link to this post

    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
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 11 Apr 2011 Link to this post

    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
  6. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 11 Apr 2011 Link to this post

    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;}
                    }
    }
  7. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 14 Apr 2011 Link to this post

    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
  8. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 14 Apr 2011 Link to this post

    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.
  9. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 19 Apr 2011 Link to this post

    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
  10. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 19 Apr 2011 Link to this post

    yes
  11. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 19 Apr 2011 Link to this post

    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
  12. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 19 Apr 2011 Link to this post

    glad to help, but i'm not Brett, my name is Eugeniy
    it's ok, but check it..
  13. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 19 Apr 2011 Link to this post

    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
  14. NrupalC
    NrupalC avatar
    11 posts
    Member since:
    Apr 2010

    Posted 04 Jul 2011 Link to this post

    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
  15. NrupalC
    NrupalC avatar
    11 posts
    Member since:
    Apr 2010

    Posted 06 Jul 2011 Link to this post

    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 


Back to Top
DevCraft banner