uniapp 播报函数
描述
Installtion
npm i uni-broadcast
Usage
import broadcast from 'uni-broadcast'
broadcast({ src: 'xxx.mp3' })
Props
参数名 | 说明 | 默认值 |
---|---|---|
src | mp3 地址 | - |
autoplay | 自动播放 | true |
startTime | 开始时间 | - |
speed | 速度 | 1 |
onEnd | 播放结束回调 | - |
onCanplay | 可以播放回调 | - |
onTimeUpdate | 播放进度回调 | - |
onStop | 被动停止播放回调 | - |