开发者

iOS 4.0 Volume Fade

No matter what I do I seem to run into problems.

I'm trying to create a fade over time on an actively playing streamed audio. So far the only players that seem to handle audio streaming properly are the MPMoviePlayerController and AVPlayer. Unfortunately neither one of them allow for volume change. (AVPlayer would allow volume change through mixing IF and only if it was performed on a local file).

The best player that would have been of use with volume changing integrated would have been AVAudioPlayer, unfortunately it only works on local files.

Through some research I noticed several discussions regarding Apple not giving control over System Volume (represented in MPVolumeView). Having said that, some apps still seem to be able to affect it. If Apple does not give control over it, how do these guys manage to do it?

Is there a trick behind it? Am I missing something in the documentation somewhere?

Any tip would be appre开发者_如何学运维ciated.


Some apps may show a hidden MPVolumeView and control it's state with clever subview introspection and hacking. It's an ugly workaround, but when applied carefully not unreasonable. (don't crash but degrade to no fade if the hierarchy changes)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜