APlayer html5 audio player

搬砖/ 亲测/网站制作/2020-08-27/

APlayer html5 audio player

一款非常不错的html5 audio player 

代码

<div id="aplayer"></div>
<link rel="stylesheet" href="https://cdn.staticfile.org/aplayer/1.9.0/APlayer.min.css">
<script src="https://cdn.staticfile.org/aplayer/1.9.0/APlayer.min.js"></script>
<script type='text/javascript'>
const ap = new APlayer({
    container: document.getElementById('aplayer'),
    autoplay: true,
    audio: [
    {
        name: '羊皮卷',
        artist: '第一步',
        url: 'https://cdn.jsdelivr.net/gh/lz1473/test/mp3/1.m4a',
        cover: 'https://cdn.jsdelivr.net/gh/lz1473/test/img/20200828001301.jpg'
    },
    {
        name: 'music',
        artist: 'oleou',
        url: 'https://cdn.jsdelivr.net/gh/lz1473/test/mp3/Tiffany%20Alvord-Baby%20I%20Love%20You.mp3',
       cover: 'https://cdn.jsdelivr.net/gh/lz1473/test/img/20200828001302.jpg'
    },    
    ]
});
</script>

效果演示

官网地址
http://aplayer.js.org/
https://github.com/MoePlayer/APlayer
 

TAGS:APlayer html5 audio player music 音乐 播放器 web 自适应

打赏 点赞
邮箱
验证码
昵称