跟随引擎4.3.0版本

This commit is contained in:
dexter
2022-06-19 23:44:19 +08:00
parent 13c8e2349a
commit bf138bc595
2 changed files with 3 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ func (c *WebTransportConfig) OnEvent(event any) {
sub := &WebTransportSubscriber{}
sub.SetIO(s)
sub.ID = strconv.FormatInt(int64(s.StreamID()), 10)
plugin.SubscribeBlock(streamPath, sub)
plugin.SubscribeBlock(streamPath, sub, SUBTYPE_FLV)
})
mux.HandleFunc("/push/", func(w http.ResponseWriter, r *http.Request) {
streamPath := r.URL.Path[len("/push/"):]

View File

@@ -13,9 +13,8 @@ func (wt *WebTransportSubscriber) OnEvent(event any) {
switch v := event.(type) {
case ISubscriber:
wt.Write(codec.FLVHeader)
case HaveFLV:
flvTag := v.GetFLV()
if _, err := flvTag.WriteTo(wt); err != nil {
case FLVFrame:
if _, err := v.WriteTo(wt); err != nil {
wt.Stop()
}
default: