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
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
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
>
Actually SmoothStreamingMediaElement is a wrapper around the MediaElement to. The bad thing is that we cannot override MediaElement property inside RadMediaPlayer
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
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;}
}
}
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.
Hristo
the Telerik team
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.
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?
Hristo
the Telerik team
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
it's ok, but check it..
Please accept our apologies for mistaking your name. Thank you again for your suggestion.
All the best,
Petar Mladenov
the Telerik team
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
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