-
Notifications
You must be signed in to change notification settings - Fork 45
Home
zfkun edited this page Jan 2, 2014
·
8 revisions
node-airplay is a client library for Apple's AirPlay remote playback protocol.
some code full reference node-airplay, thanks!
From npm:
npm intall airplay2 -g
From source:
git clone https://github.com/zfkun/node-airplay.git
npm link
-
- had merge my fix, see my pull-request
- It's my fork, add node-webkit
support
- If you are not in node-webkit
, you can modify package.json
like:
~~"dependencies": { "plist": "~0.4.3", ... }~~
-
- 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
- It's my fork, hack an error
~~项目已自带(dep目录下
),若不喜欢,~~下面是自行安装命令
brew install ffmpeg
// 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();
- Unofficial AirPlay Protocol Specification
- HLS(HTTP Live Streaming)
- ffmpeg build for ios
- ffmpeg build for MacOS
- mdns User Guide
- 多码率切换
- 外挂字幕