Two html5 questions

Monkey Targets Forums/HTML5/Two html5 questions

Vignoli(Posted 2014) [#1]
Hi,

I've two questions with html5 :
1) How can i get the sound to works on safari (os x & ios) ?
2) I've a 2d game and it runs slow under android. Does opengles can speedup the game ?


nikoniko(Posted 2014) [#2]
Vignoli wrote:
1) How can i get the sound to works on safari (os x & ios) ?


It should works with some limitation. At first, check audio format file.


Vignoli wrote:
I've a 2d game and it runs slow under android.


How does it work on another targets?


Vignoli(Posted 2014) [#3]
1) For Safari, i've tested ogg and mp3 without success.
2) The game works fine on other targets, even on ipad. May be chrome for Android is slow ?

EDIT:
Since i've updated Safari this morning on OS X Lion, the sound works fine on mac.
The game can be tested here :
http://www.retro-bruno.com/html5/luftballon/luftballon.html


nikoniko(Posted 2014) [#4]
Vignoli wrote:
The game works fine on other targets, even on ipad. May be chrome for Android is slow ?


yes, it's slow. try to apply opengl mojo patch by devolonter.


Vignoli wrote:
1) For Safari, i've tested ogg and mp3 without success.


Look here http://www.ibm.com/developerworks/web/library/wa-ioshtml5/index.html?S_TACT=105AGX99&S_CMP=CP for more details.


Vignoli(Posted 2014) [#5]
I suppose kicking the background music in my game for ios can solve the problem...
Where can i found the patch by devolonter, please ? I can't find the good keywords to find it in the forum ?


nikoniko(Posted 2014) [#6]
Vignoli wrote:
Where can i found the patch by devolonter, please ? I can't find the good keywords to find it in the forum ?


http://www.monkey-x.com/Community/posts.php?topic=3276&page=first


Vignoli wrote:
I suppose kicking the background music in my game for ios can solve the problem...


Yes,safari for ios has a limitation for simultaneously playing sound but I played a html5 game (based on CreateJS/SoundJS) on my ipod4 with action and background sounds!


nikoniko(Posted 2014) [#7]
Look this game http://www.zibbo.com/game/Back-To-Candyland-Episode-1

They did background music


Vignoli(Posted 2014) [#8]
Thanks for your help
I'll take a look at the patch.

About ios, i think i can't solve my problem.