ClinicKit Mobile SDK / React Native

Browser Call SDK in React Native

The React Native kit includes the browser call SDK. It is straightforward to use and needs no changes at the native level.

To learn more about the browser SDK, see the Browser Call SDK use case.

The React Native kit supports two ways to embed a browser call.

Pure browser calling

To use pure browser calling from VSee Clinic Kit in your React Native app:

import { BrowserCalling } from 'vsee-clinic-rn';
...

// Then include the component in your screen
<BrowserCalling
    style={StyleSheet.absoluteFill}
    authToken={VSeeClinicKit.loggedInUser.vsee.token}
    userName={VSeeClinicKit.loggedInUser.vsee.id}
    roomName={meeting_id}
    onMessage={(event) => {
      console.log('RECEIVED EVENT: ', event);
      if (event.type === 'readyToClose') {
        // Navigate to the home screen
        navigation.navigate(ScreenKeys.home);
      }
    }}
  />

Required params:

  • authToken: the VSee token you get after login.
  • userName: the VSee username you get after login.
  • roomName: the room the participant will join.

Clinic browser calling

Clinic browser calling opens the clinic's patient video page, which adds clinic logic such as post-visit surveys and an end-of-call thank-you page. To use it from VSee Clinic Kit:

import { VSeeClinicBrowserCalling } from 'vsee-clinic-rn';
...

// Include the component in your screen
<VSeeClinicBrowserCalling
  style={StyleSheet.absoluteFill}
  visit_id={visit_id}
  token={VSeeClinicKit.getUserToken()}
  domain={account?.domain}
  onMessage={(event) => {
    console.log('RECEIVED EVENT: ', event);
    if (event.name === 'visit.ended') {
      // Navigate to the home screen
      navigation.navigate(ScreenKeys.home);
    }
  }}
/>

Required params:

  • visit_id: the visit ID to open.
  • token: the logged-in user's token.
  • domain: the clinic domain, from account.domain.