如何更新编码器附带的媒体播放器的播放列表? [英] How to update playlist of mediaplayer that comes with encoder?

查看:62
本文介绍了如何更新编码器附带的媒体播放器的播放列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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:


解决方案


Yes

Example:

...

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆