Phonegap + Construct 2

Discussion and feedback on Construct 2

Post » Thu Aug 25, 2011 3:02 pm

So I've been experimenting publish apps to Android via Phonegap:
http://www.scirra.com/forum/experiment-running-a-game-on-an-android_topic43897.html

But I have found one issue, if I publish a game via Phonegap I get no sound coming from the game on my android app.

ANyone else have the same issue or a fix?
B
15
S
1
G
3
Posts: 47
Reputation: 1,912

Post » Thu Aug 25, 2011 3:25 pm

I'm not sure Android's browser supports audio, so I'm guessing they need to add support first.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Fri Aug 26, 2011 1:27 pm

I think that is something you could ask on the Phonegap forum, there is also the fact that sound support for HTML5 is a bit of inconsistent among browsers at this time (Ogg Vorbis is supported by almost all of em, except, you guessed it, IE9).
B
2
G
1
Posts: 7
Reputation: 464

Post » Sun Oct 30, 2011 9:11 pm

Android browser does support sound from Android 2.3.x, but only mp3...
Please add optional mp3 support in the next update - I am 100% willing to take the risk of being asked royalties for using that format, which should already be in the public domain given its popularity and age!
B
10
G
2
Posts: 15
Reputation: 1,325

Post » Sun Oct 30, 2011 9:15 pm

(This is an old post - since this thread was made we've added support for PhoneGap)

The MP3 licensing site states that you're liable for a $2500 license if you distribute your game 5000 times (presumably meaning downloads). So I would prefer to avoid the MP3 format entirely! AAC is better quality, smaller filesize and free to use in games. So everyone should use that! (Actually, everyone should use Ogg Vorbis, but either is better than MP3.)

Edit: I went through my emails and actually got in touch with the MP3 licensing people a few months back. They seemed to say (through politi-speak) that even free games are liable for this license, based on the argument that "any use of mp3 is designed to take advantage of its ubiquity, create fans... build a reputation, etc... so there are very very few instances where our license is not required".

I couldn't believe it. That's why we don't support MP3 at all and only use AAC and OGG - it's you lot who are liable for this $2500 license, not us, and we don't want to put anyone at risk, especially when AAC is better in every way.Ashley2011-10-30 21:22:55
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Oct 30, 2011 10:48 pm

[quote]I couldn't believe it. That's why we don't support MP3 at all and only use AAC and OGG - it's you lot who are liable for this $2500 license, not us, and we don't want to put anyone at risk, especially when AAC is better in every way.[/quote]
Are you sure? GameMaker uses MP3's but there is no mention of the user being liable. I've probably read it wrong, if so sorry about that. Nickydude2011-10-30 22:48:47
B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sun Oct 30, 2011 10:54 pm

Yes we are sure unfortunately :( GameMaker either don't know about this licensing issue, OR they have determined it's not their responsibility and it's the users responsibility to find this out for themselves.

We would hate for a user of our software to be sued, so we've chosen not to include it.Tom2011-10-30 22:55:57
Image Image
Scirra Founder
B
124
S
37
G
25
Posts: 3,945
Reputation: 44,887

Post » Sun Oct 30, 2011 10:55 pm

B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sun Oct 30, 2011 11:06 pm

Thank you for replying so quickly and sorry for reviving a relatively old thread, but the issue of sound not playing on Android and iOS (at least until version 5 - didn't have the time to try it yet) is still there as of now, so I thought that it was ok to reply here.
Nevertheless, please feel free to move my post to a new thread if you deem it necessary.
Regarding the royalties issue, I am conscious it concerns only me (or any other game publisher) - not you - and that is why I am asking for the freedom to take this risk!

With that said, I have found a quick and (very) dirty workaround to play any sound format supported by the browser, but not available in C2 as an export format (*):
On some condition, go to sound file url in new window -> alert "something" on the main window, so that the user doesn't leave the main window.
Works with both file:// and http:// protocols in Chrome, provided you choose the corresponding preview mode and popup blocking is disabled in the browser.
Didn't try it yet on Android's mobile version of chrome, but it should definitely work, although I would not recommend using such a trick in production, due to obvious aesthetic reasons...

Support for Iframes would be a much more elegant way of achieving the same goal - could it be a "politically correct" solution to enable this (and way more)?
Also, can we somehow use the existing ajax object to play remote sound files in any browser-supported format?


(*not necessarily mp3, as wav is also in that case and might be useful for enabling small sfx files to play on iOS)stiepan2011-10-30 23:07:16
B
10
G
2
Posts: 15
Reputation: 1,325

Post » Mon Oct 31, 2011 1:40 am

Workarounds using iframes do not avoid the license. If your game uses MP3 technologies to play audio, you're liable for a license, regardless of the actual method you use to play it.

I had a quick look and the Android browser does not appear to support HTML5 audio at all yet, so MP3 won't help you there. However most of the phones Android is on support Ogg Vorbis, so I would expect Android 4 (due to be released soon) to support Vorbis.

Safari on iOS should support AAC.

PhoneGap also provides some mechanisms to play audio via the native engine, which might allow us to fix it. I'll look in to it. In short, it should be fixed soon, so there's still no need for MP3.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite and 9 guests