find-audio-player
v1.0.0
Published
Find the first available audio player
Downloads
3
Readme
find-audio-player
Find the first available audio player
Install
$ npm install --save find-audio-player
Usage
var findAudioPlayer = require('find-audio-player')
var findAudioPlayerSync = require('find-audio-player/sync')
findAudioPlayer(function (err, path) {
// OS X: path === /usr/bin/afplayer
})
var path = findAudioPlayerSync()
API
findAudioPlayer(callback)
-> undefined
callback
Required
Type: function
Arguments: err, path
A callback to call with the path to the first available audio player or an error if no player was found.
findAudioPlayerSync()
-> string
Finds the first available audio player and returns the absolute path. If no player is found, an error is thrown.
License
MIT © Ben Drucker