Coder Social home page Coder Social logo

node-airplay-js's Introduction

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

node-airplay-js's People

Contributors

dcposch avatar feross avatar gonzalolarralde avatar guerrerocarlos avatar se-bastiaan avatar simphax avatar zfkun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-airplay-js's Issues

Remove console log spew

When running the latest version 0.2.4, I get the following console log that is impossible to prevent:

warning. cought an error generating ServiceType [Error: type Apple TV must start with an underscore followed by alphanumeric characters and hyphens only]

This is messing up the WebTorrent terminal GUI when using AirPlay. I believe this may be coming from mdns-js, but is airplay-js passing bad params to it? It wasn't happening before.

Unable to find Freebox Player

Freebox Player is an AirPlay device provided by the French ISP named "Free", you can stream media content to it and it'll show on the TV.
With the older node-airplay package, my device is detected fine.
With node-airplay-js my device isn't detected at all.
I use the following code:

browser.on('deviceOnline', function(device) {
console.log('device online: ' + device.id);
});
browser.start();
browser.getDevices();

Result with node-airplay:

[ { id: 0,
info_:
{ interfaceIndex: 2,
type: [Object],
replyDomain: 'local.',
flags: 2,
name: 'Freebox Player',
networkInterface: 'REMOVED',
fullname: 'Freebox\032Player.airplay.tcp.local.',
host: 'Freebox-Player.local.',
port: 7000,
rawTxtRecord: <SlowBuffer 04 76 76 3d 31 09 66 6c 61 67 73 3d 30 78 34 0e 73 72 63 76 65 72 73 3d 31 36 30 2e 31 30 16 6d 6f 64 65 6c 3d 46 72 65 65 62 6f 78 50 6c 61 79 65 72 31 ...>,
txtRecord: [Object],
addresses: [Object] },
serverInfo
:
{ deviceId: 'REMOVED',
features: 35662523,
model: 'FreeboxPlayer1,1',
protocolVersion: '1.0',
sourceVersion: '160.10' },
ready
: true,
client_:
{ host_: 'Freebox-Player.local.',
port_: 7000,
user_: 'Airplay',
pass_: '',
responseWaiters_: [],
socket_: [Object] },
_events: { ready: [Function], close: [Function] } } ]

Result with node-airplay-js:

[]

Does not see either AirPort Express or AirServer on El Capitan

Hi!

If I run main.js in the test directory, it does not seem to produce any output, but I think I should. I have an AirPort Express on the local network, and AirServer (Apple TV emulator) on localhost for testing purposes, but no success.
If you have any suggestion where to look, let me know!

(naturally, I only want to stream audio, no video)

Remove native dependencies

The goal of this module is to be pure JavaScript, correct? The dependency asyncblock requires a compiled, native dependency fibers. Can we eliminate this dependency so airplay-js is pure-JS again?

Crsah when starting test/main.js when hardcoded port 5353 is already occupied

With latest commit as of now on OS X El Capitan, I get following:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: bind EADDRINUSE 192.168.5.129:5353
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at dgram.js:213:18
    at doNTCallback3 (node.js:440:9)
    at process._tickCallback (node.js:346:17)
    at Function.Module.runMain (module.js:477:11)
    at startup (node.js:117:18)
    at node.js:951:3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.