From 3a7f6a0b79c1d50e22db4c18901b3bf234494c1e Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:10:38 +0100 Subject: [PATCH] docs(README.md): update infos for permissions --- README.md | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5fd0f93..71771d8 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,15 @@ - [Getting started](#getting-started) - [Installation](#installation) - [Permissions](#permissions) + - [Android](#android) + - [iOS](#ios) - [Code sample](#code-sample) - [Documentation](#documentation) - [Props \& Methods](#props--methods) - [Example App](#example-app) - [Setup](#setup) - - [Android](#android) - - [iOS](#ios) + - [Android](#android-1) + - [iOS](#ios-1) - [Plugins](#plugins) - [FAQ](#faq) @@ -41,13 +43,10 @@ meta: --> ## 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 @@ -60,33 +59,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 @@ -96,8 +87,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 ```jsx