JavaScript to play MP3

Is there a JavaScript library that can play MP3 or a related music file? JavaScript will download MP3s from the server and transfer it back through the browser.

+3
source share
5 answers

In FF3 you can use a sound tag ... but it does not support MP3 (only ogg). In Chrome, this can work with mp3. Safari should work like Chrome. Opera should also work, but I'm not sure which codecs / formats it can play. Guess what IE supports? :)

IMHO, you should resort to playing MP3s using flash.

+4
source

Here : soundmanager2

, flash, javascript.

+4

, -, javascript, swfobject.

+1

, Flash Player. , (Quicktime, WMP, Real), Flash, , .

EDIT:

Javascript , , - mp3.

0

No.
As others wrote, you cannot do this in a portable way, especially in IE, which would require some kind of plugin to play sounds.
In any case, JavaScript is not suitable for binary data management, and it is rather limited for access to computer equipment, so it should ask the browser, if possible, to do this job.

0
source

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


All Articles