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 protected]
Twitter: heathborders
http://heath-tech.blogspot.com



On Thu, Jul 28, 2011 at 2:06 PM, Steve Kostrey <[email protected]> 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 protected])
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/heath.borders%40gmail.com
>
> This email sent to [email protected]
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to