No-code · 4 min read

api.video player SDK

Enhance viewer experience in your mobile apps with api.video's player SDKs

Learn how to integrate videos that you host on api.video, into your mobile application within a few minutes.

Thibault Beyou

November 17, 2023

Building a mobile application with video functions? Let’s dive into why api.video is the right choice for this task.

 

api.video encodes your videos, hosts them securely, and enables you to stream on any device or platform for you. You only need to build your mobile application, with your own branding.

 

We value developer experience and the time spent on developing your mobile application, so we provide you with the tools we’d also choose to integrate video in a mobile application. We’ve developed several SDKs for you to use in order to take control of the video player in your mobile app.

 

Check out these plaftorms:

 

With these player SDKs, you can integrate videos that you host on api.video into your mobile application in just a few minutes.

 

The api.video mobile player SDKs support both VOD and live streaming, private videos, and player notifications. They also handle the dirty work for you:

 

  • take the video ID as input
  • generate analytics events for api.video analytics
  • play back HLS using the best quality that fits actual network conditions
  • fall back to MP4 when there is an issue with HLS

 

Every api.video player SDK comes with a sample application. Check out the documentation and look for the example directory in each SDK’s repository.

 

The api.video players are open source. Feel free to fork and modify them as you want! We are happy to review your pull requests!

Usage

To use api.video players, you need the video ID of video you want to serve. You can retrieve a video ID via the API or from the dashboard.

 

In a typical use case, you should follow this workflow:

 

  1. Add the player package to your project
  2. Create a VideoOptions instance with the video ID of the video you want to serve
  3. Create a player controller and pass it the VideoOptions instance
  4. Create the player view and pass the player controller to the player view.

 

Check out this example for Flutter:

 

Run this in your command line:

bash

Use these in your code:

dart

Check out the Flutter player SDK documentation for a detailed explanation.

Quickstarts

To get you started, we created quickstart articles that can help you integrate the api.video player SDK in just a couple of minutes:

 

  • Flutter:

api.video player for Flutter: playback videos on your apps

 

  • Android:

How to add an api.video player to your Android application

 

  • Swift (iOS):

How to add an api.video Swift player to your iOS application

Customization

Customizing the look & feel of the player is important to maintain your own branding in your application. The api.video player SDKs enable you to customize the UI of the player. You have the possibility to configure the color of the progress bar, the color of the play button, and many more items.

 

If you think a customization option is missing, let us know in the Issues section of the player SDK’s GitHub repository.

Using custom players

Even though we recommend using the api.video player SDKs when working with api.video’s solutions, you can use other players in your application.

 

To support your decision even if you go with another player solution, we provide extensions for your mobile player to read and serve videos hosted with api.video through the video IDs.

  • Android:

Switch your existing Swift player to api.video

  • iOS:

Switch your existing Swift player to api.video

 

To enable you to collect usage data even from the custom player of your choice, we created analytics libraries for Android and iOS that you can integrate into your application.

 

 

We can recommend these players in case you decide not to use the api.video player SDKs:

 

  • Flutter: chewie and video_player
  • Android: ExoPlayer
  • iOS: AVPlayer

 

Need help, or have questions? Join the api.video community and start a discussion. Or simply create a sandbox account on api.video and check out the features for yourself.

Try out more than 80 features for free

Access all the features for as long as you need.
No commitment or credit card required

Video API, simplified

Fully customizable API to manage everything video. From encoding to delivery, in minutes.

Built for Speed

The fastest video encoding platform. Serve your users globally with 140+ points of presence. 

Let end-users upload videos

Finally, an API that allows your end-users to upload videos and start live streams in a few clicks.

Affordable

Volume discounts and usage-based pricing to ensure you don’t exceed your budget.