diff --git a/sdks/livestream/react-native-livestream-component.md b/sdks/livestream/react-native-livestream-component.md index 478e2146..b966d30c 100644 --- a/sdks/livestream/react-native-livestream-component.md +++ b/sdks/livestream/react-native-livestream-component.md @@ -14,13 +14,10 @@ THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! ## Project description -This module is made for broadcasting rtmp live stream from smartphone camera +This module is made for broadcasting RTMP live stream from smartphone camera ## Getting started -:warning: **The React Native Live Stream SDK is designed for 0.69.1 version of React Native. Using the SDK with >0.69.1 of React Native can cause unexpected behaviour** - - ### Installation ```sh @@ -33,33 +30,25 @@ or yarn add @api.video/react-native-livestream ``` -_Note: if you are on iOS, you will need two extra steps:_ - -1. Don't forget to install the native dependencies with Cocoapods - -```sh -cd ios && pod install -``` - -1. This project contains swift code, and if it's your first dependency with swift code, you need to create an empty swift file in your project (with the bridging header) from XCode. [Find how to do that](https://github.com/apivideo/api.video-reactnative-live-stream/blob/main/docs/install_swift_dependency.md) - ### Permissions -To be able to broadcast, you must: +#### Android + +Permissions `android.permission.RECORD_AUDIO`, `android.permission.CAMERA` and `android.permission.INTERNET` are in the library manifest and will be requested by this library at runtime. You don't have to request them in your application. -1. On Android: ask for internet, camera and microphone permissions: +For the PlayStore, your application might declare this in its `AndroidManifest.xml` ```xml + - - - + + ``` -Your application must dynamically require android.permission.CAMERA and android.permission.RECORD_AUDIO. +#### iOS -2. On iOS: update Info.plist with a usage description for camera and microphone +Update `Info.plist` with a usage description for camera and microphone ```xml NSCameraUsageDescription @@ -69,8 +58,6 @@ Your application must dynamically require android.permission.CAMERA and android. Your own description of the purpose ``` -3. On react-native you must handle the permissions requests before starting your livestream. If permissions are not accepted you will not be able to broadcast. - ### Code sample @@ -78,7 +65,7 @@ Your application must dynamically require android.permission.CAMERA and android. ```jsx import React, { useRef, useState } from 'react'; import { View, TouchableOpacity } from 'react-native'; -import { LiveStreamView } from '@api.video/react-native-livestream'; +import { ApiVideoLiveStreamView } from '@api.video/react-native-livestream'; const App = () => { const ref = useRef(null); @@ -86,14 +73,14 @@ const App = () => { return ( - void; }; -type LiveStreamMethods = { +type ApiVideoLiveStreamMethods = { // Start the stream // streamKey: your live stream RTMP key // url: RTMP server url, default: rtmp://broadcast.api.video/s