Git Product home page Git Product logo

node-airplay's Introduction

node-airplay

NPM

npm version Dependency Status

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

some code full reference node-airplay, thanks!

Installation

From npm:

npm install airplay2

From bower:

bower install airplay

From source:

git clone https://github.com/zfkun/node-airplay.git
npm link

Dependencies

  • node-plist

  • node_mdns

    • It's my fork, hack an error no such record
    • Unfortunately the original node_mdns is woefully out of date and has required many tweaks to get working
  • ffmpeg

    brew install ffmpeg

Usage

// remote video
var browser = require('airplay2').createBrowser();
browser.on('deviceOn', function(device) {
    device.play('http://remotehost/video.mp4', 0, function() {
        console.info('video playing...');
    });
});
browser.start();
// local video (by HLS)
var hls = require('airplay2').createHLS();
hls.start(7001);
hls.open('/Users/zfkun/videos/1.mkv', function(info) {
    console.info('video opened: ', info);
});

var browser = require('airplay2').createBrowser();
browser.on('deviceOn', function(device) {
    device.play(hls.getURI(), 0, function() {
        console.info('video playing...');
    });
});
browser.start();

Help

API

Todo

  • 多码率切换
  • 外挂字幕

node-airplay's People

Contributors

jacksonh avatar mbilker avatar zfkun avatar

Watchers

 avatar

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.