ossrs/srs

Can the 'on_play' HTTP callback be enhanced to include the 'pageUrl'?

backylee opened this issue · 3 comments

When publishing a stream, on_connect becomes on_publish.
When a client is playing, on_connect becomes on_play.

If you want to control client anti-leeching, the pageUrl in on_connect should not be used for whitelist checking, as it will affect the publishing process.
If you include pageUrl separately in on_play, you can perform the check.
Of course, SRS's Refer anti-leeching can also do this job, and if there is an HTTP callback, it will be more flexible.

TRANS_BY_GPT3

I will add it in version 2.0.

TRANS_BY_GPT3

[2015-07-21 10:55:21][trace] srs on_play: client id=110, ip=127.0.0.1, 
vhost=__defaultVhost__, app=live, stream=livestream, 
pageUrl=http://www.ossrs.net/players/srs_player.html?vhost=dev&stream=livestream&server=dev&port=1935

[2015-07-21 10:55:35][trace] srs on_close: client id=110, ip=127.0.0.1, 
vhost=__defaultVhost__, app=live, 
send_bytes=634022, recv_bytes=3622