如何阻止 MPMoviePlayerController 在 iOS4.0 中的 iPod 控件上显示我的应用程序图标?
我使用 MPMoviePlayerController
在我的应用程序中播放电影。
当电影播放时,如果我双击主页按钮并向左滚动(iPod 图标通常以及“锁定方向”按钮所在的位置),我会看到我的应用程序的图标。
播放控件控制我的应用程序内的电影,即使我已导航到应用程序内的不同视图控制器。
我想关闭这个“功能”。有什么想法吗?
附带说明一下,我正在手动控制音频会话,此时会话为 AVAudioSessionPlayback
。
我已经研究了 MPMoviePlayerController 类参考一段时间,看看是否能找到任何东西,但似乎没有提及这种行为。
当我将应用程序置于后台时,它会执行您所期望的操作 - 将 iPod 图标返回到栏。
I use an MPMoviePlayerController
to play a movie inside my application.
When the movie is playing, if I double-press the home button and scroll to the left (where the iPod icon usually is as well as the "lock orientation" button), I see my app's icon.
The play controls control the movie inside my app, even if I had navigated to a different view controller inside my application.
I'd like to turn this "feature" off. Any ideas?
As a side note I am controlling the audio session manually, and the session is AVAudioSessionPlayback
at that point.
I've poked around the MPMoviePlayerController class reference for awhile to see if I could find anything, but it seems to make no reference of this behavior.
When I put my app into the background, it does what you would expect - returns the iPod icon to the bar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管我不知道您为什么想要这样做,但将音频会话设置为
AVAudioSessionCategorySoloAmbient
应该禁用该功能(但也会禁用在后台播放的功能)。另请确保
MPMoviePlayerController
上的useApplicationAudioSession
设置为YES
。Although I don't know why you would want that, setting your Audio Session to
AVAudioSessionCategorySoloAmbient
should disable that feature (but also disables the ability to play in the background).Also make sure that
useApplicationAudioSession
on yourMPMoviePlayerController
is set toYES
.