Currently developing a browser with support for multiple tabs on the iPad, but facing an issue due to iOS restrictions that only allow one tab to play audio/video at a time. When attempting to play media in multiple tabs simultaneously, it results in all audio stopping and not resuming.
I've observed that Google Chrome's browser handles this by stopping media playback in inactive tabs. I'm curious about their approach. While I am aware of using
[webView loadRequest:NSURLRequestWithString(@"about:blank")];
to completely stop media playback, it leaves a blank screen. My goal is to simply pause the media without affecting the page display.
Is there a JavaScript solution to halt media playback in a UIWebView? If so, how would I implement it (as someone unfamiliar with JavaScript)?
Thank you in advance!