-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Description
Note: Please read FAQ before file an issue, see #2716
Description
Please description your issue here
-
SRS Version: v5.0.141
-
SRS Log:
hook callback data
{
"server_id": "vid-4k7q1c7",
"action": "on_play",
"client_id": "k42jf786",
"ip": "10.67.4.32",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "34020000001320000203_cd35264f57e044e4a862f3c9502729912",
"tcUrl": "rtmp://__defaultVhost__/live",
"param": "",
"pageUrl": "http://10.67.4.32:3003/",
"stream_url": "/live/34020000001320000203_cd35264f57e044e4a862f3c9502729912",
"stream_id": "vid-4l10070"
}
- SRS Config:
# docker config for srs.
# @see full.conf for detail config.
listen 1935;
max_connections 1000;
# For docker, please use docker logs to manage the logs of SRS.
# See https://docs.docker.com/config/containers/logging/
srs_log_tank console;
daemon off;
http_api {
enabled on;
listen 1985;
raw_api {
enabled on;
allow_reload on;
}
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
rtc_server {
enabled on;
listen 8000;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
candidate 10.67.65.8;
}
vhost __defaultVhost__ {
http_hooks {
enabled on;
on_close http://10.67.4.32:3009/api/v1/clients;
on_play http://10.67.4.32:3009/api/v1/sessions;
on_stop http://10.67.4.32:3009/api/v1/sessions;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtc {
enabled on;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
rtmp_to_rtc on;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
rtc_to_rtmp off;
stun_timeout 5;
stun_strict_check on;
}
publish {
normal_timeout 600000;
}
}
Replay
Please describe how to replay the bug?
Step 1: Configure the hook interface
on_play http://10.67.4.32:3009/api/v1/sessions;
Step 2: Hook callback data
Hook callback data
{
"server_id": "vid-4k7q1c7",
"action": "on_play",
"client_id": "k42jf786",
"ip": "10.67.4.32",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "34020000001320000203_cd35264f57e044e4a862f3c9502729912",
"tcUrl": "rtmp://__defaultVhost__/live",
"param": "",
"pageUrl": "http://10.67.4.32:3003/",
"stream_url": "/live/34020000001320000203_cd35264f57e044e4a862f3c9502729912",
"stream_id": "vid-4l10070"
}
Expect
Please describe your expectation.
To handle media service restart exceptions, it is requested to return the unique service_id instead of server_id. In previous versions, server_id was used to handle exceptions, but it has now been assigned as the unique ID for the machine and cannot be changed during service restarts. Therefore, it is preferred to use service_id and it is expected to be returned as well.
TRANS_BY_GPT3