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
posted @ 2018-09-02 21:07  borter  阅读(144)  评论(0编辑  收藏  举报