> ## Documentation Index
> Fetch the complete documentation index at: https://filekit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Compose Media Player

> Play videos picked with FileKit using Compose Media Player

[Compose Media Player](https://github.com/kdroidFilter/ComposeMediaPlayer) is a third-party video player for Compose Multiplatform. Its player state opens a FileKit `PlatformFile` directly, with no extra module.

## Usage

```kotlin build.gradle.kts theme={null}
implementation("io.github.kdroidfilter:composemediaplayer:<version>")
```

Pick a video with FileKit, then open it in the player:

```kotlin theme={null}
scope.launch {
    val file = FileKit.openFilePicker(type = FileKitType.Video) ?: return@launch
    playerState.openFile(file)
}
```

`playerState` is the library's video player state. See the [Compose Media Player README](https://github.com/kdroidFilter/ComposeMediaPlayer) for the current version, the player composable, and supported platforms.

## Related

* [File picker](https://filekit.mintlify.site/dialogs/file-picker.md) for type filters and multiple selection.
* [Gallery picker](https://filekit.mintlify.site/dialogs/gallery-picker.md) to pick videos from the photo library on Android and iOS.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.