> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Install FastPix Flutter player

> Learn how to set up your FastPix account and add the FastPix Flutter Player SDK to your project.

Learn how to set up your FastPix account and add the FastPix Flutter Player SDK to your project.

The FastPix Flutter Player SDK lets you add video playback to your Flutter app. It supports both live and on-demand streaming and integrates directly into Flutter workflows. You can find the source code in the [FastPix Flutter Player GitHub repository](https://github.com/FastPix/Flutter-Video-Player).

## Before you begin: set up media in FastPix

Before writing Flutter code, you need a playback ID. This is how FastPix identifies which video to stream.

1. Sign in to the [FastPix Dashboard](https://dashboard.fastpix.com/).
2. Create a media asset using either [Push](/docs/upload-videos/upload-videos-from-device) (you upload to FastPix) or [Pull](/docs/upload-videos/upload-videos-from-a-url) (FastPix fetches from your source URL). You can also use the FastPix API for programmatic asset creation.
3. Go to the **View Media** page and locate the **Playback ID**.

> **Note:** Playback IDs are case-sensitive, and each one maps to a single video stream. If your video is protected, you also need to generate a valid JWT token with appropriate access claims.

## Install the SDK

You have two options:

**Option A: Add from the terminal**

```shell
flutter pub add fastpix_video_player
```

**Option B: Add the dependency directly in `pubspec.yaml`**

```yaml
dependencies:
  fastpix_video_player: 1.0.0
```

Then run:

```shell
flutter pub get
```

> **Note:** If you're behind a proxy or using a CI/CD runner, verify that the SDK is being correctly fetched and cached. Run `flutter pub deps` to confirm installation.

## Import the SDK

Import the SDK into any Dart file where you need video playback. Typically this is your `main.dart` or a feature module:

```dart
import 'package:fastpix_player/fastpix_video_player.dart';
```

## What's next

* [Play uploaded videos](/docs/flutter-player/play-uploaded-videos) to stream your first video.
* [Play live and on-demand streams](/docs/flutter-player/play-live-and-on-demand-streams) to configure stream types.

## Flutter player guides

Explore what you can do with the Flutter player after installing it.

**Getting started**

* [Play uploaded videos](/docs/flutter-player/play-uploaded-videos)
* [Handle playback errors](/docs/flutter-player/handle-playback-errors)

**Playback**

* [Play live and on-demand streams](/docs/flutter-player/play-live-and-on-demand-streams)
* [Control video playback](/docs/flutter-player/control-video-playback)
* [Control playback resolution](/docs/flutter-player/control-playback-resolution)
* [Switch videos dynamically](/docs/flutter-player/switch-videos-dynamically)

**Advanced features**

* [Secure video playback](/docs/flutter-player/secure-video-playback)
* [Use a custom domain](/docs/flutter-player/use-a-custom-domain)
* [Optimize live streaming](/docs/flutter-player/optimize-live-streaming)

**Reference**

* [Parameter reference](/docs/flutter-player/parameter-reference)

**Examples**

* [Complete integration example](/docs/flutter-player/complete-integration-example)