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