Skip to content
This repository
Browse code

[IOS] media controlbar add support seek forward and rewind.

  • Loading branch information...
commit ad19633a7231cef57656f5ef84e7750db20a49e7 1 parent f4b1dbb
ulion authored March 08, 2013

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. 16  xbmc/osx/ios/XBMCController.mm
16  xbmc/osx/ios/XBMCController.mm
@@ -951,6 +951,22 @@ - (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {
951 951
       case UIEventSubtypeRemoteControlPreviousTrack:
952 952
         CApplicationMessenger::Get().SendAction(ACTION_PREV_ITEM);
953 953
         break;
  954
+      case UIEventSubtypeRemoteControlBeginSeekingForward:
  955
+        // use 4X speed forward.
  956
+        CApplicationMessenger::Get().SendAction(ACTION_PLAYER_FORWARD);
  957
+        CApplicationMessenger::Get().SendAction(ACTION_PLAYER_FORWARD);
  958
+        break;
  959
+      case UIEventSubtypeRemoteControlBeginSeekingBackward:
  960
+        // use 4X speed rewind.
  961
+        CApplicationMessenger::Get().SendAction(ACTION_PLAYER_REWIND);
  962
+        CApplicationMessenger::Get().SendAction(ACTION_PLAYER_REWIND);
  963
+        break;
  964
+      case UIEventSubtypeRemoteControlEndSeekingForward:
  965
+      case UIEventSubtypeRemoteControlEndSeekingBackward:
  966
+        // restore to normal playback speed.
  967
+        if (g_application.IsPlaying() && !g_application.IsPaused())
  968
+          CApplicationMessenger::Get().SendAction(ACTION_PLAYER_PLAY);
  969
+        break;
954 970
       default:
955 971
         LOG(@"unhandled subtype: %d", receivedEvent.subtype);
956 972
         break;

0 notes on commit ad19633

Please sign in to comment.
Something went wrong with that request. Please try again.