iPhone 上的动画音频播放按钮
我正在通过 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是一些您可能会觉得有用的页面。
基本上,使用这些教程,您应该能够在播放按钮后面绘制圆弧,该圆弧延伸到按钮本身之外。弧线的角度应该是音频文件的进度百分比(浮点数)(即 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.