Hi @Manoj Gavel ,
welcome to the Microsoft Q&A Platform!
It seems you're encountering an issue with rendering video in the VideoGallery
component of your React project while using the Azure Communication Services React SDK.
Ensure Video Streams Are Available
Make sure both the local and remote participants have valid video streams:
const MockLocalParticipant = {
videoStream: mockLocalVideoStream, // Ensure video stream exists
};
const mockRemoteParticipants = [
{
videoStream: mockRemoteVideoStream, // Ensure each remote participant has a video stream
},
];
Layout Configuration
Ensure the layout is correctly defined for both local and remote videos:
const layout = {
local: "floating", // Options: "floating", "grid", "stacked"
remote: "grid", // Options: "grid", "stacked"
};
Local Video Options
Ensure localVideoViewOptions
is correctly set to display the local video:
const localVideoViewOptions = {
isMirrored: true, // Optional: Mirrors the local video
};
Disable VideoTileMenu for Testing
Temporarily set remoteVideoTileMenu
to false
for debugging:
<VideoGallery
layout={layout}
localParticipant={MockLocalParticipant}
remoteParticipants={mockRemoteParticipants}
localVideoViewOptions={localVideoViewOptions}
pinnedParticipants={pinnedParticipants}
onPinParticipant={(userId) => setPinnedParticipants([...pinnedParticipants, userId])}
onUnpinParticipant={(userId) => setPinnedParticipants(pinnedParticipants.filter(id => id !== userId))}
remoteVideoTileMenu={false} // Disable for testing
/>