mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 02:12:44 +00:00
Do not accept unsupported track type in AddTrack (#3530)
This commit is contained in:
1 parent
507fc9cf76
commit
188470a24b
1 file changed
+6
-1
@@ -975,7 +975,12 @@ func (p *ParticipantImpl) handleMigrateTracks() []*MediaTrack {
|
||||
// records track details and lets client know it's ok to proceed
|
||||
func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest) {
|
||||
if !p.CanPublishSource(req.Source) {
|
||||
p.pubLogger.Warnw("no permission to publish track", nil)
|
||||
p.pubLogger.Warnw("no permission to publish track", nil, "trackID", req.Sid, "kind", req.Type)
|
||||
return
|
||||
}
|
||||
|
||||
if req.Type != livekit.TrackType_AUDIO && req.Type != livekit.TrackType_VIDEO {
|
||||
p.pubLogger.Warnw("unsupported track type", nil, "trackID", req.Sid, "kind", req.Type)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user