Always Display Playlist?

13 posts, 1 answers
  1. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 28 Aug 2010 Link to this post

    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
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 01 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 03 Sep 2010 Link to this post

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

    Posted 08 Sep 2010 Link to this post

    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
  6. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 18 Sep 2010 Link to this post

    That did it, thank you!
  7. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 08 Oct 2010 Link to this post

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

    Posted 14 Oct 2010 Link to this post

    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
  9. Steve
    Steve avatar
    1 posts
    Member since:
    Aug 2010

    Posted 29 Dec 2010 Link to this post

    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.
  10. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 29 Dec 2010 Link to this post

    I'm still having the same problem.
  11. Answer
    Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 30 Dec 2010 Link to this post

    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
  12. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 30 Dec 2010 Link to this post

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

    Posted 30 Dec 2010 Link to this post

    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
  14. Ashish
    Ashish avatar
    1 posts
    Member since:
    Nov 2010

    Posted 21 Jan 2011 Link to this post

    Guys how do you achieve the same functionality (when player is loaded) in VB.net?
Back to Top
DevCraft banner