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EA,OAAO,QAAU,IAAI","file":"/npm/airtunes@0.1.7/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/airtunes@0.1.7/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var Stream = require('stream'),\n    util = require('util'),\n    devices = require('./devices.js'),\n    circularBuffer = require('./circular_buffer.js'),\n    audioOut = require('./audio_out.js'); \n\nfunction AirTunes() {\n  var self = this;\n\n  Stream.call(this);\n\n  devices.init();\n  devices.on('status', function(key, status, desc) {\n    self.emit('device', key, status, desc);\n  });\n\n  circularBuffer.on('status', function(status) {\n    self.emit('buffer', status);\n  });\n\n  audioOut.init(devices);\n\n  circularBuffer.on('drain', function() {\n    self.emit('drain');\n  });\n\n  circularBuffer.on('error', function(err) {\n    self.emit('error', err);\n  });\n\n  this.writable = true;\n}\n\nutil.inherits(AirTunes, Stream);\n\nAirTunes.prototype.add = function(host, options) {\n  return devices.add('airtunes', host, options);\n};\n\nAirTunes.prototype.addCoreAudio = function(options) {\n  return devices.add('coreaudio', null, options);\n};\n\nAirTunes.prototype.stopAll = function(cb) {\n  devices.stopAll(cb);\n};\n\nAirTunes.prototype.setVolume = function(deviceKey, volume, callback) {\n  devices.setVolume(deviceKey, volume, callback);\n};\n\nAirTunes.prototype.setTrackInfo = function(deviceKey, name, artist, album, callback) {\n  devices.setTrackInfo(deviceKey, name, artist, album, callback);\n};\n\nAirTunes.prototype.reset = function() {\n\tcircularBuffer.reset();\n};\n\nAirTunes.prototype.setArtwork = function(deviceKey, art, contentType, callback) {\n  devices.setArtwork(deviceKey, art, contentType, callback);\n};\n\nAirTunes.prototype.write = function(data) {\n  return circularBuffer.write(data);\n};\n\nAirTunes.prototype.end = function() {\n  circularBuffer.end();\n};\n\nmodule.exports = new AirTunes();\n"]}