...
 
Commits (2)
...@@ -97,7 +97,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -97,7 +97,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
* Formal protocol declaration for playback delegates. Allows playback messages * Formal protocol declaration for playback delegates. Allows playback messages
* to be trapped by delegated objects. * to be trapped by delegated objects.
*/ */
@protocol VLCMediaPlayerDelegate @protocol VLCMediaPlayerDelegate <NSObject>
@optional @optional
/** /**
......
...@@ -1556,8 +1556,15 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self) ...@@ -1556,8 +1556,15 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
NSString *filePath = arguments.firstObject[@"filePath"]; NSString *filePath = arguments.firstObject[@"filePath"];
BOOL isRecording = [arguments.firstObject[@"isRecording"] boolValue]; BOOL isRecording = [arguments.firstObject[@"isRecording"] boolValue];
isRecording ? [_delegate mediaPlayerStartedRecording:self] if (isRecording) {
: [_delegate mediaPlayer:self recordingStoppedAtPath:filePath]; if ([_delegate respondsToSelector:@selector(mediaPlayerStartedRecording:)]) {
[_delegate mediaPlayerStartedRecording:self];
}
} else {
if ([_delegate respondsToSelector:@selector(mediaPlayer:recordingStoppedAtPath:)]) {
[_delegate mediaPlayer:self recordingStoppedAtPath:filePath];
}
}
} }
@end @end