Optimize live streaming

Learn best practices for live video streaming in the FastPix Flutter Player.

When streaming live video, use an HLS data source with streamType: StreamType.live. For the best real-time experience, disable caching so viewers stay as close to the live edge as possible.

Disable caching for live streams

Caching is useful for on-demand playback, but for live events it introduces unnecessary delay. Always set cacheEnabled: false:

1final liveDataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.live,
4 cacheEnabled: false,
5 customDomain: "custom-domain",
6);

Live streaming checklist

  • Set streamType explicitly to StreamType.live.
  • Set cacheEnabled: false to minimize latency.
  • Use a stable network connection for the best viewer experience.
  • If using a custom domain, pass it in the customDomain parameter.
  • For private live streams, include a valid JWT token.