R – iPhone – streaming audio using UIWebView while displaying an image

audio-streamingiphoneuiwebview

When we stream audio on an iPhone using the UIWebView, it uses the QuickTime player to display the audio which is playing along with the time bar and other controls. It also shows the QuickTime logo.

Is there any way I can stream audio using UIWebView while displaying an image on the webview instead of the big QuickTime logo (something like creating own html page with img tag? But how do I add the audio to the html page?)

Thanks.

Best Answer

You can use avaudioplayer in the view which holds your uiwebview and play sound on viewController's viewDidLoad Method.