Reputation: 1018
I have built a navigation controller that on the final page displays a video relating to previous choices. This part works fine. The video is embed from youtube onto a webpage and displayed via a webview.
<iframe type="text/html" id="video" width="100%" height="50%" src="http://www.youtube.com/embed/VIDEOID" frameborder="0"><br/></iframe>
The problem I'm having is when I click back through the navigation controller the video (well sound) continues to play in the background. This only happens on the iPad as the video is played in the window, where as on the iPhone it is played in a new modal window.
How can I stop this? any help welcome, thanks in advance.
Upvotes: 3
Views: 2895
Reputation: 457
You need to load a blank page into the UIWebView to stop the audio:
[yourWebView loadHTMLString:@"" baseURL:nil];
Upvotes: 7