Re: MPMoviePlayerController Fast forward
Re: MPMoviePlayerController Fast forward
- Subject: Re: MPMoviePlayerController Fast forward
- From: Heath Borders <email@hidden>
- Date: Fri, 29 Jul 2011 13:31:16 -0500
You could do key-value observing on currentPlaybackRate.
http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMediaPlayback_protocol/Reference/Reference.html#//apple_ref/occ/intfp/MPMediaPlayback/currentPlaybackRate
-Heath Borders
email@hidden
Twitter: heathborders
http://heath-tech.blogspot.com
On Thu, Jul 28, 2011 at 2:06 PM, Steve Kostrey <email@hidden> wrote:
> I've implemented MPMoviePlayerController (iPhone/iPad) and I'm playing videos without trouble but I'm not sure how to receive an event from the Fast forward overlay button.
> I've tried everything the documentation suggests about remote control but I'm not sure that's the way.
>
> I've tried the following code:
>
> [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
> [self becomeFirstResponder];
>
> - (BOOL)canBecomeFirstResponder {
> return YES;
> }
>
> - (void)remoteControlReceivedWithEvent:(UIEvent *)event {
>
> if( event.type == UIEventTypeRemoteControl ) {
> NSLog(@"sub type: %d", event.subtype);
> }
> }
>
> Not sure where to place this (and when I place it in the header I get redefinition errors):
>
> typedef enum {
> // available in iPhone OS 3.0
> UIEventSubtypeNone = 0,
>
> // for UIEventTypeMotion, available in iPhone OS 3.0
> UIEventSubtypeMotionShake = 1,
>
> // for UIEventTypeRemoteControl, available in iPhone OS 4.0
> UIEventSubtypeRemoteControlPlay = 100,
> UIEventSubtypeRemoteControlPause = 101,
> UIEventSubtypeRemoteControlStop = 102,
> UIEventSubtypeRemoteControlTogglePlayPause = 103,
> UIEventSubtypeRemoteControlNextTrack = 104,
> UIEventSubtypeRemoteControlPreviousTrack = 105,
> UIEventSubtypeRemoteControlBeginSeekingBackward = 106,
> UIEventSubtypeRemoteControlEndSeekingBackward = 107,
> UIEventSubtypeRemoteControlBeginSeekingForward = 108,
> UIEventSubtypeRemoteControlEndSeekingForward = 109,
> } UIEventSubtype;
>
>
> Bottom line is I would love to receive the FF event. Has anyone successfully done this?
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden