重置/重复使用 Flex 进度条

发布于 2024-08-15 19:57:31 字数 296 浏览 1 评论 0原文

我使用进度条让用户知道在开始播放之前还需要缓冲多少实时流视频数据。有这么多工作正常。

问题是,如果缓冲区用完,并且我需要重新缓冲,我似乎无法重置进度条并再次可见。似乎一旦应用程序启动时达到 100%,就无法重复使用。我在这里缺少什么?

我正在捕获正确的 NetStream.netStatus 事件。空缓冲区的钩子在那里并且正在执行。我只是不知道如何重新展示并在那里开始一个新的酒吧?

我尝试过 bar.visible = true 但什么也没有出现。还尝试制作一个新的,并在每次缓冲区为空但没有骰子时设置可见。似乎只是被忽略了。

I'm using a progress bar to let a user know how much more live streaming video data is to be buffered before it starts playing. Have that much working fine.

Problem is, if the buffer gets used up, and I need to rebuffer, I can't seem to get the progress bar reset and visible again. Seems once it hits 100% on app start up it can't be reused. What am I missing here?

I'm catching the proper NetStream.netStatus events. The hook for the empty buffer is there and is executing. I'm just not seeing how I might redisplay and start a fresh bar there?

I've tried bar.visible = true and nothing appears. Also tried making a new one and setting visible each time the buffer is empty but no dice. Seems to just be ignored.

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

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

发布评论

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

评论(2

我一向站在原地 2024-08-22 19:57:31

您可以强制进度条重置“pBar.setProgress(0,100);”,这会将其设置回 0。当您知道必须重新缓冲时,只需手动执行此操作即可。

you can force the progress bar to reset "pBar.setProgress(0,100);", that will set it back to 0. just manually do that when you know that you have to rebuffer.

往日情怀 2024-08-22 19:57:31

不,销毁旧的并用相同的 id 创建一个新的。

这似乎可行,但我不太确定这里的最佳实践是什么。每次需要展示一个时我都应该制作新的吗?难道没有一种方法可以简单地将旧的召回到屏幕上并将其进度重置为零吗?

No, destroying the old one and making a new one with the same id.

That seems to be kind of working, but I'm not really sure what the best practice is here. Should I be making new ones each time I need to display one? Isn't there a way to simply recall the old one to the screen and reset it's progress to zero?

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