2013-03-22 119 views

回答

0

为ayto玩...

<audio autoplay="autoplay" controls="controls"> 
    <source src="file.ogg" /> 
    <source src="file.mp3" />  
</audio> 

的洗牌给音频SOURSE动态使用jQuery通过使用随机数的概念。

+0

我很抱歉,但我真的不要求裸HTML5。它的jQuery插件,创建一个不错的播放列表。我只是无法看到它的文档在哪里/如何设置自动播放和随机播放。 – janharold 2013-03-22 05:40:17

0

根据我对你的问题的理解,可能下面是你的答案。

在HTML中

<audio id="audio-player" name="audio-player" src="../../Content/telephonRing.mp3" ></audio> 

jQuery中

 $("#audio-player")[0].play();//To play 
     $("#audio-player")[0].pause(); //To pause 

//For Ringtone will repeat 
     $("#audio-player")[0].addEventListener('ended', function() { 
        this.currentTime = 0; 
        this.play(); 
       }, false); 
+0

不,我实际上是在问一些已经广泛试用插件的人(Speakker/http://speakker.com) – janharold 2013-03-22 05:42:28