Silverlight 视频的缩略图 [英] Thumbnail image of Silverlight video

查看:36
本文介绍了Silverlight 视频的缩略图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于流行的视频播放器,如 sl2videoplayer,http://www.codeplex.com/sl2videoplayer,我的问题是Siverlight视频的缩略图在我们点击播放之前是如何显示的(在非自动播放的情况下).

For the popular video player, like sl2videoplayer, http://www.codeplex.com/sl2videoplayer, my question is how is the thumbnail image of Siverlight video is displayed before we click play (in the scenario of non-autoplay).

提前致谢,乔治

推荐答案

视频播放器使用的 MediaElement 将在当前位置显示帧的缩略图.否则,Expression Encoder 等工具会创建缩略图(JPEG 或 PNG),用于视频缩略图和章节标记.

the MediaElement that the Video Player uses will show a thumbnail image of the frame at the current position. Otherwise, tools like Expression Encoder create thumbnail images (JPEGs or PNGs) that will be used for the video thumbnails and chapter markers.

这将显示 Bear.wmv 视频的第一帧,并且不会自动播放:

This will show the first frame of the Bear.wmv video and won't play automatically:

<Grid x:Name="LayoutRoot" Background="White">
    <MediaElement AutoPlay="False" Source="Bear.wmv"/>
</Grid>

如果您知道缩略图来自的时间,您可以拥有一个具有该时间的当前位置的辅助 MediaElement.播放开始时,您将折叠其可见性.

If you knew the time that the thumbnail comes from, you could have a secondary MediaElement with its Current Position having that time. When playback starts, you would collapse its visiblity.

迈克尔

这篇关于Silverlight 视频的缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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