1.1.5 • Published 2 years ago

browser-audio-caster v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

browser-audio-caster

浏览器播报音频工具函数

Installtion

npm i browser-audio-caster

Usage

import play from 'browser-audio-caster'

play({
  src,
  speed,
  muted,
  waiting,
  startTime,
  autoPlay,
  onCanplay,
  onEnd,
  onPlay,
  onError,
  onTimeUpdate
})

Props

参数名说明默认值
srcmp3 地址-
speed播报速度1
muted是否静音false
startTime开始时间0
waiting延迟播报时间0
autoPlay是否直接播报, 设为 false 需要使用返回值调用 play()true
onCanplayon canplay-
onEndon end-
onPlayon play-
onErroron error-
onTimeUpdateon update-

Live demo

Edit browser-audio-caster-example

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago