完成一首播放后,如何设置自动播放,循环播放和播放多首歌曲?

时间:2020-01-26 22:34:53

标签: html loops iframe playlist autoplay

那是我到目前为止所做的

<div>
    <iframe src="/music/song1.mp3" style="position:absolute;top:0;left:0;width:100%;height:100%;" width="1400" height="900" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen>
    </iframe>
</div>

谢谢

1 个答案:

答案 0 :(得分:0)

使用<audio> html元素并添加autoplay loop

<audio autoplay loop controls>
  <source src="/music/song1.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

See more about <audio> here