Open davidliu opened 2 years ago
Definitely +1
Tried this, expecting it to fire when camera flips between front/back but it didn't — the track instance is the same.
room.localParticipant::videoTracks.flow
.map { (it.firstOrNull()?.second as? LocalVideoTrack) }
.collect { /* set renderer mirror */ }
Unfortunately I see no room.events
that gets triggered when I flip camera (by changing options and restarting the track).
@AchrafAmil note that the track isn't replaced when camera is flipped; the LocalVideoTrack instance remains the same.
Yes! Until it's made immutable and would therefore inevitably be a new instance.
State flows won't refire for internal changes within objects. Need to create immutable versions for flows.