mirror of
https://github.com/lkmio/gb-cms.git
synced 2025-09-26 19:51:22 +08:00
fix: 拉流http hook失败问题
This commit is contained in:
20
api.go
20
api.go
@@ -319,18 +319,18 @@ func (api *ApiServer) OnPublish(params *StreamParams, w http.ResponseWriter, r *
|
||||
// 创建stream
|
||||
if params.Protocol == SourceTypeGBTalk {
|
||||
Sugar.Infof("对讲websocket已连接, stream: %s", params.Stream)
|
||||
}
|
||||
|
||||
s := &Stream{
|
||||
StreamID: params.Stream,
|
||||
Protocol: params.Protocol,
|
||||
}
|
||||
s := &Stream{
|
||||
StreamID: params.Stream,
|
||||
Protocol: params.Protocol,
|
||||
}
|
||||
|
||||
_, ok := StreamDao.SaveStream(s)
|
||||
if !ok {
|
||||
Sugar.Errorf("处理推流事件失败, stream已存在. id: %s", params.Stream)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
_, ok := StreamDao.SaveStream(s)
|
||||
if !ok {
|
||||
Sugar.Errorf("处理推流事件失败, stream已存在. id: %s", params.Stream)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -108,7 +108,7 @@ func MSCreateGBSource(id, setup string, ssrc string, sessionName string) (string
|
||||
},
|
||||
}
|
||||
|
||||
response, err := Send("api/v1/gb28181/offer/create", v)
|
||||
response, err := Send("api/v1/gb28181/source/create", v)
|
||||
if err != nil {
|
||||
return "", 0, nil, "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user