fix: TypeError: Cannot read property 'isAudioTrack' of undefined
When there's no jitsiTrack set on the base/tracks entry it means a track is being created (get user media is in progress).
This commit is contained in:
parent
946339a52e
commit
e0aab11f98
|
@ -320,7 +320,7 @@ export function getTrackByMediaTypeAndParticipant(
|
||||||
mediaType,
|
mediaType,
|
||||||
participantId) {
|
participantId) {
|
||||||
return tracks.find(
|
return tracks.find(
|
||||||
t => t.participantId === participantId && t.mediaType === mediaType
|
t => Boolean(t.jitsiTrack) && t.participantId === participantId && t.mediaType === mediaType
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,9 @@ MiddlewareRegistry.register(store => next => async action => {
|
||||||
await dispatch(replaceLocalTrack(localVideoTrack.jitsiTrack, null));
|
await dispatch(replaceLocalTrack(localVideoTrack.jitsiTrack, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
const jitsiTracks = getState()['features/base/tracks'].map(t => t.jitsiTrack);
|
const jitsiTracks = getState()['features/base/tracks']
|
||||||
|
.map(t => t.jitsiTrack)
|
||||||
|
.filter(t => Boolean(t)); // Filter out GUM in progress tracks...
|
||||||
|
|
||||||
dispatch(setPrejoinPageVisibility(false));
|
dispatch(setPrejoinPageVisibility(false));
|
||||||
APP.conference.prejoinStart(jitsiTracks);
|
APP.conference.prejoinStart(jitsiTracks);
|
||||||
|
|
Loading…
Reference in New Issue