Discussion Forums  >  Uncategorized

Replies: 13    Views: 358

Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
08/07/11 04:53 PM (14 years ago)

Audio within text?

Hi guys, Im in the process of creating a tutorial application and would like to have a professional looking text page which has pictures within it and also the occasional sound clip to play. What is the best way within buzz touch to create an app page like this? Thanks for your help
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
08/07/11 08:02 PM (14 years ago)
Html is the most reliable and generally gives the best results across multiple platforms. I think a Custom HTML screen would work best for you.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/08/11 04:28 AM (14 years ago)
Sounds like a perfect candidate for some rich HTML5. Some simple markup goes along way. Google 'html5 example' to get you headed int he right direction?
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/08/11 04:15 PM (14 years ago)
Ahh brilliant thanks for the help I will have a look! I take it if the HTML file and relative audio files were all embedded then this would keep the entire app native and would not require an Internet connection or hosting?
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
08/08/11 08:58 PM (14 years ago)
Yes, with the exception of the initial download of the app.
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/09/11 03:39 AM (14 years ago)
Fantastic thanks for the ever great support guys :)
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/09/11 04:52 AM (14 years ago)
HTML5 is working a treat :) I take it however the app looks in the simulation of xcode will run natively on peoples iphones? Also just a quick question about the path of a file? If my html code reads: <audio controls=controls> <source src=test.mp3 type=audio/mpeg> Your browser does not support the audio element. </source></audio> Where do i need to place the audio file within xcode? Thanks guys!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/09/11 09:25 AM (14 years ago)
Put the audio file in the BT_Audio folder. Make sure to drag it into Xcode so it's added to the project.
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/10/11 05:49 AM (14 years ago)
Do you mean BT_Sound? Thats the only relative folder I have in my code? If that is the folder then for some reason I cannot link to it, within my audio code I have: <source src=pop.mp3 type=audio/mpeg> But it cannot play it? Thanks so much for the help!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/10/11 08:20 AM (14 years ago)
BT_Audio / BT_Sound, forget sometimes...same thing so now worries. Are you sure you're adding the audio file to the Xcode project and not simply adding it to your folder in the file system? Xcode needs to know that you want the audio file included int he project, drag it over the folder in Xcode - this is also called 'adding existing items' Should work
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/11/11 03:08 AM (14 years ago)
I've not even added a file yet, just as a started I am trying to direct to an audio file that is already in the folder (one of the standard BT stock sounds?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/12/11 01:10 AM (14 years ago)
I'm unsure what you're asking. If your HTML is using a tag to an audio file that exists in the project, it should play. Maybe there's some magic HTML 5 markup that's needed. Not sure. I do know that lots of folks have done this.
 
Tango
Lost but trying
Profile
Posts: 25
Reg: Aug 03, 2011
Peterborough
250
like
08/14/11 05:42 AM (14 years ago)
Sorry I'll try to explain, after looking up some html5 source code for audio I came across: <audio controls=controls> <source src=pop.mp3 type=audio/mpeg> Your browser does not support the audio element. </source></audio> When I changed to the source to an mp3 URL it played it without any problems so I know the code is right, the problem I'm having is that I would instead like to code to play a native audio file. As you can see in the above code, I am trying to use an mp3 file which comes standard with the BT code (a sound that can be used when a menu item is selected) but for some reason it won't play it? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/15/11 10:58 PM (14 years ago)
OK, sounds like you've figured out the HTML part, this is good. Maybe this helps? http://stackoverflow.com/questions/2576761/looping-html5-audio-on-the-iphone It sounds like the markup should work but it's not. Not sure really, experiement with the markup on that discussion and see if you can get somewhere. If not, re-post.
 

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.