0.1.1 • Published 1 year ago

online-soundboard-client v0.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Online Soundboard Client

Install

pnpm add online-soundboard-client

Usage

import { Client } from 'online-soundboard-client'

// connect to the server
const client = new Client(serverUrl)

// cache a sound
client.cache(sound)

// play a sound
client.play(soundId)

// update data
client.updateSound(soundData)
client.updateBoard(boardData)
client.data = { name: 'client' }

// cached sounds list
client.sounds

// some events
client.on('connect', callback)
client.on('sound:play', callback)
client.on('client:join', callback)
client.on('client:leave', callback)

Development

pnpm install

pnpm run build:prod #prod