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

Dynamic changing playlist

3 Answers 62 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Mirco
Top achievements
Rank 1
Mirco asked on 24 Oct 2010, 01:04 PM
Hello,
what about the possibility of dynamically changing the playlist of the RadMediaPlayer?
This is the problem: I need to check for the server-side change of the playlist anytime the media player ends the visualization of a certain video file. At this time I need to check for the following video to show in my server-side playlist and then to start it into the mediaplayer. I know that I must crate dinamically the RadMediaItem starting from my server-side playlist but ...when?
I've tried with the events of the MediaPlayer but I did'nt succed.
Moreover, I need to show only the video at fullscreen without any control and playlist visible. Is it possibile?
Thanks,
Mirco

3 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 28 Oct 2010, 09:16 AM
Hi Mirco,

 I'm not sure what exactly is causing you troubles, but as far as I understand the case - you should  handle the CurrentStateChanged and query your server playlist using remote call. Then you should get the changed playlist and recreate the MediaItems (or better you can bind the ItemsSource property to a ObservableCollection and change it according to the new playlist items.) 
About your second inquiry - you can do this with changing the ControlTemplate dynamically when in Full screen and not. Also note that with the upcoming Q3 release the RadMediaPlayer will support natively FullScreen and also we will add the Feature you requested about hiding the panel with media controls.
If you have further questions, please let us know. 

Sincerely yours,
Miro Miroslavov
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
Geovani
Top achievements
Rank 1
answered on 05 Nov 2010, 01:24 PM

Hello, I’m working on dynamically changing the Playlist of the RadMediaPlayer. Like you said, I’ve created an ObservableCollection and I change it according to the new playlist items. It’s working perfectly.

When I hit the delete video button in the same screen, it deletes the selected video from the ObservableCollection and sets the property SelectedIndex to -1. But the progress bar, current time, total seconds, total time doesn’t change.
What I need is set all these properties to 0. What could I do to resolve it?

private void client_DeleteDocumentCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
    this.items.Remove(this.mediaPlayer.SelectedMediaItem);
    this.mediaPlayer.SelectedIndex = - 1;
    this.mediaPlayer.IsPlaylistVisible = true;
}


0
Hristo
Telerik team
answered on 09 Nov 2010, 02:30 PM
Hi Geovani,

You could set the Position property to 0. But this will change the progress bar only.

Currently there is no way to set CurrentTime(Seconds) and TotalTime(Seconds) because they are read only. The player changes these values internally when the movie is playing. But when the movie is stopped and item is removed from the player these properties are left unchanged. This is a bug and we will try to fix it with one of our next internal builds. I've logged the bug and you can track for its progress through following link: http://www.telerik.com/support/pits.aspx#/public/silverlight/3933

Sincerely yours,
Hristo
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
Tags
MediaPlayer
Asked by
Mirco
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Geovani
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or