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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to