Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTML5] Audio glitchy on mobile device #299

Closed
laxa88 opened this issue Apr 25, 2016 · 9 comments
Closed

[HTML5] Audio glitchy on mobile device #299

laxa88 opened this issue Apr 25, 2016 · 9 comments

Comments

@laxa88
Copy link
Contributor

laxa88 commented Apr 25, 2016

I'm on the Samsung Note4, using Chrome browser. The audio is laggy/glitchy. Here's the link to my game for your testing: http://coinflipstudios.com/adventuroads/

@RobDangerous
Copy link
Member

Audio is fine on my Nexus 7. Can you try without Audio2 (commenting out the line in SystemImpl where it is initialized)?

@luboslenco
Copy link
Contributor

(Can confirm the laggy/glitchy audio on Galaxy S6.)

@RobDangerous
Copy link
Member

Hm, maybe we should make Audio1 the default for HTML5 as long as devices are around which can not handle Audio2.

@miere43
Copy link

miere43 commented Apr 25, 2016

Also on Windows Phone 8.1 device (Nokia 810) there is no audio at all and you can't move character with touching or swiping in any browser (sorry for large screen).
wp_ss_20160425_0001

@laxa88
Copy link
Contributor Author

laxa88 commented Apr 26, 2016

@RobDangerous if I comment the audio2 code in SystemImpl, there is completely no audio in my game.

(i'm assuming it's this, btw):

    // if (kha.audio2.Audio._init()) {
    //  SystemImpl._hasWebAudio = true;
    //  kha.audio2.Audio1._init();
    // }
    // else {
        SystemImpl._hasWebAudio = false;
        AudioElementAudio._compile();
        untyped __js__ ("kha_audio2_Audio1 = kha_js_AudioElementAudio");
    // }

@miere42 I think the input issue is a bug on my side. I do a manual check -- if player is on mobile device, they can only use touch, and if they're on desktop, they can use mouse or keyboard. Looks like windows device doesn't work as intended :(

@laxa88
Copy link
Contributor Author

laxa88 commented Apr 29, 2016

Hi, any updates on this?

@RobDangerous
Copy link
Member

Did some work on that last night but it looks like I'll have to implement a third html5 audio backend for it to really work reliably. At least I now understand the problems (mobile browsers only start audio in response to input events + performance worries).

@laxa88
Copy link
Contributor Author

laxa88 commented May 3, 2016

Thank you @RobDangerous ! I've updated my game based on latest commit. The audio for BGM and button-click is now working (in mobile chrome, on my Samsung S4), although the other sound effects (player deaths) aren't working, but I guess that's good enough for now. Looking forward to full fix :3

@RobDangerous
Copy link
Member

Hey, this is all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants