mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(tests): Add more checks so that test don't error out.
This commit is contained in:
committed by
Jaya Allamsetty
parent
73c3feb8fa
commit
fd313c1af7
@@ -38,7 +38,7 @@ export function isLargeVideoReceived({ getState }: Object): boolean {
|
||||
const largeVideoParticipantId = getState()['features/large-video'].participantId;
|
||||
const videoTrack = getTrackByMediaTypeAndParticipant(
|
||||
getState()['features/base/tracks'], MEDIA_TYPE.VIDEO, largeVideoParticipantId);
|
||||
const lastMediaEvent = getState()['features/large-video'].lastMediaEvent;
|
||||
const lastMediaEvent = getState()['features/large-video']?.lastMediaEvent;
|
||||
|
||||
return videoTrack && !videoTrack.muted && (lastMediaEvent === 'playing' || lastMediaEvent === 'canplaythrough');
|
||||
}
|
||||
@@ -54,5 +54,5 @@ export function isRemoteVideoReceived({ getState }: Object, id: String): boolean
|
||||
const videoTrack = getTrackByMediaTypeAndParticipant(getState()['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
|
||||
const lastMediaEvent = videoTrack?.lastMediaEvent;
|
||||
|
||||
return !videoTrack.muted && (lastMediaEvent === 'playing' || lastMediaEvent === 'canplaythrough');
|
||||
return videoTrack && !videoTrack.muted && (lastMediaEvent === 'playing' || lastMediaEvent === 'canplaythrough');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user