e555. 在Applet中播放音频

  // See also e551 精简的Applet
    public void init() {
        // Load audio clip
        AudioClip ac = getAudioClip(getDocumentBase(), "http://hostname.com/audio.au");
    
        // Play audio clip
        ac.play();
    
        // Stop playing audio clip
        ac.stop();
    
        // Play audio clip continuously
        ac.loop();
    }
Related Examples
原文地址:https://www.cnblogs.com/borter/p/9575322.html