noelhibbard / node-airplayhub

AirPlay server which accepts streams and then streams the audio back out to multiple AirPlay devices with sync support.
51 stars 12 forks source link

Error when HTC attempts connection #18

Open gearhead opened 6 years ago

gearhead commented 6 years ago

I can get this to work using RAOP pulseaudio as a source. I can 'see' it as a device on my desktop screen and connect to it and it does seem to work well. WHen I try to connect to it with my HTC One M9, though, I get an error and it crashes the program. My guess is HTC is probably not 100% compliant with Apple which is causing the issue. I am guessing a little bit better error trapping may help this to work:

buffer.js:141
    throw new TypeError('must start with number, buffer, array or string');
    ^

TypeError: must start with number, buffer, array or string
    at fromObject (buffer.js:141:11)
    at new Buffer (buffer.js:62:10)
    at Object.decryptAudioData (/usr/local/lib/node_modules/node-airplayhub/node_modules/nodetunes/lib/helper.js:141:27)
    at RtpServer.<anonymous> (/usr/local/lib/node_modules/node-airplayhub/node_modules/nodetunes/lib/rtp.js:32:23)
    at emitTwo (events.js:87:13)
    at Socket.emit (events.js:172:7)
    at UDP.onMessage (dgram.js:480:8)