HTML5 播放器:APlayer

jopen 9年前

Introduction

UI 参考网易云音乐外链播放器

Demo

Screenshot

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();

项目主页:http://www.open-open.com/lib/view/home/1448116006056