[Plugin] Base64 Audio

Post your completed addons to share with the community

Post » Tue May 15, 2012 7:17 pm

Edit : July - 29. New version : v1.1. Various enhancement, to be used with the Mic plugin: https://dl.dropbox.com/u/1412774/MicrophoneC2Demo2/pode_audio_base64.1.1.zip

Still working on a client's problem, I needed the ability to load base64 audio strings. Since the "Audio" plugin from C2 doesn't allow the use of them, I created this plugin.


(The screenshot isn't very useful, for that kind of plugin ).

You can use base64 strings for audio files, namely OGG, MP3, and WAV (it's possible, but please don't use WAV, because the file are enormous, and prone to crash the browser...).
Since Firefox can't play mp3 files, neither Opera, don't forget to provide MP3 and OGG version of your audio. If not, when you play() the file, you are only going to hear sound in Chrome...

The demo : http://dl.dropbox.com/u/1412774/Base64AudioDemo/index.html (the sounds are from me snapping my fingers...)
The plugin : http://dl.dropbox.com/u/1412774/Base64AudioDemo/pode_audio_base64.1.0.zip
The demo : http://dl.dropbox.com/u/1412774/Base64AudioDemo/Base64AudioDemo.capx

@Ashley : is it possible to add to your todo-list the use of base64 audio with the "classical" audio plugin ? (I'll then deprecate this one).Pode2012-07-29 19:32:10
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed May 16, 2012 10:32 pm

Its interesting. I'm guessing this would give you the ability to change your sounds without having to re do the export as well.
Question: How do you determine which type of file to use for the different browsers?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri May 18, 2012 10:40 pm

@newt : OGG is for FF/Opera, because they don't support MP3. Chrome & Safari support both OGG & MP3.
Everybody can play WAV.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Jul 29, 2012 7:32 pm

Update : new version added to the first post.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Oct 16, 2012 12:38 pm

Will this get audio working on phones?
B
14
S
3
G
4
Posts: 32
Reputation: 2,654

Post » Tue Oct 16, 2012 1:50 pm

@maxp010 : if you use a format compatible with the phone model. For example, on iOS you have mp3 & AAC only.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Oct 16, 2012 2:24 pm

@Pode Ok brilliant and I don't need to export my game out as a Phonegap/appMobi?
B
14
S
3
G
4
Posts: 32
Reputation: 2,654

Post » Tue Oct 16, 2012 4:28 pm

@maxp010 : you aren't forced to use Phonegap/appMobi, but you'll suffer from the phone limitations (on iOS : one simultaneous sound only, touch to start...)
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Oct 16, 2012 5:00 pm

@Pode: Ah I see ok well I will give it a try so thank you.
B
14
S
3
G
4
Posts: 32
Reputation: 2,654

Post » Sun Nov 04, 2012 12:32 pm

There seems to be an error with the link. It's pointing to a capx that preloads and plays a local sound file 'strofo_A.ogg'

Using this plugin I am able to inject ogg from a url but how do you loop the sound? Or even detect when the sound file has finished?
dsarchy2012-11-04 13:09:51
B
14
S
3
G
5
Posts: 41
Reputation: 3,490

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests