Commit 171f0909 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola
Browse files

[Playback] Check for iOS 9.1 availability

`ChangePlaybackPosition` is available with iOS 9.1 and up

(cherry picked from commit 782c3dd3)
parent a37bc071
......@@ -129,11 +129,13 @@ static inline NSArray * RemoteCommandCenterCommandsToHandle()
[_remoteControlServiceDelegate remoteControlService:self setPlaybackRate:rateEvent.playbackRate];
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);
return MPRemoteCommandHandlerStatusCommandFailed;
Supports Markdown
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