Reputation: 17
I am loading an MP3 podcast stream into a UIWebView as follows:
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:@"http://localhost/podcasts/downloader/download.mp3?af=a&f=10109"]];
[webView loadRequest:request];
}
The stream appears to load, and then a UIAlert appears saying:
An error occurred while exchanging data. "Plug-in handled load"
And immediately after the stream loads properly in QuickTime and plays. Why is this alert appearing?
I'd prefer not to use AVAudioPlayer to play the stream, but rather QuickTime.
Upvotes: 0
Views: 1230
Reputation: 3822
You can just ignore that error. It is to let you know that quicktime is handling the load.
//Playing audio gives error that says plug-in handled load
if([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 204)
{
// Ignore it
}
Upvotes: 0
Reputation: 93
If you are on iOS, the URL is pointing to localhost, and there are probably no web server on the device.
Upvotes: 2