Fix for Ignored videoAspect Props in React Native Video SDK

Format Your New Topic as Follows:

  • SDK Type: React Native Video SDK
  • Version: 1.9.5

I am reporting an issue with the videoAspect props in the React Native Video SDK. It appears that the values set for videoAspect props in React Native are being overridden within the native code of the SDK, specifically in the RNZoomView.m file.

There is no specific error message. However, the videoAspect props do not reflect the values set in React Native, as they are overridden by default values within the native code.

Troubleshooting Routes

  • Investigated the RNZoomView.m source code.
  • Identified the sections where videoAspect was forcibly set to default values, thus ignoring the props provided from React Native.
  • Made local code modifications to comment out these lines, leading to the videoAspect props being correctly applied.

How To Reproduce

  1. Authenticate and initialize the Zoom Video SDK in a React Native application using any standard method.
  2. Set the videoAspect props in the React Native layer.
  3. Notice that the actual videoAspect in the native view does not correspond to the props set in React Native, due to being overridden in RNZoomView.m.

The specific code changes include:

  • In RNZoomView.m, the lines that forcibly set the videoAspect have been commented out:
if (sharing) {
    currentCanvas = [user getShareCanvas];
    // videoAspect = ZoomVideoSDKVideoAspect_Original; // Commented out to respect props
    // ...
} else {
    // videoAspect = ZoomVideoSDKVideoAspect_LetterBox; // Commented out to respect props
    // ...

These modifications ensure that the videoAspect props set in React Native are respected and accurately reflected in the native view. This issue could potentially impact other developers using the SDK, and I wanted to bring it to your attention for consideration in future SDK updates.

Hi @takao.narikawa,

Thank you for reporting this! We’ll fix this in the next release.