apivideo / api.video-reactnative-uploader

The official ReactNative video uploader for api.video

Home Page:https://api.video

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

badge   badge   badge npm ts

api.video React Native video uploader module

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

Project description

This module is an easy way to upload video with delegated token to api.video

Getting started

Installation

npm install @api.video/react-native-video-uploader

or

yarn add @api.video/react-native-video-uploader

Note: if you are on iOS, you will need two extra steps:

  1. Don't forget to install the native dependencies with Cocoapods
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

Code sample

import ApiVideoUploader from '@api.video/react-native-video-uploader';

ApiVideoUploader.uploadWithUploadToken('MY_VIDEO_TOKEN', 'my-video.mp4')
  .then((value: Video) => {
   // Manages success here
  })
  .catch((e: any) => {
    // Manages error here
  });

Example

An example that demonstrates how to use the API is provided in folder example/.

Plugins

api.video-reactnative-uploader is using external native library for upload

Plugin README
swift-video-uploader swift-video-uploader
android-video-uploader android-video-uploader

FAQ

If you have any questions, ask our community. Or use Issues.

About

The official ReactNative video uploader for api.video

https://api.video

License:MIT License


Languages

Language:Kotlin 37.4%Language:TypeScript 28.1%Language:Swift 14.8%Language:Objective-C++ 5.6%Language:Ruby 4.8%Language:Objective-C 3.3%Language:JavaScript 3.0%Language:Java 2.9%Language:C 0.1%