【发布时间】:2014-06-18 01:25:04
【问题描述】:
我有一个从 url 加载 m3u 的 UIWebView:
NSString *url = @"http://141.217.20.38:8000/live.m3u";
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
接着是:
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
UIBackgroundTaskIdentifier newTaskId = UIBackgroundTaskInvalid;
newTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:NULL];
这适用于模拟器,但是当我通过 Xcode(使用开发配置文件)将它安装在设备 (iPhone 5) 上时,音频不会在后台播放。
我不确定我错过了什么,但我们将不胜感激。
【问题讨论】:
标签: ios audio background m3u