如何更新编码器附带的媒体播放器的播放列表? [英] How to update playlist of mediaplayer that comes with encoder?
问题描述
我在silverlight论坛上发布了这个问题,但这可能是一个更好的地方。我需要能够更新表达式媒体播放器的播放列表,同时它正在运行,而无需重新初始化它。我开始查看源代码并发现:
是
示例:
...
var newItem = new PlaylistItem();
newItem.Title =" Howdy";
newItem.IsAdaptiveStreaming = false;
newItem.VideoWidth = 1280;
newItem.VideoHeight = 720;
newItem.FrameRate = 29.97;
newItem.FileSize = 123456789;
newItem.MediaSource = new Uri(" http://mycoolwebsite/videos/Howdy.wmv ",UriKind.Absolute);
newItem.ThumbSource = new Uri(" http://mycoolwebsite/thumbs/Howdy.jpg ",UriKind.Absolute);
int currentCount = player.Playlist.Items.Count;
player.Playlist.Items.Inserttem(currentCount,newItem);
player.GoToPlaylistItem(currentCount);
...
I posted this question on silverlight forum, but this maybe a better place. I need to be able to update a playlist of an expression mediaplayer, while it is running, without reinitializing it. I started to look at the source and found this:
YesExample:
...
var newItem = new PlaylistItem();
newItem.Title = "Howdy";
newItem.IsAdaptiveStreaming = false;
newItem.VideoWidth = 1280;
newItem.VideoHeight = 720;
newItem.FrameRate = 29.97;
newItem.FileSize = 123456789;newItem.MediaSource = new Uri("http://mycoolwebsite/videos/Howdy.wmv", UriKind.Absolute);
newItem.ThumbSource = new Uri("http://mycoolwebsite/thumbs/Howdy.jpg", UriKind.Absolute);int currentCount = player.Playlist.Items.Count;
player.Playlist.Items.Inserttem(currentCount, newItem);
player.GoToPlaylistItem(currentCount);
...
这篇关于如何更新编码器附带的媒体播放器的播放列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!