Search code examples
javajakarta-eeweb-applicationsaudio-streamingjavasound

AudioSystem be accessed from Java EE web app?


Can you access a clients audio input and output using the AudioSystem class through a Java EE application? If not, how would you go about doing it?


Solution

  • You should use the new navigator.getUserMedia() and HTML5 APIs.

    Here some examples:

    http://updates.html5rocks.com/2012/09/Live-Web-Audio-Input-Enabled

    http://html5-examples.craic.com/microphone_input_with_spectrogram.html


    ADDED

    It's also possible to use an java applet to control the microphone and audio, but applets are old and too much intrusive.

    Most websites that use this kind of feature use a flash object:

    http://help.adobe.com/pt_BR/FlashPlatform/reference/actionscript/3/flash/media/Microphone.html