iPhone 上的动画音频播放按钮

发布于 2024-11-26 15:23:41 字数 286 浏览 8 评论 0原文

我正在通过 FMOD 在我的应用程序中播放音频。在我的媒体播放器中,我目前只有一个带有滑块的播放按钮,用于跟踪音频剪辑的进度。我想做的基本上是有一个围绕播放按钮的滑块,显示那里的进度。

例如,jplayer中的播放按钮: http://www.jplayer.org/

我环顾四周但还没有找到任何库或任何关于如何在 Objective-C 中实现这一点的教程。

有什么帮助/建议吗?

I am playing audio in my app through FMOD. In my media player I currently just have a play button with a slider that tracks your progress through the audio clip. What I want to do is have basically a slider that wraps around the play button, showing the progress there.

For example, the play button in jplayer: http://www.jplayer.org/

I have looked around but have not found any libraries out there or any tutorials on how to implement this in Objective-C.

Any help/suggestions?

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

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

发布评论

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

评论(1

錯遇了你 2024-12-03 15:23:41

以下是一些您可能会觉得有用的页面。

基本上,使用这些教程,您应该能够在播放按钮后面绘制圆弧,该圆弧延伸到按钮本身之外。弧线的角度应该是音频文件的进度百分比(浮点数)(即 0.0 到 1.0)乘以 360 度。

请记住此设计对用户界面的影响。如果您支持圆形进度条,那么用户将很难找到音频文件的不同部分。

Here are some pages you might find useful.

Basically, using these tutorials, you should be able to draw the arc of a circle behind your play button, which extends outside the button itself. The angle of the arc should be the percentage of the progress through the audio file as a float (i.e. 0.0 to 1.0), multiplied by 360 degrees.

Do keep in mind the user interface implications of this design. Having a circular progress bar will make it very difficult for the user to seek to different parts of the audio file, if that's a feature you support.

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