Discussion Forums  >  WebViews and HTML for Mobile

Replies: 3    Views: 170

farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
05/29/13 01:49 PM (10 years ago)

Html audio player keep playing when leaving the page

Hi guys, I am using an audio player using a jQuery plugin on a html document. This player is reached via another html page (screen1.html - player1.html). The problem I have is that the audio player keeps going if the user leaves the page natively (IOS). The only way to make it stop is to hide the nav bar and have a HTML back button that takes the user back to the screen1.html page. As the app is tab layout, if the user decides to leave the player and tap on another tab the player won't stop. Not sure if I am being very clear here... Anyway, do you guys know of a way to sort of "kill" the player (natively or otherwise) when not on the page? For info, this is the plugin: http://tympanus.net/codrops/2012/12/04/responsive-touch-friendly-audio-player/ Cheers, Farcat
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
05/29/13 02:30 PM (10 years ago)
Not sure about iOS but there is a solution for android that you may be able to adapt somehow, not sure if it will help but might give you some ideas. See this post. http://www.buzztouch.com/forum/thread.php?tid=F560C8D4CA4A25A965FEA4A&currentPage=203
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
05/29/13 02:33 PM (10 years ago)
Forget that. I misread that. Thought you were using html5 audio player
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/29/13 11:57 PM (10 years ago)
Thanks for finding that link @Mr Stuck. Yeah, I am no expert but I think jQuery might be the issue here. Shame about this problem, it's a great plugin. It does exactly what I want. ANy idea anyone on how to terminate the player? Cheers, Farcat
 

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.