The VIDEO widget displays a video from a url with associated controls.
-The VIDEO once loaded will remain in memory until the application reloads.
| Name |
Type |
Default |
Description |
Req |
| url |
string |
null |
The url the video will be retrieved from. |
|
| controls |
bool |
true |
If video control buttons are displayed |
|
| loop |
bool |
false |
If the video loops once playing. |
|
| volume |
double |
1.0 |
Sound volume. Can be 0.0 -> 1.0 |
|
| speed |
double |
1.0 |
Playback speed |
|
| autoplay |
bool |
false |
Start playing video immediately after load |
|
| Name |
Values |
Default |
Description |
| playing |
bool |
false |
If video is playing |
| Name |
Description |
| oninitialized |
A list of ; seperated event(s) to execute when the video player is initialized |
| Name |
Description |
| play() |
Starts the video player from the beginning |
| stop() |
Stops the video player (if playing) and resets to the start position |
| pause() |
Stops the video player |
| resume() |
Starts the video player from its current position |
| rewind() |
Starts the video player from the beginning |
| seek(int position) |
Starts the video player from the specified position |
<FML title="VIDEO (example1)" linkable="true">
<BOX center="true">
<BOX width="50%" height="50%">
<VIDEO id="video1" url="{url}" controls="{show}" loop="true" oninitialized="video1.play();"/>
</BOX>
<SELECT id="show">
<OPTION label="SHOW CONTROLS" value="1"/>
<OPTION label="HIDE CONTROLS" value="0"/>
</SELECT>
<SELECT id="url" value="https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4">
<OPTION label="Bee" value="https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"/>
<OPTION label="Butterfly" value="https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4"/>
</SELECT>
</BOX>
</FML>
See it in Action
Other Widgets You May Find Useful: