1.0.3 • Published 3 years ago
tjx-audio-player v1.0.3
简易音频播放器
安装
npm install tjx-audio-player
引入
import audioPlayer from 'tjx-audio-player'
使用
<html>
<div id="aplayer"></div>
</html>
const aplayer = new audioPlayer({
id:'aplayer',
url: 'http://pumeiduo-test.oss-cn-shenzhen.aliyuncs.com/audio/2021/01/18/17/ceb82490ff431cba6715ee934e6234cd.mp3',
bg_url: 'http://pumeiduo-test.oss-cn-shenzhen.aliyuncs.com/image/2020/12/25/10/a3d539edec8e085b7da9f10c7cb3b4df.jpg'
})
属性 | 说明 | 默认值 |
---|---|---|
id | dom的id | 无 |
url | 音频地址 | 空值 |
bg_url | 播放按钮背景图 | 空值 |
canDragProcessBar | 进度条是否拖拉 | false |