For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Player SDKs
    • Introduction
  • Web player
    • Install the FastPix web player
    • Play uploaded videos
    • Handle playback errors
  • Android player
    • Install FastPix Android player
    • Set up the player
    • Play uploaded videos
    • Handle playback errors
  • iOS player
    • Install FastPix iOS player
    • Play uploaded videos
    • Handle playback errors
  • Flutter player
    • Install FastPix Flutter player
    • Play uploaded videos
    • Handle playback errors
      • Play live and on-demand streams
      • Control video playback
      • Control playback resolution
      • Switch videos dynamically
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Public on-demand
  • Public live stream
  • Private on-demand
  • Private live stream
Flutter playerPlayback

Play live and on-demand streams

Was this page helpful?
Previous

Control video playback

Next
Built with

Learn how to configure the FastPix Flutter Player for live and on-demand playback.

The FastPix Flutter Player supports four playback modes, combining stream type (live or on-demand) with access level (public or private).

Note: Set streamType explicitly to StreamType.live or StreamType.onDemand. Leaving it blank can lead to unpredictable behavior.

Public on-demand

Anyone with the link can watch at any time. No token required.

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.onDemand,
4);
5
6final configuration = FastPixPlayerConfiguration();
7controller = FastPixPlayerController();
8controller.initialize(dataSource: dataSource, configuration: configuration);

Public live stream

Video streams in real time and is accessible to anyone with the link:

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.live,
4);

Private on-demand

The video is available anytime but only to authorized users. Access is secured using a valid JWT token:

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.onDemand,
4 token: "jwt-token",
5);

Private live stream

Real-time stream with token-based access control:

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.live,
4 token: "jwt-token",
5);

For more on token-based security, see Secure video playback.