Cross browser and audio with multiple devices

Question

Is there a way to use audio in a web application so that it works in most browsers (Chrome, FF, Safari and IE9 +) and devices (Android / IOS for mobile devices)?

My requirements

I need basic pre-loading, simultaneous playback of several sounds, muffling them when clicked, and possibly a loop (maybe not quite right?)).

What I have learned so far:

  • The Web Audio API will not work in IE and any Android. ( link )
  • with sound tag I get different durations for the same sound in Safari and Chrome ...
  • I checked SoundManager2 , but it will not work somewhere (it gives HTML5 4 error code for me)
  • SoundJS seems to work cross-browser and device, as far as I checked, but there are limitations:
    • can't loop or use delay on Android
    • Safari requires that Quicktime be installed to play sound.
    • IE9 has limitations when playing multiple sounds at the same time.
    • tried this one and it won’t play on my Android (v4.1.2 Samsung 3 mini)
  • Howler.js seems to work, for example, on Android, has not yet been thoroughly tested
    • while playing several sounds at the same time and turning the volume for one of them up / down or muting the sound will not respond until you stop () and start playing them again again
  • Flash , .
  • , .
  • /, (mp3 ogg , ?)
    • Chrome (ogg, mp3, wav)
    • FF (ogg, wav)
    • IE9 + (mp3, aac)
    • Safari (mp3, aac, wav)

, , - , (-, -)?

, , , , - ... " " -?

, !

+4
2

. SoundJS , , . Android Native Chrome Browsers, , github , . Android.

, , . , , , , , .

, IE9 , 30 . 30 , , . -.

, . - , ( ), . , , , mp3 ( ). Html , .

, , soundjs.

+2

Firefox MP3.

<audio src="sound.mp3" type="audio/mpeg" controls></audio>

, , , , , .

0

Source: https://habr.com/ru/post/1536058/


All Articles