How to override camera controls in OpenTok React-Native

223 Views Asked by At

I'm using OpenTok React-Native in my Expo React-Native app. I want to be able to control the publisher video, including zoom, white balance and focus. The video will be both streamed live and available as a recording using the Tokbox archiving feature, so the controls need to affect both the live and the recorded video.

How can I control these settings whilst using OpenTok React Native? I see Expo has a camera module which has these features. Is there any way to utilize that module with OTRN?

Here is how I'm using the library

<OTSession
  apiKey={apiKey}
  sessionId={sessionId}
  token={token}
>
  <OTPublisher
    eventHandlers={{
      audioLevel: handleSetRawAudioLevel,
      error: (error) =>
        log.error('Publisher error', { error: error.message }),
      otrnError: (error) =>
        log.error('Publisher OTRN error', { error: error.message }),
      streamCreated: handleTeacherStreamCreated,
      streamDestroyed: handleTeacherStreamDestroyed,
    }}
    properties={{
      publishAudio: !isLoadingClassData,
      publishVideo: !isLoadingClassData,
    }}
    style={styles.teacherFeed}
  />
</OTSession>
0

There are 0 best solutions below