import java.awt.*;
import java.applet.*;
import java.net.*;
import java.security.AccessControlException;
public class TimePass extends Applet
{
@Override
public void start()
{
try
{
URL u = new URL("http://download.wavetlan.com/SVV/Media/HTTP/WAV/Media-Convert/Media-Convert_test1_Alaw_Mono_VBR_8SS_16000Hz.wav");
play(u); //Play the sound at the `URL u`
}
catch(MalformedURLException | AccessControlException exc)
{
showStatus(exc.toString());
}
}
@Override
public void paint(Graphics g)
{
g.drawString("play", 60, 60); //Display "play"
}
}
I tried the above applet on appletviewer and mozilla firefox
On appletviewer, the sound at the URL u was played, and "play" was displayed on the screen.
On Mozilla firefox, "play" was displayed on the screen but no sound was played.
Why Mozilla firefox is not playing the sound specified by the URL u?