Open the-eater opened 9 years ago
Yes! Please look for crossdomain.xml
in http.coffee (line 1549). You can add HTTP API somewhere around there. However, I will change server.coffee drastically to add support for multiple streams in the coming weeks, so please keep your code simple, or postpone your work until my code is pushed.
detectedVideoWidth
and detectedVideoHeight
.
clientsCount
is the number of currently connected clients.
There are three ways to publish streams: RTMP, RTSP, and internal protocol. Though there is no dedicated variable to distinguish them, you can add some code to places that are executed when the server starts to receive streams (sorry for the messy code!):
Line 129
rtmpServer.on 'video_start', ->
# here
Line 2005
else if req.method is 'RECORD'
# here
Line 463
videoControlReceiver.on 'packet', (buf) ->
# here
Looking through the code, I think it seems better to wait till you have multiple streams done as the main thing is getting the streams, this is in the current implementation totally ignored. I don't know what the idea is for the new code but having a class Publisher
or something like that would be really rad.
Is it possible to create an HTTP API to query who are publishing, with what resolution, how much listeners there are.
Im open to do it myself if you could point me to the right direction :)