Description
We are integrating Video SDK into our web application with React-js web platform.The self view video rendering is not visible on IOS Devices(safari browser).In android browsers self video rendering is working. Whenever two users join in the same session in safari browser user’s own streaming is not visible to them. Other users are able to see their streaming, we tried to fix this and did multiple tests in Safari browser it’s only showing black screen.
Browser Console Error
{
reason: “Received Canvas is Falsy” ,
type: “INVALID_PARAMETERS”
}
Web Video SDK version
version : 1.5.1
Video SDK Code Snippet
Here you can see the video rendering code
if (isAndroidBrowser() || (isSupportOffscreenCanvas() && !mediaStream?.isSupportMultipleVideos())) {
const videoElement = document.querySelector(`#${SELF_VIDEO_ID}`) as HTMLVideoElement;
if (videoElement) {
await mediaStream?.startVideo({ hd: true, videoElement, cameraId: 'environment' });
}
} else {
const startVideoOptions = { hd: true, cameraId: 'environment' };
if (mediaStream?.isSupportVirtualBackground()) {
Object.assign(startVideoOptions, { virtualBackground: { imageUrl: 'blur' } });
}
await mediaStream?.startVideo(startVideoOptions);
if (!mediaStream?.isSupportMultipleVideos()) {
try{
const canvasElement = document.querySelector(`#${SELF_VIDEO_ID}`) as HTMLCanvasElement;
await mediaStream?.renderVideo(canvasElement, zmClient.getSessionInfo().userId, 1280, 720, 0, 0, 3);
} catch (error) {
console.log(error);
}
}
}