Open salemgolemugoo opened 8 years ago
You can't prevent client from connect by that.
You need to process on_connect <url>
event handler, or on_play <url>
. If someone unwanted connecting to unwanted app, or trying to play unplayable - just return 404/500 by <url>
.
I think there is a misunderstanding between us. See, I'm trying to reach something like that: The client has access to stream to 2 external services. Rtmp module initially redirects the client to all available services (for example 5), then I drop unnecessary services, and leave only 2 of them. So I can't drop initial connection from the client (on_connect or on_play), because it drops all of them.
|----- youtube -> continue play
client -> Initial app --> (internal redirect) |----- twitch -> continue play
|----- goodgame -> drop connection to this external service only
Ah, something like dynamic publish-relay.
There is no way except constantly drop publishing via on_publish
handler.
Or you can try to redirect stream to null
app via 301 location
answer via handler:
Location /null/<stream-name>
Which deny play for all.
Hm, I'll try, thx.
Hi, guys. I'm trying to avoid using external applications like FFmpeg. My config:
When I start streaming by OBS, i see: http://prntscr.com/aj7rs0 At http://php_app/rtmp/publish - there is some kind of redirecting logic to external streaming services.
When I drop connection by sending a request to http://rtmphost/control/drop/publisher?app=youtube&name=re_admin_8e2218e4ffb0fdf9c41c362580b3c5d6 or http://rtmphost/control/drop/client?app=live&name=re_admin_8e2218e4ffb0fdf9c41c362580b3c5d6&clientid=41, connection drops, but after 3 seconds it appears again.
Can I drop connection permanently?