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).
thanks in advance,
George
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
视频播放器使用的 MediaElement 将显示当前位置帧的缩略图。 否则,Expression Encoder 等工具会创建用于视频缩略图和章节标记的缩略图(JPEG 或 PNG)。
这将显示 Bear.wmv 视频的第一帧,并且不会自动播放:
如果您知道缩略图的来源时间,则可以拥有一个辅助 MediaElement,其当前位置具有该时间。 当播放开始时,您将折叠其可见性。
迈克尔
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.
This will show the first frame of the Bear.wmv video and won't play automatically:
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.
Michael
我同意上述答案有效,但它可能并不适合每种情况。 另一种方法是使用一个覆盖 mediaElement 的特定图像控件,并将其可见性绑定到“IsPlaying”属性。 您需要创建“IsPlaying”属性。
像这样的事情:
只是一个替代解决方案。 它们看起来都有点像黑客,但这就是我们所做的有趣的部分!
I agree that the above answer works, but it might not be optimal for every scenario. An alternate to this would be to have a specific image control that overlays the mediaElement and have it's visibility bound to an "IsPlaying" property. You would need to create the "IsPlaying" property.
Something like this:
Just an alternative solution. They both seem like hacks a little, but that's the fun part of what we do!