FlutterFlow Docs
Search…
Actions
VideoPlayer
The VideoPlayer widget is used to show video from uploaded assets or the URL link. The VideoPlayer widget can play various video formats that include but are limited to MP4, MOV, WAV, MPEG, JPEG motion photo, and so on.

Adding VideoPlayer to Your Project

Here's how you can add the VideoPlayer widget to your project:
  • Drag the VideoPlayer widget from the Base Elements tab (in the Widget Panel) or add it directly from the widget tree.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Path property and enter the URL for the new video.
By default, every VideoPlayer widget added to the project will show a sample video from the internet.

Changing the Video Type

By default, the widget is set to play a video from the internet. However, you can change this to use the video uploaded directly to your app.
Here's how you can change the Video Type:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Video Type dropdown. Click on Network (inside the dropdown) and select Asset.
  • Now, find the Asset Video property, Click on the Upload Video button, select the video and upload it.
If you want to use the same video multiple times in your app, you don't need to upload the same video multiple times. You can use the uploaded video for other VideoPlayer widgets as well.
Once you upload the video, you can use it throughout your app. You can manage your uploaded videos with the Project Media Asset Manager.
To use the uploaded video:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Video Type dropdown. Click on Network (inside the dropdown) and select Asset.
  • Click on No asset select (inside the dropdown) and choose the video.

Changing the Properties

The Properties Panel can be used to customize the appearance and behavior of your widget.

Add Padding

​Here are the instructions on how to add padding.

Adjust the Alignment

​Here are the instructions on adjusting the alignment.

Changing Video Dimension

To change the height and width of the video:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Width and Height.
  • There are three ways to set the video dimensions:
    • To set to an exact size, select PX and enter the desired values.
    • To set the dimensions as a percent of the screen size, select % and enter the desired value.
    • To make the height or width of the video the screen's height or width, just click on the infinity icon (
      ).
The VideoPlayer widget inside of the container is constrained by the dimensions of the container. If you want to increase the VideoPlayer size, you will also need to increase the container size.

Setting Aspect Ratio

Setting the Aspect Ratio to the VideoPlayer allows you to show video in a specific aspect ratio. The height of the widget is determined by applying the given aspect ratio to the width, expressed as a ratio of width to height. For example, setting the value of 1.7 will show the video in a 16:9 aspect ratio.
To set the aspect ratio:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Aspect Ratio property, if you want to set the aspect ratio of 16:9, enter the value as 1.7 (Simply divide the 16 by 9).
Try changing the width of VideoPlayer and the height will be adjusted as per the aspect ratio.

Controlling the AutoPlay

The AutoPlay property allows you to configure whether the video should start playing as soon as it loads. By default, this property is disabled and you have to click on the play button to start watching the video.
To enable/disable auto-playing a video:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Auto Play property, checkmark/uncheck to enable or disable autoplay.

Enable/Disable Looping of Video

The Loop Video property allows you to configure whether the video should start playing again after it ends. By default, this property is enabled and the video keeps on playing after it ends.
To enable/disable the looping of video:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Loop Video property, checkmark/uncheck to enable or disable loop video behavior.

Show/Hide Video Controls

The Show Controls property allows you to configure whether the player should show the controls over the video such as play-pause button, seek bar, and so on. By default, this property is enabled and all the video controls are visible over the video.
To show/hide video controls:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Show Controls property, checkmark/uncheck to show or hide controls over the video.

Controlling Full Screen

The Allow Full Screen property allows you to configure whether the player should show the full-screen icon in video controls. By default, this property is enabled and users can open video in full-screen mode by tapping the full-screen icon at the bottom right corner of the player.
To enable/disable full-screen icon:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Allow Full Screen property, checkmark/uncheck to show/hide the full-screen mode icon.

Showing Playback Speed Menu

The Include Speed Playback Menu property allows you to configure whether the player should show the playback speed menu. The playback speed menu helps users to increase or decrease the speed of the video. By default, this property is disabled.
To show the playback speed menu:
  • Select the VideoPlayer widget from the widget tree or from the canvas area.
  • Move to the Property Editor (on the right side of your screen) and scroll down to the Video Player section.
  • Find the Include Playback Speed Menu property, checkmark it (click on it).

Adding Action

To perform any action on click of the Video, add an Action in FlutterFlow. You can find the instructions on adding the Action here.

Showing Firestore Data

To show the data retrieved from your Firestore collection and document into the widget, ensure you:

Show/Hide VideoPlayer

Please find the instructions to show/hide the widget here.
Last modified 7mo ago
Copy link
On this page
Adding VideoPlayer to Your Project
Changing the Video Type
Changing the Properties
Add Padding
Adjust the Alignment
Changing Video Dimension
Setting Aspect Ratio
Controlling the AutoPlay
Enable/Disable Looping of Video
Show/Hide Video Controls
Controlling Full Screen
Showing Playback Speed Menu
Adding Action
Showing Firestore Data
Show/Hide VideoPlayer