Discussion Forums  >  Self Hosted Control Panels

Replies: 4    Views: 80

mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
11/26/12 04:04 AM (13 years ago)

Background Audio (Audio Stops with Back Button) not saving.

Im having trouble getting the Background audio option saving in the JSON config file. Every other option works but stopping the audio doesn't. Of course when I manually add it inside of xcode it works great. Is this a problem on my server? Here is a screenshot https://dl.dropbox.com/u/3222229/audiostopplease.png Im using the custom HTML plugin if that helps. thanks! edit: I checked on a test app in my buzztouch account and it doesn't output either. {"itemId":"B4E6FA456F3D6140BD6467A", "itemType":"BT_screen_customHTML", "itemNickname":"test audio save", "navBarTitleText":"test audio save", "dataURL":"https://www.buzztouch.com/applications072212/JAD1EA5BA442E46F9AD3838DE/documents/customHTML_B4E6FA456F3D6140BD6467A.html", "audioFileName":"test.mp3", "audioFileURL":"test.html", "audioNumberOfLoops":"2"} it should add: "audioStopsOnScreenExit":"1"
 
armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
like
12/18/12 07:04 AM (13 years ago)
Hi @mysps I am having the same problem. When you say that you manually add it in Xcode, which file do you add it into and where do you add it? Thank you
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/04/13 11:25 AM (13 years ago)
Hi guys...good catch here. We've found and updated some files on the bt hosted control panels. The issue is: /index.php on all the plugins that use the "audioStopsOnScreenExit" had a typo in the HTML for the form. The drop down list with name="audioStopsOnScreenExit" id="audioStopsOnScreenExit" should been named: name="json_audioStopsOnScreenExit" id="json_audioStopsOnScreenExit" instead. See the json_ preceding the property name? The download package for these plugin were NOT updated. They need to be. This means that if you're self hosting you'll need to apply this fix to the plugins you're using. It's a simple matter of adding json_ at start of this HTML form element for the "name" and "id" Again, this is in the index.php file of each of the plugins. We'll get the downloaded versions of these plugins updated. Until then, take the :5 mins and update them on your end if you want.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 11:36 AM (13 years ago)
ha I've just been typing an email with that for you. Done
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 12:01 PM (13 years ago)
Here is a hack if your not self hosted and can't wait Add the line [appDelegate.audioPlayer stopAudio]; in BT_viewController.m line 85 to 100 //left button -(void)navLeftTap{ [BT_debugger showIt:self:@"navLeftTap"]; //child apps are handled different... yourApp_appDelegate *appDelegate = (yourApp_appDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate.audioPlayer stopAudio]; //add this line here if([appDelegate.rootApp isChildApp]){ [BT_viewControllerManager closeChildApp]; }else{ //handle "left" transition [BT_viewControllerManager handleLeftButton:screenData]; } } This basically says everytime the back button is pressed we stop the audio. I'm guessing this app never has constant audio running, so this will work for now. When the plugin is updated you just remove that line
 

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.