HTML5 播放器:APlayer
Introduction
UI 参考网易云音乐外链播放器
Install
npm install aplayer
Usage
The following HTML structure is used for APlayer:
<link rel="stylesheet" href="APlayer.css"> <!-- ... --> <div id="player1" class="aplayer"> <div style="padding: 10px; font-size: 10px; text-align: center;">(>﹏<) APlayer 加载中,好累的说...</div> </div> <!-- ... --> <script src="APlayer.js"></script>
And this is how the APlayer is initialized:
var ap = new APlayer({ element: document.getElementById('player1'), autoplay: true, music: { title: 'Preparation', author: 'Hans Zimmer/Richard Harvey', url: 'http://7xifn9.com1.z0.glb.clouddn.com/Preparation.mp3', pic: 'Preparation.jpg' } }); ap.init();
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!