Hi,
Demo program given below is supposed to play sound.
--------------------------
import java.net.*;
import java.applet.*;
public class Sound2 {
public static void main(String a[]) throws java.net.MalformedURLException, InterruptedException {
URL url = new URL("http://simplythebest.net/sounds/WAV/WAV_files/cartoon_WAV_files/aladdin_goodbye.wav");
AudioClip clip = Applet.newAudioClip(url);
clip.play();
Thread.sleep(10000);
}
}
-------------------------------------------------------------
Is it possible to play (online .wav file) sound in Applet using URL Like
(http://simplythebest.net/sounds/WAV/...in_goodbye.wav)
Although I have tried
URL ur=new URL("file:\\C:\\Demo\\abc.wav");
AudioClip clip =Applet.newAudioClip(ur);
It's working fine
but while using URL "http://simplythebest.net/sounds/WAV/WAV_files/cartoon_WAV_files/aladdin_goodbye.wav" i can't hear any sound.
Actually i want to play "http://" URL file directly in applet
Please help me.