Applet在mozilla firefox上无法正常工作

时间:2015-07-09 11:51:58

标签: java url firefox applet appletviewer

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"
    }
}

我在appletviewermozilla firefox

上尝试了上述applet

appletviewer上,播放URL u的声音,并在屏幕上显示"play"

Mozilla firefox上,屏幕上显示"play",但未播放声音。

为什么Mozilla firefox没有播放URL u指定的声音?

0 个答案:

没有答案