0.0.2 • Published 5 years ago

ourwill-aplayer v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

aplayer

const opts = {
    el: document.querySelector(".wrapper-div"),
    duration: 33,
    url: 'https://cdn.inmuu.com/v1/services/app/mp3/play/L3ZpZGVvL3dlYm0vMjAxOTA3MjIvMTEzNDU2L0ZoU3F2b3lJZ1hwV29FQ19RMXlDVnhFU3g0cUUzMDUxNjAud2VibQ==.mp3'
};
const player = new aplayer(opts);

构造函数参数

el 一个容器

duration 总时长,浮点数,单位秒

url 音频文件地址

实例方法

play()

pause()