website/docs/controls/video/index.md
import TabItem from '@theme/TabItem'; import Tabs from '@theme/Tabs'; import {ClassAll, CodeExample} from '@site/src/components/crocodocs';
Embed a full-featured video player in your Flet app with playlist support, hardware acceleration controls, and subtitle configuration.
It is powered by the media_kit Flutter package.
| Platform | Windows | macOS | Linux | iOS | Android | Web |
|---|---|---|---|---|---|---|
| Supported | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Add the flet-video package to your project dependencies:
requirements.txt or pyproject.toml.
</TabItem>
The below sections show the required configurations for each platform.
You may need to declare and request file-system/storage permissions, depending on your use case:
android.permission.READ_MEDIA_AUDIO (optional): Allows to read audio files from external storage. Android 13 or higher.android.permission.READ_MEDIA_VIDEO (optional): Allows to read video files from external storage. Android 13 or higher.android.permission.READ_EXTERNAL_STORAGE (optional): Allows reading from external storage. Android 12 or lower.android.permission.WRITE_EXTERNAL_STORAGE (optional): Allows writing to external storage. Android 12 or lower.See also:
libmpv libraries must be installed and present on the machine running the app.
On Ubuntu/Debian, this can be done with:
sudo apt install libmpv-dev mpv
If you encounter libmpv.so.1 load errors, run:
sudo apt update
sudo apt install libmpv-dev libmpv2
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so /usr/lib/libmpv.so.1
<CodeExample path={frontMatter.examples + '/example_1/main.py'} language="python" />