CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.44k stars 835 forks source link

soundjs fails in HTC Sense browser #158

Open fideldonson opened 9 years ago

fideldonson commented 9 years ago

I have tested this with newest csn version of soundjs on a HTC ONE (M8), HTC ONE mini and HTC ONE mini 2 - it behaves the same on all three devices - which have been recently updated... Note i am using the built in HTC sense browser.

Loading sounds with the registersounds works and the listener fires for each sound. however the play function does nothing. I have tested the exact same page on more than 20 other mobile devices and it works across the board.

I have setup a test case at http://tekstur.dk/ja

Please note that running the same page on the same device but in the chrome browser works perfectly...

OJayRobinson commented 9 years ago

Some mobile devices / browsers require sound to be played inside of a user event (touch). You can learn more from the Mobile Safe Tutorial.

A good test to verify if sound is working or not is to try the Sound Grid Demo.

My understanding is that the default browser on HTC ONE M8 is Chrome. If the Sound Grid demo does not work for you, please include more details about the android version and browser you are having trouble in.

Hope that helps.

fideldonson commented 9 years ago

I guess playing sounds on an onclick function call counts as a user event right? In fact Chrome is not the default browser on either of the HTC phones i tested today - there is a htc sense browser in the home screen and Chrome is tucked away in the app drawer. I will check the sound grid demo asap...

fideldonson commented 9 years ago

OK - ive set up a testpage with the mobile safe tutorial and i also tested with the Sound Grid Demo from the SoundJS demos. And i can confirm the bug. Sounds are not loaded and no sound is played. Both my testpage and the Sound Grid Demo work on all the other devices i have tested.

I have found the bug both in a HTC ONE (M8) and a HTC ONE Mini 2. Both running android 4.4.3 and Sense 6.0 The bug only occurs in the HTC sense browser (called Internet and prominently featured on the dashboard). If i run the same code in the Chrome browser present on both devices everything works as it is supposed to.

OJayRobinson commented 9 years ago

Sadly is sounds like the HTC sense browser does not support html audio, as mentioned here. In theory if Sense supports HTML Audio or web audio in the future, SoundJS will work.

Hope that helps.

fideldonson commented 9 years ago

I think you should reopen this issue. I setup a test-page using only standard HTML audio and that page worked, so the browser does in fact support HTML audio in its present state - just not when run with the soundjs framework.

OJayRobinson commented 9 years ago

I've tracked down and tested in a sense browser and for me loading does not complete. Interestingly SoundJS works on Android stock browser, which is what I would have expected Sense browser to be built on.

Unfortunately we are not able to spend time debugging to track down the root of the problem, but if you are able to track down where SoundJS is failing I can offer further assistance.

You might also consider trying the older 0.5.2 version of SoundJS, as we made some major changes to loading in the 0.6.0 release.

Sorry I can't be of more help.