1.0.0 • Published 8 years ago

find-audio-player v1.0.0

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

find-audio-player Build Status

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