as3 |闪光|更好地理解将视频导入 Flash 的含义
我正在制作一个项目,其中包含许多视频。简而言之:假设我想在屏幕上放置 20 个视频(我不会将它们全部放在一起 - 例如,它们将在 5 页上各 4 个),并且用户可以听到其中 15 秒,然后做出决定如果他/她想播放整个视频。
这是我用于导入的通用代码(只是为了了解我如何导入):
playlistVideoDisplay[i].movie = new FLVPlayback();
playlistVideoDisplay[i].movie.load("videos/somefile.flv");
据我了解 - flash 加载 20 个每个 15 秒的视频会更容易 - 然后当用户请求特定视频时 - flash 将加载这个特定短片的完整视频。
但是 - 我更愿意使用另一种方式 - 加载完整长度(比方说 10/7/5 分钟),当用户可以播放 15 秒的样本时,如果他/她愿意,他将播放完整视频(无需重新加载新视频 - 并且不会在短视频和长视频之间进行平滑转换)。
我的问题是:我假设导入更大的电影会使闪存上的一切变得困难和缓慢,这是错误的吗?
I am making a project, that includes many videos. In short: let's say I want to put 20 videos that are on the screen (I won't put them all together - they would be 4 together each on 5 pages for example) and the user could hear 15 seconds of them and then decide if he/she wants to play the whole video.
this is the general code I use for import (just to understand how I import):
playlistVideoDisplay[i].movie = new FLVPlayback();
playlistVideoDisplay[i].movie.load("videos/somefile.flv");
To my understanding - It would be easier for flash to load 20 videos of 15 seconds each - and then when a user request a specific video - flash will load the full video of this specific short one.
BUT - I would much rather use the other way - loading full-length (let's say 10/7/5 minutes) and when the user can play the 15 second sample and, if he/she wishes, he will play the full video (without re-loading a new video - and not making a smooth transform between the short one and the long one).
My question is: Am I wrong by assuming that importing bigger movies would make everything hard and slow on flash?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先:如果不导入完整长度的 FLV:s,您可能会为您的用户带来很大帮助。如果是 20 个 5 分钟的视频,您需要导入 100 分钟的动态图片。就这么多了。对于使用有限带宽(例如移动宽带)上网的人来说,很容易占用每月分配的带宽的很大一部分。
仅出于这个原因,我会说采用小型预览。
话虽如此,我建议您看一下这个类: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html
流式传输肯定比加载所有这些视频更好。除非有特定原因要加载它们?
First of: you'd probably do your users a great favor by NOT importing the full length FLV:s. In the case of 20 5-minute videos you'd be importing 100 minutes of moving pictures. That's a lot. For someone surfing with limited bandwidth (say a mobile broadband) that could easily eat a big chunk of the monthly allocated bandwidth.
For that reason alone, I'd say go with the small previews.
Having said that, I'd recommend you have a look at this class: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html
Streaming would definitively be a better idea than loading all of those videos. Unless there's a specific reason why you want to load them?