Closed michalsek closed 11 months ago
Hi! Thank you for this report. I will file a report for this, but in the meantime I recommend using participant.tracks.video.persistentTrack
as your track accessor. videoTrack
is mostly legacy and the tracks
payload is our preferred way to access. See the callout at the bottom of this page
I have filed a ticket to properly deprecate these old fields so other people can avoid this issue. We will fix the type as part of this effort as well.
videoTrack
and related fields were marked as deprecated earlier this year. Closing this ticket, as the participant.tracks.video.persistentTrack
is now the recommended means to access a track.
Expected behavior
Participants
session.videoTrack
returns undefined orVideoTrack
object orparticipant.session.videoTrack
is properly typed to returnundefined | false | VideoTrack
Describe the bug (unexpected behavior)
Participants
session.videoTrack
sometimes returnsfalse
which is inconsistent with the types. This results in statements likesession.videoTrack?.getConstraints()
to throw error, as we are trying to access.getConstraints()
method on a boolean.Steps to reproduce
It seems to be a bit random, but usually the boolean value appears when trying to access
videoTrack
durning call initialization.System information and additional context
Happens both on web (tested on chrome) and mobile using
react-native-daily-js
daily-js@0.37.0
react-native-daily-js@0.35.0
webrtc@1.9.4.1-daily.8