Add FastPublish in JoinResponse (#2964)

Set FastPublish in JoinResponse for participant can publish
and no ice fallback setting.
This commit is contained in:
cnderrauber
2024-08-28 12:00:28 +08:00
committed by GitHub
parent bde702d9c9
commit 16896e4d66
7 changed files with 151 additions and 3 deletions
+3
View File
@@ -1139,6 +1139,8 @@ func (r *Room) createJoinResponseLocked(participant types.LocalParticipant, iceS
}
}
iceConfig := participant.GetICEConfig()
hasICEFallback := iceConfig.GetPreferencePublisher() != livekit.ICECandidateType_ICT_NONE || iceConfig.GetPreferenceSubscriber() != livekit.ICECandidateType_ICT_NONE
return &livekit.JoinResponse{
Room: r.ToProto(),
Participant: participant.ToProto(),
@@ -1155,6 +1157,7 @@ func (r *Room) createJoinResponseLocked(participant types.LocalParticipant, iceS
ServerRegion: r.serverInfo.Region,
SifTrailer: r.trailer,
EnabledPublishCodecs: participant.GetEnabledPublishCodecs(),
FastPublish: participant.CanPublish() && !hasICEFallback,
}
}