Discussion Forums  >  WebViews and HTML for Mobile

Replies: 10    Views: 148

farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
06/04/13 03:32 AM (10 years ago)

Stop Html audio overlapping

Hi, I am turning blue in the face Googling and trying to stop several html audio to play simultaneously on IOS. There has been a few posts on this matter but no real answer. Apparently there is a similar scenario in pure HTML5 browser. If you have 2 browser tabs on an Iphone 4 each with a paused audio element. The built in play button will start both audio elements play simultaneous. You have to kill all other active audio elements somehow when instantiating a new one. I came across a possible solution but can't find a way to implement it: "When the webview is supposed to exit, run this code: NSURLRequest *emptyRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]; [webView loadRequest:emptyRequest]; This code actually loads an empty request, thus killing all the current elements and objects in the current webview." Where does this go, anybody has any word of wisdom for us? Cheers, Farcat PS: Source- http://www.nurne.com/2013/01/ios-snippet-how-to-stop-all-audio-html.html
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/14/13 11:44 AM (10 years ago)
Farcat, did you get this working? David https://buzztouchmods.com/market
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
11/14/13 01:04 PM (10 years ago)
Yep, @Kitssy gave me the solution. I made a post about that, let me dig it up. Farcat
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
11/14/13 01:06 PM (10 years ago)
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/14/13 01:47 PM (10 years ago)
Awesome! Thanks mate. David https://buzztouchmods.com/market
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
11/14/13 01:53 PM (10 years ago)
My pleasure, thanks again to super-Kitssy!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/14/13 01:56 PM (10 years ago)
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
11/14/13 02:05 PM (10 years ago)
He's a machine! He'll quote you from the top of his head a piece of code he has glanced at for two seconds on a foggy night six years ago. Well.. maybe he hasn't got fog in his office but you get what I mean :)
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/14/13 02:21 PM (10 years ago)
Actually Kittsy has helped me in a ton of projects on and off, so I was really stoked when I saw his Favorites plugin, the thing I think make a buzztouch app the most customizable. Only he could have done that first. Where do you live by the way? Any chance you can meetup in San Diego for buzzday? :-) David https://buzztouchmods.com/market
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
11/14/13 02:28 PM (10 years ago)
Would love to, gotta win the lottery first. Well, technically I have to play the lottery first... I live in Gibraltar (on the southern end of the Iberian Peninsula), I am aiming to attend one of the Buzzday in Oxford soon. Looking forward to hearing about your meet up in San Diego and see the pictures. :) Farcat
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/14/13 05:52 PM (10 years ago)
Oh my god, I don't even have one clue of where you are, you could be in the uk, europe, or africa as far as I can tell. LOL! Sad to hear that, maybe the official buzzcon '14? :) David https://buzztouchmods.com/market
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.