Commit 782c3dd3 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

[Playback] Check for iOS 9.1 availability

`ChangePlaybackPosition` is available with iOS 9.1 and up
parent ca30a29f
......@@ -129,10 +129,12 @@ static inline NSArray * RemoteCommandCenterCommandsToHandle()
[_remoteControlServiceDelegate remoteControlService:self setPlaybackRate:rateEvent.playbackRate];
return MPRemoteCommandHandlerStatusSuccess;
}
if (event.command == cc.changePlaybackPositionCommand) {
MPChangePlaybackPositionCommandEvent *positionEvent = (MPChangePlaybackPositionCommandEvent *)event;
[_remoteControlServiceDelegate remoteControlService:self setCurrentPlaybackTime:positionEvent.positionTime];
return MPRemoteCommandHandlerStatusSuccess;
if (@available(iOS 9.1, *)) {
if (event.command == cc.changePlaybackPositionCommand) {
MPChangePlaybackPositionCommandEvent *positionEvent = (MPChangePlaybackPositionCommandEvent *)event;
[_remoteControlServiceDelegate remoteControlService:self setCurrentPlaybackTime:positionEvent.positionTime];
return MPRemoteCommandHandlerStatusSuccess;
}
}
NSAssert(NO, @"remote control event not handled");
APLog(@"%s Wasn't able to handle remote control event: %@",__PRETTY_FUNCTION__,event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment