mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-10-05 07:27:14 +08:00
🐛 FIX: 外推时streamPath设定
This commit is contained in:
@@ -102,7 +102,8 @@ func (pusher *RTMPPusher) Push() error {
|
||||
if response, ok := msg.MsgData.(*ResponseCreateStreamMessage); ok {
|
||||
pusher.StreamID = response.StreamId
|
||||
URL, _ := url.Parse(pusher.RemoteURL)
|
||||
ps := strings.Split(URL.Path, "/")
|
||||
_, streamPath, _ := strings.Cut(URL.Path, "/")
|
||||
_, streamPath, _ = strings.Cut(streamPath, "/")
|
||||
pusher.Args = URL.Query()
|
||||
pusher.SendMessage(RTMP_MSG_AMF0_COMMAND, &PublishMessage{
|
||||
CURDStreamMessage{
|
||||
@@ -112,7 +113,7 @@ func (pusher *RTMPPusher) Push() error {
|
||||
},
|
||||
response.StreamId,
|
||||
},
|
||||
ps[len(ps)-1],
|
||||
streamPath,
|
||||
"live",
|
||||
})
|
||||
} else if response, ok := msg.MsgData.(*ResponsePublishMessage); ok {
|
||||
|
Reference in New Issue
Block a user