shime / play-sound

Play sounds by shelling out to one of the available audio players.
MIT License
208 stars 31 forks source link

Adding support for maxDuration parameter #15

Closed jjgonecrypto closed 8 years ago

jjgonecrypto commented 8 years ago

This allows for a maximum time that a process can run. It internally causes a sigterm on the process if timeout occurs, but we can use the killed flag to ignore passing that error onto the consumer.

shime commented 8 years ago

Thanks!

jjgonecrypto commented 8 years ago

No worries. Would you mind bumping a patch version and pushing to npm?

shime commented 8 years ago

Just released v1.0.0 with an updated API. Figured it would be better to allow passing any options to child_process, so your example would now be: play({timeout: 3000}).