Sign up for free

api.video Flutter video uploader

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.

Project description

api.video's Flutter uploader uploads videos to api.video using delegated upload token or API Key.

It allows you to upload videos in two ways:

  • standard upload: to send a whole video file in one go
  • progressive upload: to send a video file by chunks, without needing to know the final size of the video file

Getting started

Installation

Run this command:

flutter pub add video_uploader

This will add the following lines to your package's pubspec.yaml file:

dependencies:
  video_uploader: ^1.2.0

Android

Permissions

Permissions android.permission.READ_MEDIA_VIDEO (for API 33+) or android.permission.READ_EXTERNAL_STORAGE (for API < 33) will be requested by this library at runtime.

The uploader comes with a notification to show the progress. So if your application targets Android 33+, you might request android.permission.POST_NOTIFICATIONS permission at runtime.

Notifications

To customize the notification to your own brand, you can change the icon, color or channel name by overwriting the following resources in your own application resources:

  • the icon: R.drawable.ic_upload_notification
  • the color: R.color.upload_notification_color
  • the channel name: R.string.upload_notification_channel_name

Code sample

import 'package:video_uploader/video_uploader.dart';

var video = await ApiVideoUploader.uploadWithUploadToken("UPLOAD_TOKEN", "path/to/my-video.mp4");

Dependencies

This project is using external library

PluginREADME
Swift-video-uploaderSwift-video-uploader
android-video-uploaderandroid-video-uploader

FAQ

If you have any questions, ask us in the community or use Issues.

Was this page helpful?