MPMoviePlayerController 音频节目“完成”按钮
我使用 MPMoviePlayerController 来播放音频流。 我的代码遵循以下示例:
一切正常,但在播放流时没有“完成” 按钮关闭播放器。
我首先使用普通的 .mp3 文件对其进行了测试。与文件唯一 我发现的可能性是跳到最后, 因此播放器会收到 MPMoviePlayerPlaybackDidFinishNotification
通知 (但这不会在无休止的流中起作用,因为没有时间表 跳到最后)。
我尝试了各种样式,例如 [mp setControlStyle:MPMovieControlStyleFullscreen];
但没有成功。
在文档中 MPMoviePlayerController 类代表:
此类播放任何电影或音频 iOS 支持的文件。这包括 流式内容和固定长度 文件
是否有可能在播放某些音频时显示该按钮 内容,或者还有其他解决方案吗?
我试图向您展示屏幕截图,但“新用户最多只能发布两个超链接”。
I use the MPMoviePlayerController to Play an Audio Stream.
My code follows the example at:
Everything works fine, but while the stream is playing there is no "done"
button to close the Player.
I tested it first with a normal .mp3 file. With the file the only
possibility I found is to skip to the end,
so the player gets the MPMoviePlayerPlaybackDidFinishNotification
notification
(but this won't work on an endless stream, since there is no timeline to
skip to the end).
I tried various styles like [mp setControlStyle:MPMovieControlStyleFullscreen];
with no succes.
In the documentation at
MPMoviePlayerController Class stands:
This class plays any movie or audio
file supported in iOS. This includes
both streamed content and fixed-length
files
Is there a possibility to display that button while playing some audio
content, or has anyone another solution?
I tried to show you an screenshot but "new users can only post a maximum of two hyperlinks".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己找到了解决方案。
使用
MPMoviePlayerViewController
类而不是MPMoviePlayerController
解决了这个问题:i found a solution by my self.
Using the
MPMoviePlayerViewController
class, instead ofMPMoviePlayerController
solved the problem:对于本地播放文件,请删除
否则它将返回
For playing file locally, remove
Other wise it will return