adding a demo that showcases a GenServer that subscribes to any client and spawns a separate pipeline for each new client that connects
improve the documentation of the subscription mechanism and the {:client_ref, client_ref, app, stream_key} message
In order to implement these features, one needs to think how to handle a case in which there are multiple subscription for the same app and stream_key pair, as the client handler is designed to proxy a communication between a singe client and a single stream receiver.
[EDIT]
It seems that a reasonable way to go would be to pass a lambda when spawning RTMP.Server - that lambda would be invoked with app and stream_key as argument when new client connects. User could specify how to react upon new client connection. With this approach, the subscription mechanism could be removed at all.
The following things need to be done:
app
andstream_key
any
client and spawns a separate pipeline for each new client that connects{:client_ref, client_ref, app, stream_key}
message In order to implement these features, one needs to think how to handle a case in which there are multiple subscription for the sameapp
andstream_key
pair, as the client handler is designed to proxy a communication between a singe client and a single stream receiver. [EDIT] It seems that a reasonable way to go would be to pass a lambda when spawningRTMP.Server
- that lambda would be invoked withapp
andstream_key
as argument when new client connects. User could specify how to react upon new client connection. With this approach, the subscription mechanism could be removed at all.