{"_id":"airplay","_rev":"17-5acf1df1e537b3626b21d3520d01c135","name":"airplay","description":"Apple AirPlay client library","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"airplay","description":"Apple AirPlay client library","version":"0.0.1","author":{"name":"Ben Vanik","email":"ben.vanik@gmail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/benvanik/node-airplay.git"},"keywords":["apple","mac","media","airplay"],"directories":{"lib":"./lib/airplay"},"main":"./lib/airplay","dependencies":{"plist":"https://github.com/benvanik/node-plist/tarball/master","mdns":"https://github.com/benvanik/node_mdns/tarball/master"},"scripts":{},"engines":{"node":">= 0.5.x"},"devDependencies":{},"_npmUser":{"name":"benvanik","email":"ben.vanik@gmail.com"},"_id":"airplay@0.0.1","_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"c37c69753a48bca4dec57605b2a2f60e5fa42218","tarball":"https://registry.npmjs.org/airplay/-/airplay-0.0.1.tgz","integrity":"sha512-S06iFfqQHGivqJJ3WSd5zbJcCO86ooTL6s+VLcUmjUqPC3jK60msdYoGy0iqOvcYtzLQAANCaV1PLjlCMFjbeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCERFM3X5EVQ/eX0pTd31lqzpCfOPaF9XUBBn+9UxTyywIgYl0/UffRXRWzEX9wB6mDNbusojjL87G/ITXvLbfGLGo="}]},"maintainers":[{"name":"benvanik","email":"ben.vanik@gmail.com"}]},"0.0.2":{"name":"airplay","description":"Apple AirPlay client library","version":"0.0.2","author":{"name":"Ben Vanik","email":"ben.vanik@gmail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/benvanik/node-airplay.git"},"keywords":["apple","mac","media","airplay"],"directories":{"lib":"./lib/airplay"},"main":"./lib/airplay","dependencies":{"plist":">=0.2.1","mdns":"https://github.com/benvanik/node_mdns/tarball/master"},"scripts":{},"engines":{"node":">= 0.5.x"},"devDependencies":{},"_npmUser":{"name":"benvanik","email":"ben.vanik@gmail.com"},"_id":"airplay@0.0.2","_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"1a705256d3b1fd3b953c9ab258431a25f9a58323","tarball":"https://registry.npmjs.org/airplay/-/airplay-0.0.2.tgz","integrity":"sha512-+PfGuUHPfUhLL1WqkTxgFvpQseW24wmipMP3ENgARKvX8+M8NXAyi17XhSqZr17cCbrPZMqZkkAAPoN9WV7Ghg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFIezVHhezAAyrSJKRPxUIsiogLoq5kqNqRacvrZCppAiBUXQvPsGfVNiS2A8J9vyUOXKO8geQUt2Q/wOFdpwkSDQ=="}]},"maintainers":[{"name":"benvanik","email":"ben.vanik@gmail.com"}]},"0.0.3":{"name":"airplay","description":"Apple AirPlay client library","version":"0.0.3","author":{"name":"Ben Vanik","email":"ben.vanik@gmail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/benvanik/node-airplay.git"},"keywords":["apple","mac","media","airplay"],"directories":{"lib":"./lib/airplay"},"main":"./lib/airplay","dependencies":{"plist":">=0.2.1","mdns":">=0.0.7"},"scripts":{},"engines":{"node":">= 0.5.x"},"devDependencies":{},"readme":"node-airplay -- AirPlay client library for node.js\n====================================\n\nnode-airplay is a client library for Apple's\n[AirPlay](http://en.wikipedia.org/wiki/AirPlay) remote playback protocol.\nIt implements a simple AirPlay device browser using mdns and command interface.\n\nCurrently supported features:\n\n* AirPlay device discovery\n* Support for audio and video playback\n\nComing soon (maybe):\n\n* Photo playback\n* Robust error handling\n* Better device information formatting (supported features/etc)\n\n## Quickstart\n\n    npm install airplay\n    node\n    > var browser = require('airplay').createBrowser();\n    > browser.on('deviceOnline', function(device) {\n        device.play('http://host/somevideo.mp4', 0);\n      });\n    > browser.start();\n\n## Installation\n\nWith [npm](http://npmjs.org):\n\n    npm install airplay\n\nFrom source:\n\n    cd ~\n    git clone https://benvanik@github.com/benvanik/node-airplay.git\n    npm link node-airplay/\n\nnode-airplay depends on both\n[node-plist](https://github.com/TooTallNate/node-plist) and\n[node_mdns](https://github.com/agnat/node_mdns). Unfortunately\nnode_mdns is woefully out of date and has required many tweaks to get working,\nresulting in [a fork](https://github.com/benvanik/node_mdns).\n\nIf you're running node on FreeBSD (or maybe Linux) you may get errors during\ninstall about a missing dns_sd.h file. If so, install the Apple mDNS SDK:\n\n    wget http://www.opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-333.10.tar.gz\n    tar zxvf mDNSResponder-333.10.tar.gz\n    cd mDNSResponder-333.10/mDNSPosix/\n    sudo gmake os=freebsd install\n\n## API\n\n### Browser\n\nThe browser is a discovery service that can be run to automatically detect the\nAirPlay-compatiable devices on the local network(s). Try only to create one\nbrowser per node instance, and if it's no longer needed stop it.\n\nCreate a browser using the `createBrowser` method:\n\n    var browser = require('airplay').createBrowser();\n\nAttach to the browser events to track device discovery:\n\n    browser.on('deviceOnline', function(device) {\n      console.log('device online: ' + device.id);\n    });\n    browser.on('deviceOffline', function(device) {\n      console.log('device offline: ' + device.id);\n    });\n\nStart or stop the discovery process:\n\n    browser.start();\n    browser.stop();\n\nIf you are running a server you can use the built-in device list instead of\nmaintaining your own via the events:\n\n    function myHandler() {\n      var devices = browser.getDevices();\n      console.log(devices);\n    }\n\n### Device\n\nA device instance represents a single AirPlay device on the local network.\nDevices are created either through the discovery process or by direct\nconnection. Each device has only a single control channel, and all methods are\nasynchronous.\n\nObtain devices using the browser API:\n\n    // Get all ready devices\n    var allDevices = browser.getDevices();\n    // Grab a device to play with\n    var device = allDevices[0];\n\n*TODO* At some point, you'll be able to connect directly:\n\n    var device = require('airplay').connect(deviceHost);\n    device.on('ready', function() {\n      // Ready to accept commands\n    });\n\nIf you are done with the device, close the connection (note that this will stop\nany playback):\n\n    device.close();\n\nIssue various device control calls. All calls are asynchronous and have an\noptional callback that provides the result - for most, it's an empty object if\nthe call was successful and null if the call failed.\n\n    // Get the current playback status\n    device.getStatus(function(res) {\n      // res = {\n      //   duration: number, -- in seconds\n      //   position: number, -- in seconds\n      //   rate: number, -- 0 = paused, 1 = playing\n      //   ...\n      // }\n      // or, if nothing is playing, res = {}\n    });\n\n    // Play the given content (audio/video/etc)\n    var content = 'http://host/content.mp4';\n    var startPosition = 0; // in seconds\n    device.play(content, startPosition, function(res) {\n      if (res) {\n        // playing\n      } else {\n        // failed to start playback\n      }\n    });\n\n    // Stop playback and return to the main menu\n    device.stop();\n\n    // Seek to the given offset in the media (if seek is supported)\n    var position = 500; // in seconds\n    device.scrub(position);\n\n    // Reverse playback direction (rewind)\n    // NOTE: may not be supported\n    device.reverse();\n\n    // Change the playback rate\n    // NOTE: only 0 and 1 seem to be supported for most media types\n    var rate = 0; // 0 = pause, 1 = resume\n    device.rate(rate);\n\n    // Adjust playback volume\n    // NOTE: may not be supported\n    device.volume(value);\n","_id":"airplay@0.0.3","dist":{"shasum":"fe23a92c3ee31ce2d1af9059b6de2daa46497633","tarball":"https://registry.npmjs.org/airplay/-/airplay-0.0.3.tgz","integrity":"sha512-SvB5lTx+HmzDaGF3MN1paJtIVEEM1uMy1pVIF+obwOwes7DdZpLDxu9+b++lpIqecQ5+geD5ZccsLtIPB1iUZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnlGFrEJhBG7L6e59flfs8CDFBxb6I/Om/Z//3wbljXAIhAPplQYawR3AsaCza2jnBaOC7uz6Ll2Xj2MAVwLv2LhyH"}]},"maintainers":[{"name":"benvanik","email":"ben.vanik@gmail.com"}]}},"readme":"node-airplay -- AirPlay client library for node.js\n====================================\n\nnode-airplay is a client library for Apple's\n[AirPlay](http://en.wikipedia.org/wiki/AirPlay) remote playback protocol.\nIt implements a simple AirPlay device browser using mdns and command interface.\n\nCurrently supported features:\n\n* AirPlay device discovery\n* Support for audio and video playback\n\nComing soon (maybe):\n\n* Photo playback\n* Robust error handling\n* Better device information formatting (supported features/etc)\n\n## Quickstart\n\n    npm install airplay\n    node\n    > var airplay = require('airplay');\n    > var browser = airplay.createBrowser();\n    > browser.on('deviceOnline', function(device) {\n        device.play('http://host/somevideo.mp4', 0, function(res) {\n          if (res) {\n            console.log('playing!');\n          } else {\n            console.log('unable to play!');\n          }\n        });\n      });\n    > browser.start();\n\n## Installation\n\nWith [npm](http://npmjs.org):\n\n    npm install airplay\n\nFrom source:\n\n    cd ~\n    git clone https://benvanik@github.com/benvanik/node-airplay.git\n    npm link node-airplay/\n\nnode-airplay depends on both node_mdns and node-plist. Unfortunately neither\nstored in the npm repo work correctly, and as such the package points to forks\nI have made. Hopefully this will be resolved soon.\n\n## API\n\n### Browser\n\nThe browser is a discovery service that can be run to automatically detect the\nAirPlay-compatiable devices on the local network(s). Try only to create one\nbrowser per node instance, and if it's no longer needed stop it.\n\nCreate a browser using the `createBrowser` method:\n\n    var browser = require('airplay').createBrowser();\n\nAttach to the browser events to track device discovery:\n\n    browser.on('deviceOnline', function(device) {\n      console.log('device online: ' + device.id);\n    });\n    browser.on('deviceOffline', function(device) {\n      console.log('device offline: ' + device.id);\n    });\n\nStart or stop the discovery process:\n\n    browser.start();\n    browser.stop();\n\nIf you are running a server you can use the built-in device list instead of\nmaintaining your own via the events:\n\n    function myHandler() {\n      var devices = browser.getDevices();\n      console.log(devices);\n    }\n\n### Device\n\nA device instance represents a single AirPlay device on the local network.\nDevices are created either through the discovery process or by direct\nconnection. Each device has only a single control channel, and all methods are\nasynchronous.\n\nObtain devices using the browser API:\n\n    // Get all ready devices\n    var allDevices = browser.getDevices();\n    // Grab a device to play with\n    var device = allDevices[0];\n\n*TODO* At some point, you'll be able to connect directly:\n\n    var device = require('airplay').connect('hostname', port);\n    device.on('ready', function() {\n      // Ready to accept commands\n    });\n\nIf you are done with the device, close the connection (note that this will stop\nany playback):\n\n    device.close();\n\nIssue various device control calls. All calls are asynchronous and have an\noptional callback that provides the result - for most, it's an empty object if\nthe call was successful and null if the call failed.\n\n    // Get the current playback status\n    device.getStatus(function(res) {\n      // res = {\n      //   duration: number, -- in seconds\n      //   position: number, -- in seconds\n      //   rate: number, -- 0 = paused, 1 = playing\n      //   ...\n      // }\n      // or, if nothing is playing, res = {}\n    });\n\n    // Play the given content (audio/video/etc)\n    var content = 'http://host/content.mp4';\n    var startPosition = 0; // in seconds\n    device.play(content, startPosition, function(res) {\n      if (res) {\n        // playing\n      } else {\n        // failed to start playback\n      }\n    });\n\n    // Stop playback and return to the main menu\n    device.stop();\n\n    // Seek to the given offset in the media (if seek is supported)\n    var position = 500; // in seconds\n    device.scrub(position);\n\n    // Reverse playback direction (rewind)\n    // NOTE: may not be supported\n    device.reverse();\n\n    // Change the playback rate\n    // NOTE: only 0 and 1 seek to be supported for most media types\n    var rate = 0; // 0 = pause, 1 = resume\n    device.rate(rate);\n\n    // Adjust playback volume\n    // NOTE: may not be supported\n    device.volume(value);\n","maintainers":[{"name":"benvanik","email":"ben.vanik@gmail.com"}],"time":{"modified":"2022-06-13T02:33:09.237Z","created":"2011-11-06T06:57:22.381Z","0.0.1":"2011-11-06T06:57:24.639Z","0.0.2":"2011-11-06T21:43:01.082Z","0.0.3":"2012-10-10T03:21:52.797Z"},"author":{"name":"Ben Vanik","email":"ben.vanik@gmail.com"},"repository":{"type":"git","url":"git://github.com/benvanik/node-airplay.git"},"users":{"rchk":true,"erikfloresq":true,"swistak":true,"goliatone":true,"fernandodelucca":true,"dosevader":true,"p4r4n0id":true,"makediff":true}}