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

Poster Image?

3 Answers 80 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Alex Tushinsky
Top achievements
Rank 2
Alex Tushinsky asked on 06 Oct 2012, 10:09 PM
How do I add a default image to my media player that is displayed before the user clicks the Play button?  Most video players these days seem to support this, but I can't seem to figure out which property to use. 

I've using the latest version of the Silverlight controls.

Any help is greatly appreciated!

Alex T.

3 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 09 Oct 2012, 11:49 AM
Hello Alex Tushinsky,

 You can use the RadMediaItem.ImageSource property. It is doing exactly the thing you need. 
Please let us know if you have further questions. 

All the best,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alex Tushinsky
Top achievements
Rank 2
answered on 09 Oct 2012, 12:59 PM
That's exactly what I'm doing.  I can see the image when I view the Playlist, but not initially when the player loads.  Is there an additional setting that I need to set?

Also, is there a way to turn off the playlist option?

Thank you,
Alex
0
Miro Miroslavov
Telerik team
answered on 11 Oct 2012, 08:39 AM
Hi Alex Tushinsky,

 Sorry for misleading you with my first post, but the MediaPlayer doesn't support poster image out of the box. You should do some work by your own. I tried with the following code and ti works ok for me.
I also hide the playlist as you wished.

<Grid x:Name="LayoutRoot" Background="White">
    <Grid.Resources>
        <telerik:InvertedBooleanToVisibilityConverter x:Key="converter" />
    </Grid.Resources>
    <telerik:RadMediaPlayer IsPlaylistVisible="False" x:Name="player">
        <telerik:RadMediaPlayer.Header>
            <Image Source="poster.png"
                    Visibility="{Binding Path=IsPlaying,ElementName=player, Converter={StaticResource converter}}" />
        </telerik:RadMediaPlayer.Header>
        <telerik:RadMediaItem Source="http://ecn.channel9.msdn.com/o9/pdc09/wmv/CL16.wmv" />
    </telerik:RadMediaPlayer>
</Grid>

Can try this approach and let us know if it is working for you?
Thank you.

All the best,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
MediaPlayer
Asked by
Alex Tushinsky
Top achievements
Rank 2
Answers by
Miro Miroslavov
Telerik team
Alex Tushinsky
Top achievements
Rank 2
Share this question
or