mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
支持多级溯源
This commit is contained in:
parent
f0cd54fe83
commit
a0dec8cd79
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user