Discussion Forums  >  WebViews and HTML for Mobile

Replies: 5    Views: 103

Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
11/16/12 04:57 AM (13 years ago)

Is there any way to stop audio playing when screen exits?

When calling an address using custom url screen the audio from the website if it has one will continue to play even when app exits. Is there any way to prevent this. Using 2.0 and android
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
11/16/12 09:06 AM (13 years ago)
Hi Mr stuck, What video player the site using? LA
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/16/12 11:45 AM (13 years ago)
Never heard of this, if you were using the BG music function it would be easy. I thought it took effort to get sounds to work after the app closes! David https://buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
11/16/12 11:58 AM (13 years ago)
Hi. I am using the html5 audio tag in a doc and calling it via url using the custom url screen. All works fine except it does not stop on screen exit. I tried the bg music thing but it seems its only working for ios and does not work for android. I could get by without it but it may annoy some app users
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/04/13 03:48 AM (12 years ago)
Hi @Mr stuck, I know that it is an old thread but I may have found the beginning of a solution here: https://www.buzztouch.com/forum/thread.php?fid=928A361A7D0BD9C6E83E1F0&tid=928A361A7D0BD9C6E83E1F0 Farcat
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/04/13 02:18 PM (12 years ago)
Hi @far cat. I got this working on android by adding something like the code you posted in the other thread. I added it to the "ondestroy" part of the custom URL java code, it was something like "webview.load about.blank". I do not know how to do adapt it to iOS as I only make android at the moment. Hope you get it sorted :-)
 

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.