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

The official React Native video uploader for api.video

Usage no npm install needed!

<script type="module">
  import apiVideoReactNativeVideoUploader from 'https://cdn.skypack.dev/@api.video/react-native-video-uploader';
</script>

README

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
iOS-video-uploader [iOS-video-uploader]
android-video-uploader android-video-uploader

FAQ

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