-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
"A test suite and interface you can use to implement a hyperaudio compatible audio player."
"This would also serve as a place to design a playback API that can be swapped out with native ones in the future."
"A random-audio-player instance is a common interface for an audio player abstraction, that provides a core api."
I extracted what I understand to be the public api of the AudioPlayer class I found in Hyperamp.
This is basically a wrapper class around the node from a given audio element, right?
🔀 abstract-audio-player
usage
audioPlayer = AudioPlayer(audioNode, globalState)
properties
- volume (from globalState.volume)
- muted (from globalState.volume)
- src (from globalState.audioLibray.currentTrack.filepath)
- seeking
- timeupdate
- audio (audioNode)
- volume
- muted
- src
- currentTime
methods
- seekDebounce
- load
- play
- pause
- volume
- mute
- unmute
- seek
+ nanobus methods:
- bus.emit(eventName, [data])
- bus.on(eventName, listener([data]))
- bus.prependListener(eventName, listener([data]))
- bus.once(eventName, listener([data]))
- bus.prependOnceListener(eventName, listener([data]))
- bus.removeListener(eventName, listener)
- bus.listeners(eventName)
events
- ended
- timeupdate
- initialized
- loading
- playing
- paused
- volume
- muted
- unmuted
- seek
See also:
- Issue #24 on hyperamp -
- AudioLibrary https://github.com/hypermodules/hyperamp/tree/master/main/lib/audio-library
- set duration: false when parsing files and get the duration from the [electron] audio element instead - Slow metadata parsing on some files hyperamp#257 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels