|
|
|
@ -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'); |
|
|
|
|
} |
|
|
|
|