闪存带宽检测

发布于 2024-08-11 23:31:29 字数 96 浏览 3 评论 0 原文

flash 有没有办法检测用户的带宽,并根据带宽的大小,停止加载或继续加载?现在我在想,这可能是一个javascript检测脚本,如果带宽高,则加载.swf,如果不加载.jpg?

Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?

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

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

发布评论

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

评论(3

感性 2024-08-18 23:31:29

您可以将内容分成几个部分:关键的和非关键的。加载第一个,计时,如果满足要求,则加载第二个。我之前在一款有配音的游戏中做过这样的事情。您可以在没有它们的情况下玩游戏,因此如果我检测到实际游戏加载缓慢,我会提示用户。然后他们可以选择等待声音,或者继续玩。

You could break your content into pieces, the crucial, and the non-crucial. Load the first, time it, and then load the second if the requirements are met. I've done this before with a game that had voiceovers. You could play the game without them, so I prompted the user if I detected a slow load for the actual game. They could then choose to wait for sound, or go ahead and play.

一个人的夜不怕黑 2024-08-18 23:31:29

您可能想检查一下...

http://www.springload.co.nz/love-the-web/detecting-bandwidth-with-flash-and-loading-the-right-content

... Adobe 有一些服务器端带宽脚本...

http://www.adobe.com/livedocs/flashmediaserver/3.0/hpdocs/help.html?content=00000074.html

...如果您使用他们的媒体服务器。

然而,除了实际下载已知大小的文件和计时需要多长时间之外,我不确定是否有一种简单的方法可以做到这一点,并且当您开始下载某些内容时,对于您的用户来说可能已经为时已晚。如果您的网站的第一体验是他们必须坐下来等待带宽测量,他们很可能会点击离开。

最好为用户提供选项,允许他们在高带宽全保真体验和低带宽简单 UI 之间切换。

You might want to check this out...

http://www.springload.co.nz/love-the-web/detecting-bandwidth-with-flash-and-loading-the-right-content

... and Adobe have some server side bandwidth scripts...

http://www.adobe.com/livedocs/flashmediaserver/3.0/hpdocs/help.html?content=00000074.html

... if you're using their media server.

However, beyond actually downloading a file of known size and timing how long it take I'm not sure there's a simple way of doing this, and by the time you've started downloading something it might already be too late for your user. If the first experience of your website is that they have to sit around waiting for a bandwidth measurement they might well click away.

It might be better to give the option to the user to allow them to switch between a high bandwidth full-fedelity experience and a low bandwidth simple UI.

薄荷→糖丶微凉 2024-08-18 23:31:29

通过 this.getBytesLoaded() 和 this.getBytesTotal() 你可以知道加载状态。
一段时间后,即 5 秒,您可以看到进展情况,并最终决定跳过。

With this.getBytesLoaded() and this.getBytesTotal() you know the loading status.
After some time, i.e. 5 seconds, you can see how it is going, and eventually decide to skip.

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