Video 对象和 FLVPlayback 组件有什么区别?

发布于 2024-08-20 22:12:38 字数 87 浏览 1 评论 0原文

这两个对象的使用有什么区别?

哪一个应该用于具有自定义皮肤和播放列表的“类似 Youtube”的视频播放器?

What is the differences in use of these two objects?

Which one should be used for a "Youtube-like" video player with a custom skin and playlist?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

甜`诱少女 2024-08-27 22:12:38

“组件”确实是这里的关键词,Video 是基础对象,FLVPlayback 组件是一个在内部使用 Video 对象的 UI 包装器。它为开发人员提供了一个简单的界面,可以将带有用户控件的视频内容添加到他们的应用程序中。

"Component" really is the key word here, Video is the base object, the FLVPlayback Component is a UI wrapper that uses the Video object internally. It provides a simple interface for developers to add video content, with user controls, to their applications.

苦妄 2024-08-27 22:12:38

FLVPlayback 是一个已经具有控件的组件 - 滚动条、播放/暂停按钮...等。视频对象是仅具有视频区域的对象。

如果您想要执行类似 YouTube 播放器的操作,则需要从 FLVPlayback 组件开始并为其设置外观 (示例)。但您必须自己构建播放列表或使用 Flash 中的 List/DataGrid 组件。

FLVPlayback is a component that already has the controls - scrollbar, play/pause button...etc. Video object is an object that only has the video area.

If you want to do something like the YouTube player, you will need to start with the FLVPlayback component and skin it (Example). But you will have to build a playlist by yourself or use the List/DataGrid components in flash.

淡写薰衣草的香 2024-08-27 22:12:38

FLVPlayback 组件是 Video 类的控制器,它实现了一些 UI 逻辑。

它不仅添加了可换肤的 UI,还实现了名为“ActionScript 提示的功能点”,您可以在运行时添加。这可能是一个非常简单的机制,以预设的时间间隔查看播放时间并按顺序执行任何过期的提示点。我实现了类似的方法来为 SWF 文件提供外部提示点。正如链接中提到的,这种调度提示事件的方法可能不如在视频中嵌入提示点准确(声称它可以关闭多达十分之一秒),但我认为它更灵活,我不会如果您自己实现了这个简单的功能,则不要期望误差幅度会大于帧延迟(例如,60fps 时约为 16 毫秒)。

对于类似 YouTube 的播放器,我会使用 Video 类,因为我可以完全控制 UI,无论如何这都非常简单(涉及调用播放、暂停、恢复、查找和监听一些事件等方法) 。您不会受到现有蒙皮系统的束缚,而且它还可以让您更好地控制访问 NetStream 的帧,以便在搜索时生成帧预览。

FLVPlayback component is a controller for the Video class, and it implements some UI logic.

Not only does it add a skinnable UI, it also implements something called "ActionScript cue points", which you can add at run time. It's probably a very simple mechanism that peeks at the playback time at preset intervals and executes any overdue cue points in order. I implemented something similar for having external cue points for SWF files. As mentioned in the link, this method of dispatching cued events is probably less accurate than embedding cue points in the video (claiming it can be off by as much as a tenth of a second), but I think it's more flexible, and I wouldn't expect the margin of error to be any greater than the frame delay (e.g. ~16ms at 60fps) if you just implemented this simple feature yourself.

For a YouTube-like player, I'd use the Video class, because I'd have complete control over UI, which is very simple anyway (involves calling methods like play, pause, resume, seek, and listening for a few events). You wouldn't be tied into the existing skinning system, and it would also give you more control accessing frames of the NetStream for generating frame previews when seeking.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文