瀏覽代碼

fix remote control commands on pre iOS 7.1. (closes #14996)

(cherry picked from commit a7530da626939d818747ca6d202e0df4b031cfcf)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Tobias Conradi 10 年之前
父節點
當前提交
f06bd2e2f8
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 6 0
      Sources/VLCAppDelegate.m
  2. 1 0
      Sources/VLCPlaybackController.h

+ 6 - 0
Sources/VLCAppDelegate.m

@@ -416,6 +416,12 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
                                                  scrollPosition:UITableViewScrollPositionNone];
 }
 
+#pragma mark - remote events pre 7.1
+
+- (void)remoteControlReceivedWithEvent:(UIEvent *)event {
+    [[VLCPlaybackController sharedInstance] remoteControlReceivedWithEvent:event];
+}
+
 #pragma mark - watch struff
 - (void)application:(UIApplication *)application
 handleWatchKitExtensionRequest:(NSDictionary *)userInfo

+ 1 - 0
Sources/VLCPlaybackController.h

@@ -95,5 +95,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 - (void)playMediaList:(VLCMediaList *)mediaList firstIndex:(int)index;
 - (void)playURL:(NSURL *)url successCallback:(NSURL*)successCallback errorCallback:(NSURL *)errorCallback;
 - (void)playURL:(NSURL *)url subtitlesFilePath:(NSString *)subsFilePath;
+- (void)remoteControlReceivedWithEvent:(UIEvent *)event;
 
 @end