Commit a0dec8cd by ziyue

支持多级溯源

parent f0cd54fe
......@@ -417,12 +417,6 @@ void installWebHook(){
//监听播放失败(未找到特定的流)事件
NoticeCenter::Instance().addListener(nullptr, Broadcast::kBroadcastNotFoundStream, [](BroadcastNotFoundStreamArgs) {
if (start_with(args._param_strs, kEdgeServerParam)) {
//来自边沿站的溯源请求,流不存在时立即返回拉流失败
closePlayer();
return;
}
if (!origin_urls.empty()) {
//设置了源站,那么尝试溯源
static atomic<uint8_t> s_index { 0 };
......@@ -431,6 +425,12 @@ void installWebHook(){
return;
}
if (start_with(args._param_strs, kEdgeServerParam)) {
//源站收到来自边沿站的溯源请求,流不存在时立即返回拉流失败
closePlayer();
return;
}
GET_CONFIG(string, hook_stream_not_found, Hook::kOnStreamNotFound);
if (!hook_enable || hook_stream_not_found.empty()) {
return;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论