Skip to content

Commit

Permalink
README to documentation synchro
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo committed Nov 13, 2023
1 parent bb470f7 commit 3ac610f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 15 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/create-documentation-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create documentation PR
on:
# Trigger the workflow on pull requests targeting the main branch
pull_request:
types: [assigned, unassigned, opened, reopened, synchronize, edited, labeled, unlabeled, edited, closed]
branches:
- main

jobs:
create_documentation_pr:
if: github.event.action != 'closed'

runs-on: ubuntu-latest

steps:
- name: Check out current repository code
uses: actions/checkout@v2

- name: Create the documentation pull request
uses: apivideo/api.video-create-readme-file-pull-request-action@main
with:
source-file-path: "README.md"
destination-repository: apivideo/api.video-api-client-generator
destination-path: templates/documentation/sdks/livestream
destination-filename: react-native-livestream-component.md
pat: "${{ secrets.PAT }}"

44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!--<documentation_excluded>-->
[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) &nbsp; [![badge](https://img.shields.io/github/stars/apivideo/api.video-reactnative-live-stream?style=social)](https://github.com/apivideo/api.video-reactnative-live-stream) &nbsp; [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)
![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png)

Expand All @@ -8,7 +9,7 @@

[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

# Table of contents
## Table of contents

- [Table of contents](#table-of-contents)
- [Project description](#project-description)
Expand All @@ -25,16 +26,29 @@
- [Plugins](#plugins)
- [FAQ](#faq)

# Project description
<!--</documentation_excluded>-->
<!--<documentation_only>
---
title: React Native live stream component
meta:
description: The official React Native live stream component for api.video. [api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
---
# React Native Livestream Component
[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
</documentation_only>-->
## Project description

This module is made for broadcasting rtmp live stream from smartphone camera

# Getting started
## 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**
: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
### Installation

```sh
npm install @api.video/react-native-livestream
Expand All @@ -56,7 +70,7 @@ cd ios && pod install

2. 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](docs/install_swift_dependency.md)

## Permissions
### Permissions

To be able to broadcast, you must:

Expand Down Expand Up @@ -84,7 +98,7 @@ Your application must dynamically require android.permission.CAMERA and android.

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
### Code sample

```jsx
import React, { useRef, useState } from 'react';
Expand Down Expand Up @@ -150,9 +164,9 @@ const App = () => {
export default App;
```
# Documentation
## Documentation
## Props & Methods
### Props & Methods
```ts
type LiveStreamProps = {
Expand Down Expand Up @@ -203,11 +217,11 @@ type LiveStreamMethods = {
};
```
# Example App
## Example App
You can try our [example app](https://github.com/apivideo/api.video-reactnative-live-stream/tree/main/example), feel free to test it.
## Setup
### Setup
Be sure to follow the [React Native installation steps](https://reactnative.dev/docs/environment-setup) before anything.
Expand All @@ -218,15 +232,15 @@ Be sure to follow the [React Native installation steps](https://reactnative.dev/
git clone https://github.com/apivideo/api.video-reactnative-live-stream.git livestream_example_app && cd livestream_example_app
```
### Android
#### Android
Install the packages and launch the application
```shell
yarn && yarn example android
```
### iOS
#### iOS
1. Install the packages
Expand All @@ -253,7 +267,7 @@ bundle identifier.
yarn example ios
```
# Plugins
## Plugins
api.video live stream library is using external native library for broadcasting
Expand All @@ -262,7 +276,7 @@ api.video live stream library is using external native library for broadcasting
| StreamPack | [StreamPack] |
| HaishinKit | [HaishinKit] |
# FAQ
## FAQ
If you have any questions, ask us here: https://community.api.video .
Or use [Issues].
Expand Down

0 comments on commit 3ac610f

Please sign in to comment.