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

Always Display Playlist?

12 Answers 122 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 2
Mark asked on 28 Aug 2010, 12:59 PM
Hi Telerik,

This weekend, I'm playing with the Silverlight MediaPlayer control.  In my case, I'm playing audio files and would like the playlist to ALWAYS be displayed.  I have AutoPlay and IsPlaylistVisible set to true.  The playlist is visible for a split second, then the track begins to play and the playlist disappears.  I can bring it back by clicking the playlist button, but I'd like it to be up there all the time.  Is this possible?

Thanks!

MJ

12 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 01 Sep 2010, 03:34 PM
Hi Mark,

You can use the MediaOpened event of RadMediaPlayer and programatically show the playlist from there.

<telerik:RadMediaPlayer x:Name="mediaPlayer1" MediaOpened="mediaPlayer1_MediaOpened">
    <telerik:RadMediaItem Source="audio1.wma" />
    <telerik:RadMediaItem Source="audio2.wma" />
    <telerik:RadMediaItem Source="audio3.wma" />
    <telerik:RadMediaItem Source="audio4.wma" />
    <telerik:RadMediaItem Source="audio5.wma" />
</telerik:RadMediaPlayer>

private void mediaPlayer1_MediaOpened(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    this.mediaPlayer1.IsPlaylistVisible = true;
}

Give it a try and let me know if this does the trick.
On a separate note, I'd like to inform you that in the future we will introduce couple of events PlaylistVisibilityChanged and PreviewPlaylistVisibilityChanged that will inform you when the visibility of the playlist changes and is about to change. By simply handling the preview event you will be able to forbid the playlist from closing. I've added such PITS item called "MediaPlayer: Add PlaylistVisibilityChanged and PreviewPlaylistVisibilityChanged events" which you will be able to track and vote for tomorrow the latest.

Sincerely yours,
Kiril Stanoev
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
Mark
Top achievements
Rank 2
answered on 03 Sep 2010, 06:49 PM
Worked like a charm, thanks!

Is there a way to pin the controls?  If the MediaPlayer loses focus, the controls disappear.  I'd like them to always be displayed.

Thanks again,

MJ
0
Hristo
Telerik team
answered on 08 Sep 2010, 04:53 PM
Hello MJ,

You can try with this property IsVideoPanelPinned. Actually I think controls are hidden when mouse is out of the player.

However, let us know if it works for you or need more help.

All the best,
Hristo Milyakov
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
Mark
Top achievements
Rank 2
answered on 19 Sep 2010, 02:42 AM
That did it, thank you!
0
Mark
Top achievements
Rank 2
answered on 08 Oct 2010, 10:30 PM
This worked great until I upgraded to the latest Telerik Silverlight assemblies this weekend.  The media player does not show unless I hover over it.  Once I hover over where it should be, it stays (which is good), but I'd like for it to be displayed as soon as the page loads.  I haven't touched the code, just updated the assemblies.

Thoughts?
0
Hristo
Telerik team
answered on 14 Oct 2010, 12:27 PM
Hello MJ,

We used RadControls for Silverlight 4 version 2010_2_1008 for the test and could not reproduce the issue.

Can you please elaborate a little bit more on your issue or send us a sample project representing it.

Best wishes,
Hristo Milyakov
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
Steve
Top achievements
Rank 1
answered on 30 Dec 2010, 12:21 AM
I am using RadControls Version 2010.3.1227.1040 and I am having the same problem that MJ is having. When my SL application first opens the RadMediaPlayer has a RadMediaItem with the Source bound to the SelectedItem in a RadGridView.

<telerik:RadMediaItem Source="{Binding Mode=OneWay, ElementName=FileGridView, Path=SelectedItem.FileUrl}">


Everything works OK with one exception, The Video Panel does not show until the RadMediaPlayer is hovered over. Once the Video Panel appears it never goes away as is desired (IsVideoPanelPinned = true). Also note that the IsVideoPanelHidden property is set to False.
0
Mark
Top achievements
Rank 2
answered on 30 Dec 2010, 03:16 AM
I'm still having the same problem.
0
Accepted
Hristo
Telerik team
answered on 30 Dec 2010, 01:20 PM
Hi MJ,

We had a bug with our MediaPlayer that should be fixed by now. The binaries from next latest internal build or upcoming SP should contain the fix.

If you can not wait until then you can attach a event handler to the loaded event of the MediaPlayer and set the IsVideoControlPanelVisible to true from dispatcher like this:

public MainPage()
{
    InitializeComponent();
    this.SamplePlayer.Loaded += new RoutedEventHandler(SamplePlayer_Loaded);
}
 
void SamplePlayer_Loaded(object sender, RoutedEventArgs e)
{
    this.Dispatcher.BeginInvoke(() => this.SamplePlayer.IsVideoControlsPanelVisible = true);
}

This way you should be able to show the controls panel in the beginning. The IsVideoPanelPinned should handle the visibility after the initial start up.

Hope this helps. Please let us know if you need more info.


Best wishes,
Hristo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Mark
Top achievements
Rank 2
answered on 30 Dec 2010, 02:35 PM
Great, thanks for the update guys.  I've been waiting for one since August.  Telerik delivers, as usual!  Any bug points coming my way?

Happy new year guys.
0
Hristo
Telerik team
answered on 30 Dec 2010, 03:15 PM
Hello MJ,

Yes, you deserve them. I missed to update them in the previous post.

Best wishes,
Hristo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ashish
Top achievements
Rank 1
answered on 21 Jan 2011, 07:14 PM
Guys how do you achieve the same functionality (when player is loaded) in VB.net?
Tags
MediaPlayer
Asked by
Mark
Top achievements
Rank 2
Answers by
Kiril Stanoev
Telerik team
Mark
Top achievements
Rank 2
Hristo
Telerik team
Steve
Top achievements
Rank 1
Ashish
Top achievements
Rank 1
Share this question
or