Supports client protocol 3 - subscriber as primary (#110)
* use subscriber connection as primary whenever possible * backwards compat for data messages * bump protocol version
This commit is contained in:
+10
-1
@@ -216,7 +216,16 @@ func (r *Room) Join(participant types.Participant, opts *ParticipantOptions) err
|
||||
}
|
||||
})
|
||||
|
||||
return participant.SendJoinResponse(r.Room, otherParticipants, r.iceServers)
|
||||
if err := participant.SendJoinResponse(r.Room, otherParticipants, r.iceServers); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if participant.ProtocolVersion().SubscriberAsPrimary() {
|
||||
// initiates sub connection as primary
|
||||
participant.Negotiate()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Room) RemoveParticipant(identity string) {
|
||||
|
||||
Reference in New Issue
Block a user