I'm trying to get SoundManager2 to work on Android, but so far it will not play any audio. Does anyone know if there is any way to get this to work on Android without flash being present? If so, please could you provide an example or a page that discusse开发者_JAVA百科s the issues around this.
Verify that html5 audio support is there in 2.2 by going to http://html5test.com/
I have Froyo (2.2) on Milestone and the page says audio-element: yes but No to PCM, mp3, AAC, Ogg, WebM. This is probably the reason why it is not working.
I assume that you are using the latest version of SoundManager2 (V2.97a.20110306 - HTML5 audio updates, Flash/HTML5 mode detection, IE flash init tweaks, reuse and instance options fixes). The revision history says "HTML5 audio: If no flash, try forcing useHTML5Audio = true (eg. desktop safari on new Macs which don't come with Flash.) Related: flash detection code tweak."
But it is better to explicitly specify soundManager.useHTML5Audio = true; in the script or useHTML5Audio :true when you call soundManager.createSound(). This will ensure that SoundManager2 is not the reason why html5-audio is not working.
I visited the http://html5test.com/ on my Galaxy S2 from T-mobile in the default web browser provided by Google (on Android 2.e.6). It said 189 and 1 bonus point out of 500 points. It also said it supported mp3 playing. The REAL test came when I actually visited the soundmanager2 website at http://www.schillmania.com/projects/soundmanager2/ on this same phone and tried their demos. The examples do NOT work on my phone. Oh well.
精彩评论