Closed slyoldfox closed 3 months ago
Happy with this change - fix that small debug line and I'll merge and push 👍🏻
And thanks to your code my doorbell now supports rtsp :-)
For people that are interested in the implementation, it's in https://github.com/slyoldfox/c300x-controller/blob/main/lib/rtsp-server.js#L66
Since the doorbell already streams RTP packets, I managed to just create a ClientServer
and Mounts
object (thus not needing a PublishServer
at all).
The tricky part was to align the rtpPortStart
with the ports that the doorbell sends it RTP packets to - so that the streams each have the correct ports for audio and video and that RtpUdp
listens on the correct ports and can forward them to the connected clients.
Apart from that, I did also observe that when an exception occurs inside the RTSP method calls, the rtps server doesn't seem to handle promise rejections properly (though maybe that may be on my side).
At the moment I added:
process.on('uncaughtException', function(e){
console.error('uncaughtException', e);
});
process.on('unhandledRejection', function(e){
console.error('unhandledRejection', e);
});
to work around that.
@chriswiggins do you still require something from my side? Can I assist you in any way?
Thank you @slyoldfox - published as 2.1.0
…https://www.rfc-editor.org/rfc/rfc2326.html#page-43)
This fixes an issue with VLC in iOS which seems to retry request when a 504 error is sent back.
@chriswiggins would love if you could take the time to publish this. If not I'll publish my own fork in a few weeks.