Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 3    Views: 96

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

Audio on nav tab trigerred on activation

Hi, I have added a background sound to the home tab of my app. The sounds works great if you tap on the icon but I would like the sound to launch when the tabs open after the splash screen. Is it possible? I have been trying to tinker with the viewDidLoad method which I though was the most likely place to start but without much luck. I also need this sound to stop when another tab is tapped. The sound is a "welcome" text that is read for those who can't see the text properly. Any idea anyone? Cheers Farcat
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/20/13 06:19 AM (10 years ago)
Hi Farcat, the reason it won't work with the view did load on the first tab is that it is loaded at the same time as the splash. You would need to add a method in the splash plugin, to fire a button press for the first tab again, or fake it by just playing the welcome one when the splash has finished. To stop the other sound playing when pressing another button. Find the method it's in either the appdelegate or viewutilities it will have play sound method something like [audio play]; put [audio stop]; directly before it and it will reset before playing the next
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/20/13 06:31 AM (10 years ago)
Thanks for pointing to the right direction @Kittsy! Got me coding cap on, I am digging in. Please call an ambulance if you haven't heard from me in 48 hours... :) Farcat
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/20/13 07:46 AM (10 years ago)
let us know how you get on
 

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.