This question is locked. New answers and comments are not allowed.
I have the following control template:
And I use it as such:
However the buttons on the media player do not seem to work, and the method RadMediaItem_StreamAttached is never actually called. However playback works correctly, and I can consume the encoded content.
Does anyone know why the buttons wont actually work?
<Style x:Key="MWMediaPlayer" TargetType="telerik:RadMediaPlayer"> <Setter Property="FontSize" Value="10"/> <Setter Property="Foreground" Value="{StaticResource MediaPlayer_ForegroundTime}"/> <Setter Property="Volume" Value="0.5"/> <Setter Property="Background" Value="Black"/> <Setter Property="Padding" Value="1"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Top"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:RadMediaPlayer"> <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}"> <telerik:RadMediaPlayerWrapper x:Name="MediaPlayerWrapper" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Height="{Binding VideoHeight}" Grid.Row="1" Width="{Binding VideoWidth}" Style="{StaticResource MWMediaPlayerWrapper}"> <Grid> <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" MaxHeight="{Binding VideoHeight}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" MaxWidth="{Binding VideoWidth}" Margin="7"/> <my:SmoothStreamingMediaElement x:Name="MediaElement2" Stretch="UniformToFill" BufferingTime="{Binding BufferingTime}" DataContext="{TemplateBinding SelectedMediaItem}" Height="{Binding VideoHeight}" Volume="{TemplateBinding Volume}" Width="{Binding VideoWidth}" SmoothStreamingSource="{Binding Source}"/> </Grid> </telerik:RadMediaPlayerWrapper> <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <Popup x:Name="FullScreenPopup" IsOpen="False"> <telerik:RadMediaPlayerWrapper x:Name="PopupMediaPlayerWrapper" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}"> <Rectangle x:Name="PopupMediaRectangle" DataContext="{TemplateBinding SelectedMediaItem}"> <Rectangle.Fill> <VideoBrush x:Name="PopupMediaBrush" Stretch="{Binding VideoStretch}"/> </Rectangle.Fill> </Rectangle> </telerik:RadMediaPlayerWrapper> </Popup> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style><telerik:RadMediaPlayer x:Name="player" VerticalContentAlignment="Top" Volume="10" HorizontalContentAlignment="Center" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="4" Margin="5,0,5,0" Width="Auto" Height="Auto" SelectedIndex="0" Style="{StaticResource MWMediaPlayer}" > <telerik:RadMediaItem IsStreamingSource="True" Header="{Binding CurrentStreamTitle}" Source="{Binding CurrentStreamUri, Mode=OneWay}" StreamAttached="RadMediaItem_StreamAttached" Style="{StaticResource MWMediaItemTemplate}" /> </telerik:RadMediaPlayer>However the buttons on the media player do not seem to work, and the method RadMediaItem_StreamAttached is never actually called. However playback works correctly, and I can consume the encoded content.
Does anyone know why the buttons wont actually work?