Skip to content

liuyuehe92/audio.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

audio.io

A tiny wraaper of audio APIs.

Classes

  • AudioPlayer

Usage

  • AudioPlayer
import { AudioPlayer } from 'audio.io'

const player = new AudioPlayer()

player
  .load('your-url.mp3')
  .then(() => player.play())
  • AudioRecorder
import { AudioRecorder, getDownloadLink } from 'audio.io'

const recorder = new AudioRecorder({
  workerPath: 'build/recorder-worker.js'
})

recorder.start()

setTimeout(() => {
  recorder.stop()

  recorder
    .exportAudio()
    .then(audioBlob => getDownloadLink(audioBlob, 'kiku.wav'))
    .then(a => ...)
}, 60000)

License

MIT

About

▶️ 🎵 [audio.io] A tiny web audio api wrapper! Play, record audio, export to wav, mp3 or ogg file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published