使用MPMoviePlayerController时,播放按钮被下一步和上一页按钮包围。
When using the MPMoviePlayerController, the play button is surrounded with "Next" and "Previous" buttons.
如何点击通知? 有没有办法用内容列表(数组)提供MPMoviePlayerController?
How do I get notifications when they are clicked? is there a way to feed MPMoviePlayerController with a list (array) of content?
推荐答案Nathan对于需要是正确的如果您想要按钮通知,请为播放器实现自己的UI。您可以从播放器获取有关播放状态的通知。
Nathan is correct about needing to implement your own UI for the player if you want button notifications. You can get notifications from the player about playback state though.
来自AddMusic示例,其中self是包含MPMusicPlayerController实例的控制器或模型:
from the AddMusic example, where self is the controller or model containing the instance of MPMusicPlayerController:
- (void) registerForMediaPlayerNotifications { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; [notificationCenter addObserver: self selector: @selector (handle_NowPlayingItemChanged:) name: MPMusicPlayerControllerNowPlayingItemDidChangeNotification object: musicPlayer]; [notificationCenter addObserver: self selector: @selector (handle_PlaybackStateChanged:) name: MPMusicPlayerControllerPlaybackStateDidChangeNotification object: musicPlayer]; /* // This sample doesn't use libray change notifications; this code is here to show how // it's done if you need it. [notificationCenter addObserver: self selector: @selector (handle_iPodLibraryChanged:) name: MPMediaLibraryDidChangeNotification object: musicPlayer]; [[MPMediaLibrary defaultMediaLibrary] beginGeneratingLibraryChangeNotifications]; */ [musicPlayer beginGeneratingPlaybackNotifications]; }更多推荐
iPhone MPMoviePlayerController上的下一个/上一个按钮
发布评论