Streaming Audio to Browser

I have a large amount of audio files stored on my web server in a very custom format that cannot be played by anything other than my own application. This application is a Win32 application that can connect to my web server and transmit it and play that sound.

I would really like to be able to do streaming and replay from the browser, but I don’t know where to start. Ideally, I would like this technology to be cross-platform (unlike my current Win32 application) and cross-browser (IE 6 and above and Firefox).

My current thoughts are to look at things like:

  • Flash, but isn't it just mp3 audio playback?
  • Java, are virtual machines available freely?
  • Convert audio to a WAV file on a web server, and then use another plugin to play that file. I would prefer to keep the conversion from the web server for performance reasons, but still an option.
  • Writing your own custom plugin to perform a full stream and playback operation.

Any guidance would be most helpful.

Please note that sound is not music and that simply converting to another audio format is not trivial. Sound that is also saved often changes (every minute), a constant conversion is required.

+4
source share
4 answers

Beyond Server-Side Conversion: Deploy the decoder for your format in ActionScript or Java. Then you can write a Flash movie or Java applet that plays it. Both languages ​​/ runtimes should be fast enough to decode in real time if your format is not very complex. Flash would be the more affordable of the two, since almost everyone has a plugin installed. (It is possible that playing a raw sound buffer is not supported by older versions of Flash than 10, I am not an expert on this.) The Java plugin is definitely free, but you will need users to install it.

+2
source

Why are you using a proprietary music format? I probably would not even download the program to listen to it.

I would suggest you convert it to mp3 and then use flash.

Building your own plugin would probably be difficult, there are so many different platforms that you will have to maintain, they have already written something like flash.

+4
source

I would go with the conversion of sound to WAV (or MP3) on the server. Writing your own cross-platform browser component would be a lot of work, thanks to the way the main OSs handle their audio APIs.

0
source

Try a look at shoutcast . Basically, this is a server application that will transfer music to any client that connects to it through a browser (in fact, your own radio station). I never used it myself, but should be direct. Another idea is a remote Winamp. Again you install the application on the server, but this time you can browse your music collection on your website and play individual songs.

0
source

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


All Articles