I'm using this code to play a radio stream:
NSURL *vibes = [NSURL URLWithString:@"http://website.com:8002"];
vPlayer = [[AVPlayer alloc] initWithURL:vibes];
[vplayer play];
Works well while the app is open, but when I go to the background it stops playing. I need it to keep playing in the background like the music app.
您需要阅读《 Apple的音频会话编程指南》 。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.