We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
SamplesVideo KitSample Code

Sample Code

The Android Studio project provides examples of how to use each API provided by Video Kit, including:

  • API for playing a specified video
  • API for adjusting the playback progress
  • API for changing the playback bitrate
  • API for changing the playback speed
  • API for preloading a video
  • API for enabling or disabling the function of repeatedly playing a video
  • API for switching a video between audio-only and audio+video
  • API for rendering and transcoding an HDR Vivid video
  • API for adjusting the HDR brightness
Expand

Sample Code

Find It on Gitee

Find It on GitHub

Android Studio sample code

Click here

Click here

NOTE

Before using the sample code, read the README file in the sample project carefully. Run the sample code only after you complete the following operations:

  1. Sign in to AppGallery Connect, download the agconnect-services.json file of your app, and copy the file to the app directory of the sample project.

  2. Open the build.gradle file in the sample project, and change the value of applicationId to your app package name.

Search in Samples
Enter a keyword.