Skip to main content

Installation

Optional: Create a New App

Follow these steps to create a new mobile app

If you don't have an existing project, you can create a new Expo app using a template

npx create-expo-app@latest my-video-app

As the next step, you have to generate native files with the expo prebuild command:

npx expo prebuild

You can also follow more detailed Expo instructions.

Step 1: Install the Package

Install @fishjam-cloud/react-native-client with your preferred package manager.

npm install @fishjam-cloud/react-native-client

Step 2: Configure App Permissions

Your app needs to have permissions configured in order to use the microphone and camera.

Android

Permissions below are required to stream audio and video with Fishjam on Android.

  • android.permission.CAMERA
  • android.permission.RECORD_AUDIO
  • android.permission.MODIFY_AUDIO_SETTINGS

Add required permissions to the app.json file.

app.json
{
"expo": {
...
"android": {
...
"permissions": [
"android.permission.CAMERA",
"android.permission.RECORD_AUDIO",
"android.permission.MODIFY_AUDIO_SETTINGS"
]
}
}
}

iOS

You don't have to make any changes to run app on iOS. To update default content of permission alert, you can add these settings to app.json:

app.json
{
"expo": {
...
"ios": {
...
"infoPlist": {
"NSCameraUsageDescription": "Allow $(PRODUCT_NAME) to access your camera.",
"NSMicrophoneUsageDescription": "Allow $(PRODUCT_NAME) to access your microphone."
}
},
}
}

Step 3: Request App Permissions

Before using the camera or microphone, ask the user for permissions.

import { useCameraPermissions } from "expo-camera";

const [permission, requestPermission] = useCameraPermissions();

useEffect(() => {
requestPermission();
}, []);