iOS 學習總結----音訊/視訊處理
阿新 • • 發佈:2019-01-30
if
(event.type
==
UIEventTypeRemoteControl) {
switch (event.subtype) {
case UIEventSubtypeRemoteControlPlay:
[ _player play];
break;
case UIEventSubtypeRemoteControlPause:
[ _player pause];
break ;
case UIEventSubtypeRemoteControlNextTrack:
NSLog(@"下一首");
break;
case UIEventSubtypeRemoteControlPreviousTrack:
NSLog(@"上一首");
break;
default:
break;
}
switch (event.subtype) {
case UIEventSubtypeRemoteControlPlay:
[ _player play];
break;
case UIEventSubtypeRemoteControlPause:
[ _player pause];
break
case UIEventSubtypeRemoteControlNextTrack:
NSLog(@"下一首");
break;
case UIEventSubtypeRemoteControlPreviousTrack:
NSLog(@"上一首");
break;
default:
break;
}