node-airplay
node-airplay copied to clipboard
Dropped video playback
It would appear that the video will on play for a few seconds before dropping. I have tested on OSX and Ubuntu with multiple files and sources.
Do you have any idea why this happening?
var browser = require('airplay').createBrowser();
browser.on('deviceOnline', function(device) {
console.log('device online: ' + device.id);
device.play('http://www.wowza.com/_h264/BigBuckBunny_115k.mov', 0);
});
browser.start();
Further testing would suggest it drops connection at 60 seconds from time of open connection... (both OSX & Ubuntu)
Odd - I think the Apple TV doesn't like it when the client that started playing goes offline and will stop the video. It's possible that a newer node version has some kind of 60s timeout that is causing the socket to drop.
Ben Vanik http://www.noxa.org
On Fri, Dec 28, 2012 at 3:23 AM, Christopher Beck [email protected]:
It would appear that the video will on play for a few seconds before dropping. I have tested on OSX and Ubuntu with multiple files and sources.
Do you have any idea why this happening?
var browser = require('airplay').createBrowser();
browser.on('deviceOnline', function(device) { console.log('device online: ' + device.id); device.play('http://www.wowza.com/_h264/BigBuckBunny_115k.mov', 0); });
browser.start();
— Reply to this email directly or view it on GitHubhttps://github.com/benvanik/node-airplay/issues/5.
I have tried forcing keep alive on the socket. Out of ideas how to prevent the connection timing out. I can't find anything in the nodejs config that would override the default of no-timeout on the net package.
According to this resource (http://nto.github.com/AirPlay.html#servicediscovery-airplayservice) AirPlay utilizes reverse http.
It would seem that opening a second http connection to receive events should solve the problem.
Another - tested solution - would be to continiously query for playback status every X seconds (X being lower than the timeout) Seems to work - but reversing the http flow would seem more elegant.
I'm not much of a node-ninja yet, but when I get arround to it maybe I'll have a crack at it!
@renelaerke,
Which query were you running to keep the connection alive? I am trying to use this package in meteor.js and having a heck of a time sorting it all out.
Long time - but there is a /getstatus or similar you can poll every 10 second!
Sent from my iPhone
On 03/06/2013, at 03.40, Josh Owens [email protected] wrote:
@renelaerke https://github.com/renelaerke,
Which query were you running to keep the connection alive? I am trying to use this package in meteor.js and having a heck of a time sorting it all out.
— Reply to this email directly or view it on GitHubhttps://github.com/benvanik/node-airplay/issues/5#issuecomment-18818292 .