node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

airplay-js

node-airplay

node-airplay is a native javascript client library for Apple's AirPlay remote playback protocol.

Installation

From npm:

npm install airplay-js

Usage

// remote video 
var browser = require( 'airplay-js' ).createBrowser();
browser.on( 'deviceOn', function( device ) {
    device.play( 'http://remotehost/video.mp4', 0, function() {
        console.info( 'video playing...' );
    });
});
browser.start();

Testing

npm install
npm test

...then, turn on your AppleTV!

Help

API