on_play/on_publish hook 新增protocol字段 (#4133 #4143)

对于webhook  涉及到media info的相关信息,增加protocol 的字段,表明是基于什么协议传输的
This commit is contained in:
xiongguangjie
2025-02-13 15:18:47 +08:00
committed by GitHub
parent 8a4d548427
commit 2a85dffdf9
7 changed files with 19 additions and 0 deletions

View File

@@ -229,6 +229,11 @@ void dumpMediaTuple(const MediaTuple &tuple, Json::Value& item);
static ArgsType make_json(const MediaInfo &args) {
ArgsType body;
body["schema"] = args.schema;
if(!args.protocol.empty()){
body["protocol"] = args.protocol;
}else{
body["protocol"] = args.schema;
}
dumpMediaTuple(args, body);
body["params"] = args.params;
return body;