Skip to content

xfeldman/node-airplay

Repository files navigation

node-airplay

NPM

npm versionDependency 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

Usage

// remote videovarbrowser=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)varhls=require('airplay2').createHLS();hls.start(7001);hls.open('/Users/zfkun/videos/1.mkv',function(info){console.info('video opened: ',info);});varbrowser=require('airplay2').createBrowser();browser.on('deviceOn',function(device){device.play(hls.getURI(),0,function(){console.info('video playing...');});});browser.start();

Help

API

Todo

  • 多码率切换
  • 外挂字幕

About

Apple AirPlay client library for node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%