Support for video dimensions in publications (#36)

* send back video dimensions

* Store video dimensions in MediaTrack and forward in TrackInfo

* use committed protocol
This commit is contained in:
David Zhao
2021-06-18 21:05:56 -07:00
committed by GitHub
parent 515b1f0f7e
commit 38c81e5645
14 changed files with 157 additions and 49 deletions
+2 -2
View File
@@ -157,7 +157,7 @@ func (r *Room) Join(participant types.Participant, opts *ParticipantOptions) err
r.statsReporter.AddParticipant()
// it's important to set this before connection, we don't want to miss out on any publishedTracks
participant.OnTrackPublished(r.onTrackAdded)
participant.OnTrackPublished(r.onTrackPublished)
participant.OnStateChange(func(p types.Participant, oldState livekit.ParticipantInfo_State) {
logger.Debugw("participant state changed", "state", p.State(), "participant", p.Identity(),
"oldState", oldState)
@@ -344,7 +344,7 @@ func (r *Room) autoSubscribe(participant types.Participant) bool {
}
// a ParticipantImpl in the room added a new remoteTrack, subscribe other participants to it
func (r *Room) onTrackAdded(participant types.Participant, track types.PublishedTrack) {
func (r *Room) onTrackPublished(participant types.Participant, track types.PublishedTrack) {
// publish participant update, since track state is changed
r.broadcastParticipantState(participant, true)