Add subscriber stream start event notification (#4449)
This commit is contained in:
@@ -262,6 +262,7 @@ type DownTrackListener interface {
|
||||
OnRttUpdate(rtt uint32)
|
||||
OnCodecNegotiated(webrtc.RTPCodecCapability)
|
||||
OnDownTrackClose(isExpectedToResume bool)
|
||||
OnStreamStarted()
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
@@ -1212,6 +1213,10 @@ func (d *DownTrack) WriteRTP(extPkt *buffer.ExtPacket, layer int32) int32 {
|
||||
sal.OnResume(d)
|
||||
}
|
||||
}
|
||||
|
||||
if tp.isStarting {
|
||||
d.params.Listener.OnStreamStarted()
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user