2011-05-25 82 views
0

加載音頻我加載的MP3播客流成一個UIWebView如下:的iOS:問題從URL中的UIWebView

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 

    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:@"http://localhost/podcasts/downloader/download.mp3?af=a&f=10109"]]; 

    [webView loadRequest:request]; 

} 

流出現加載,然後UIAlert出現說:

An error occurred while exchanging data. "Plug-in handled load" 

在QuickTime中正確加載流並播放後立即生效。爲什麼會出現此警報?

我不想使用AVAudioPlayer播放流,而是使用QuickTime。

+0

AVAudioPlayer _is_ QuickTime。 – 2011-05-25 22:01:19

回答

2

如果您在iOS上,則URL指向本地主機,並且設備上可能沒有Web服務器。

0

您可以忽略該錯誤。它是讓你知道quicktime正在處理負載。

//Playing audio gives error that says plug-in handled load 
if([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 204) 
{ 
    // Ignore it 
}