Safari Mobile (IOS)

Monkey Targets Forums/HTML5/Safari Mobile (IOS)

pit(Posted 2015) [#1]
Hi all,

I have a problem with my app (Dung Beetles - the remake, you can test it as it's a playable app) in HTML5.

Works fine on my Mac with Safari.
But it's not the case on my Ipad...
On Safari Mobile, the game works fine until it has to play a little music.... At this moment, the program freeze and nothing more happen...

Is it normal ? Did you already experienced problem with HTML5 app on Ipad (or other ios device) ?

Thanks

Pit


dawlane(Posted 2015) [#2]
Check that the audio format is compatible and that there are no memory issues due to uncompressed file sizes. Check that the state of the music or sound channel can be determined correctly. Trying to play a audio file on the same channel before the last one has finished can cause problems.


skid(Posted 2015) [#3]
Monkey does not support audio on mobile safari out of the box.

You will need to add an HTML5 button to un-mute audio.


Note: On iOS, the Web Audio API requires sounds to be triggered from an explicit user action, such as a tap. Calling noteOn() from an onload event will not play sound.



See the Playing Sounds explanation here.


pit(Posted 2015) [#4]
Thanks skid !
I look at this !

Pit


pit(Posted 2015) [#5]
Skid,

I confirm: once I make a TAP on the sceen, the music play.
but:
- music launched with "playmusic" works fine
- my little "beep" laucnhed by "playsound" doesn't work

playsound instruction doesn't work on mobile html5 ?

Cheers
pit


skid(Posted 2015) [#6]
You may need to configure your html so window.onload script is run on splashscreen tap instead so monkeygame is initialised itself from tap action.