Video crop issue on landscape view on web

3MfvdJGkR5iK0Eg07KHxGw==
g+muPFaCQ/ekwxJa+buVpg==
'+QPJA6vETOeVH5WeL/uH5Q==
9XI8DaQWS4OF7RuBrkLBtA==
QPkDg3H+TsOdy29DGNW8Ew==
cc5wIAY1RlChHZwW/VwBHw==
j9pV218yTDqlf5SdnTdjcA==
jOUTx29MRjmUr9AWM0kv/g==
uSBUcRubTtyeJd+tz9j10w==
x0uDbGT2S7uoJ/YPPADevA==
mkz7Ko+ORg2vzTK91GU1lw==
V3ZelqiWSKiK2HGy/+It7A==
vwxxQrb+RvyR3wzhDCwanQ==
8enTtGc9RUC4E0XOn5Q/cw==
RiVw3H70RDaljMeeW+OLBQ==
egYNe4geT++9ABFXxmYYkg==
/LoLMK6OR3Kwf3t3aEPuYw==
b6UqMc0/TbWBMQkDKh0A1w==
iGPh9G3/T1iaS2oUuYLE7w==
gpKmsgneTbSRPUfJTxr/Xg==
zH5A4CHdR2KdJK+6UHlVDg==
rcTdegfOS8iy1xmbhMM4ww==
8kIG0j2sQ6Kxm7A8PqPXqQ==

From this, some of the IDs did not get the proper connection to Zoom in React Native for the attendees.
RJHexpyQqu0fqVSzGUlMg==
im using “@zoom/react-native-videosdk”: “^1.6.2”, version

When connecting to Zoom from our office network, the connection is not consistently established most of the time, and I don’t know why. Strangely, it works fine on my home WiFi, and both networks are in good condition. We conducted a Zoom meeting for testing purposes, and it worked smoothly there. I’m puzzled about why this issue is occurring, especially within the context of the video SDK.
r0qEJy2QQTK5RJGsC+L2oA== (Home wifi)

Does anyone know how to solve this issue?

Hey @dev.jestinxavier

Thank you for sharing these sessions with us.

We have conducted preliminary checks, and many sessions only lasted around 1 minute or had only one participant. Only one session matches the case you described, and we are analyzing it.

g+muPFaCQ/ekwxJa+buVpg==

As for this session RJHexpyQqu0fqVSzGUlMg==, we cannot find any log related to it.

Thanks
Vic

+lBmx37PSsCISlqsMbp5/Q==
blank screen on both sides no video feed.

MVGEA5nrSjS+YAC4in2XuQ==
didn’t get the video feed on both sides.

Is this a network or firewall issue? If yes, how can we confirm that?

Hey @dev.jestinxavier

We analyzed the two sessions you provided, and we found that the downlink latency is very high on the web side.

MVGEA5nrSjS+YAC4in2XuQ==

On the React Native side, the method to render the video of the remote participant was called only after 1.5 minutes after enabling the camera on the Web side. We need your assistance in investigating this further.

Thanks
Vic

import React, { useState, useEffect, useRef } from "react";
import {
  View,
  StyleSheet,
  ScrollView,
} from "react-native";
import { VideoView } from "../../components/VideoView";
import { useZoom } from "@zoom/react-native-videosdk";
import { useIsMounted } from "../../hooks/hooks";
import { useSocket } from "../../context/SocketContext";
import ApplicationLog from "../../api/ApplicationLog";
import axios from "axios";
import ErrorBoundary from "../../components/ErrorBoundary/ErrorBoundary";
import {
  ROLETYPE,
  UIDSTORING,
  ZOOMCREDENTIALS,
  videoCredential,
} from "../../Recoil/recoilState";
import { useRecoilState, useRecoilValue } from "recoil";
export function VideoCallScreen() {
  const [users, setUsers] = useState([]);
  const [isInSession, setIsInSession] = useState(false);
  const [signatureData, setSignatureData] = useState(null);
  const [myselfUserId, setMyselfUserId] = useState(null);
  const [isFullScreen, setIsFullScreen] = useState(false);
  const [route, setRoute] = useRecoilState(ROLETYPE);
  const [zoomCredentials, setZoomCredentials] = useRecoilState(ZOOMCREDENTIALS);
  const isFirstRender = useRef(true);
  const uid = useRecoilValue(UIDSTORING);
  const [zoomSecretKeyCredentials, setZoomSecretKeyCredentials] = useRecoilState(videoCredential);

  const [name, setName] = useState("");
  const zoom = useZoom();
  const isMounted = useIsMounted();
  const { socket } = useSocket();

  //const toggleFullScreen = () => {
    // setIsFullScreen(!isFullScreen);
  //};
  useEffect(() => {
    socket?.on("callEnded", (data) => {
      leaveSession();
      navigation.navigate("Checking");
      
    });
    return () => {
      socket?.off("participantLeft");
    };
  }, [socket]);


  const sendLogToPhone = (data) => {
    const uniqId = uid?.data?.robot?.uuid;

    const acknowledgementData = { id: uniqId, mobileLog: data };
    socket?.emit("sentToPhone", acknowledgementData);
  };

  useEffect(() => {
    const fetchSignature = async (zoomCredentialsData) => {
    
      try {
        if (isFirstRender.current) {
          
//  Here I'm using localhost for development
          const response = await axios.post(
            "http://192.168.1.7:5000/generateSignature",
            {
              sessionName: zoomCredentialsData.payload.data.sessionName,
              role: route.roleType,
              sessionKey: zoomCredentialsData.payload.data.sessionKey,
              userIdentity: route.displayName,
            },
            { timeout: 9000 }
          );

             socket?.emit("sentToPhone", response);

          const { signature } = response.data;
          console.log({ signature });
          setSignatureData(signature);
        }
        
      } catch (error) {
        if (error.response) {
          socket?.emit("sentToPhone", {'111':error.response});
        } else if (error.request) {
          socket?.emit("sentToPhone", {'117':error.request});

   
        } else {
          // Something happened in setting up the request that triggered an Error
          socket?.emit("sentToPhone", {'128':error.message});

          console.error("Error message:", error.message);
         
        }
       
      }
    };

    console.log({zoomSecretKeyCredentials,zoomCredentials});
    if (zoomCredentials) {
      setName(zoomCredentials.payload.data.name);
      fetchSignature(zoomCredentials);
    }

   
    sendLogToPhone(zoomCredentials);

    socket?.emit("callEnded", (data) => {
      leaveSession();
      navigation.navigate("Checking");
      
    });
  }, [zoomCredentials, socket]);

  useEffect(() => {
    async function joinSession() {
      if (signatureData) {
        try {
          let dataTop = await zoom.joinSession({
            sessionName: zoomCredentials.payload.data.sessionName,
            sessionIdleTimeoutMins: 30,
            sessionPassword: zoomCredentials.payload.data.userIdentity,
            token: signatureData,
            userName: route.displayName,
            audioOptions: { connect: true, mute: false },
            videoOptions: { localVideoOn: true },
          });
     
          sendLogToPhone({
            zoomJoinSession: dataTop,
            message: "zoomJoining session with signature  -3",
          });
          const mySelf = await zoom.session.getMySelf();
          setUsers([mySelf]);
          const cameraList = await zoom.videoHelper.getCameraList();
       
          sendLogToPhone({
            cameraList: cameraList,
            message: "cameraList   -4",
          });
        } catch (error) {
          console.error("Error joining session:", error);
          
          sendLogToPhone({ error, message: "join section try catch error" });
        }
      }
    }

    if (signatureData && isFirstRender.current) {
      joinSession();
      isFirstRender.current = false; // Set isFirstRender to false after the initial render
    }

    const sessionJoinListener = zoom.addListener("onSessionJoin", async () => {
      sendLogToPhone({ message: "onSessionJoin  event is triggered 5" });
      await ApplicationLog({
        message: "onSessionJoin  event is triggered 5",
      });
      zoom.audioHelper.startAudio();
      setIsInSession(true);

      // Retrieve mySelf within the listener
      const mySelf = await zoom.session.getMySelf();
      zoom.audioHelper.unmuteAudio(mySelf.userId);
      setMyselfUserId(mySelf.userId);
      const remoteUsers = await zoom.session.getRemoteUsers();
      sendLogToPhone({ remoteUsers, getRemoteUsers: "getRemoteUsers" });
      await ApplicationLog({
        remoteUsers: remoteUsers,
        message: "onSessionJoin  event remoteUsers data 5",
      });
      setUsers((prevUsers) => [...prevUsers, ...remoteUsers]);
    });

    const sessionLeaveListener = zoom.addListener("onSessionLeave", () => {
      setIsInSession(false);
      setUsers([]);
    });

    return () => {
      sessionJoinListener.remove();
      sessionLeaveListener.remove();
    };
  }, [zoom, signatureData, zoomCredentials]);

  const leaveSession = () => {
    zoom.leaveSession(false);
  };

  

  

  

  return (
    <View style={styles.container}>
      <ErrorBoundary>
        <ScrollView>
         
          {users.length > 0 && (
            <View style={{ marginTop: 28 }}>
              <RenderUsers
                users={users}
                ApplicationLog={ApplicationLog}
                name={name}
                isFullScreen={isFullScreen}
                toggleFullScreen={toggleFullScreen}
              />
            </View>
          )}
         
        </ScrollView>
      </ErrorBoundary>
    </View>
  );
}

export default VideoCallScreen;
export const RenderUsers = ({
  users,
  ApplicationLog,
  name,
  isFullScreen,
  toggleFullScreen,
}) => {
  let targetUser = users.filter((userData) => userData.userName == name);
  // console.log({ targetUser }, { users });
  ApplicationLog({
    users: users,
    message: "this is the User data 6 ",
  });
  ApplicationLog({
    name: name,
    message: "the name of the data 7",
  });

  ApplicationLog({
    targetUser: targetUser,
    message: "target User data 8",
  });

  return targetUser?.map((user) => (
    <VideoView
      user={user}
      fullScreen={isFullScreen}
      key={user.userId}
      onPress={toggleFullScreen}
    />
  ));
};
const styles = StyleSheet.create({
  container: {
    flex: 2,
    alignItems: "center",
    backgroundColor: "#F5FCFF",
  },
  container2: {
    flex: 1,
    backgroundColor: "#F5FCFF",
  },
  button: {
    backgroundColor: "red",
    padding: 10,
  },
  userList: {
    width: "100%",
  },
  userListContentContainer: {
    flexGrow: 1,
    justifyContent: "center",
  },
  chatInputWrapper: {
    flexDirection: "row",
    justifyContent: "space-between",
    alignItems: "center",
  },
  chatInput: {
    flex: 1,
    height: 40,
    marginVertical: 8,
    paddingHorizontal: 16,
    borderRadius: 6,
    borderWidth: 1,
    borderColor: "#666",
    color: "#AAA",
    backgroundColor: "rgba(0,0,0,0.6)",
  },
  chatSendButton: {
    height: 36,
  },
  modalContainer: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
    backgroundColor: "rgba(0,0,0,0.5)",
  },
  modal: {
    paddingTop: 16,
    paddingBottom: 24,
    paddingLeft: 24,
    paddingRight: 16,
    borderRadius: 8,
    backgroundColor: "#FFF",
  },
  modalTitleText: {
    fontSize: 18,
    marginBottom: 8,
  },
  modalActionContainer: {
    flexDirection: "row",
    justifyContent: "center",
  },
  modalAction: {
    marginTop: 16,
    paddingHorizontal: 24,
  },
  modalActionText: {
    fontSize: 14,
    fontWeight: "bold",
    color: "#666",
  },
  moreItem: {
    flexDirection: "row",
    marginTop: 16,
    justifyContent: "space-between",
    alignItems: "center",
  },
  moreItemText: {
    fontSize: 16,
  },
  moreItemIcon: {
    width: 36,
    height: 36,
    marginLeft: 48,
  },
  moreModalTitle: {
    fontSize: 24,
  },
  renameInput: {
    width: 200,
    marginTop: 16,
    borderWidth: 0,
    borderBottomWidth: 1,
    borderColor: "#AAA",
    color: "#000",
  },
  keyboardArea: {
    height: 0,
    width: 0,
    zIndex: -100,
  },
});

I'm sharing with you the React native code that I'm using here. zoomSecretKeyCredentials is passed from the web by using SockitIO.Preformatted text`

I ran this application on a different WiFi network, specifically my home WiFi, and it worked seamlessly. This has left me confused as to whether the issue lies with the firewall. Are there any specific ports or IP addresses that I need to enable to use this service effectively?

Hey @dev.jestinxavier

Here are our general Zoom-related network firewall and proxy settings for your reference:

https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0060548

Thanks
Vic

Hey @vic.yang, is there any issue with the code for joining the session or rendering video time? If there’s an issue, please correct me. Do you need any other information from my side to help solve this problem?

It seems there is a problem with rendering the video on the React Native side at times. Could you please check the code and guide me through it?

Hey @elaine.ku

Can you help me check if there is any issue with the code written in React Native?

Thanks
Vic

yes of course. What type of help do you need? it is working in my dev environment.

Hi @dev.jestinxavier ,

I checked the code and it looks okay from my side. The downlink of the session is the react native participant. If the downlink latency is high, it might cause an issue with video quality.

There will be a delay between calling joinSession function and receiving sessionJoinListener if the network is bad. Once the sessionJoinListener is triggered, there will also be a small delay in your App since the UI needs to be refreshed due to setIsInSession(true); is called.

Thank you.

Elaine

oBrqgf78XQdmUqB2fb8Bf4g==
in the React native i didn’t get the host Video stream

lg73CcI+ToGV+IORaILNUQ==
it shows a black screen in the app no video stream.

kgRrSd/kTIq6ar/NPRr4+g==
in this meeting, I didn’t get the remote users and onSessionJoin is not triggered. How can I solve this

Hi, I just integrated the Zoom SDK into React Native. I initiated a call with a high-quality camera, but it’s showing a small 2-second delay or getting stuck in the view. Could you please guide me on how to solve this issue?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.