1.1.2 • Published 4 years ago

@cycle-robot-drivers/sound v1.1.2

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

@cycle-robot-drivers/sound

Cycle.js drivers and action components for playing sounds using HTMLAudioElement.

Try the demo at StackBlitz!

Note that this package was tested with Chrome browser (>= 65.0.3325.181) only.

API

AudioPlayerAction(sources)

AudioPlayerAction action component.

Params:

  • sources
    • goal: a stream of {src: string} (as HTML audio src) or a string (as a value of src).
    • AudioPlayer: EventSource for ended and pause events.

Return:

  • sinks
    • state: a reducer stream.
    • status: a stream of action status.
    • result: a stream of action results.
    • AudioPlayer: a stream for AudioPlayer driver input.

HTML Audio driver factory.

Return:

  • Driver the HTML Audio Cycle.js driver function. It takes a stream of objects containing [src](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-src).org/en-US/docs/Web/API/SpeechSynthesisUtterance#Properties) fieldand returns a EventSource:

1.1.2

4 years ago

1.1.1

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago