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
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Define a custom error widget
  • Check player state for errors
  • Common error scenarios
Flutter player

Handle playback errors

Was this page helpful?
Previous

Play live and on-demand streams

Next
Built with

Learn how to display custom error UI when playback fails in the FastPix Flutter Player.

The FastPix Flutter Player lets you define an errorWidgetBuilder to show meaningful messages and visuals when errors occur during playback.

Define a custom error widget

Pass an errorWidgetBuilder to the FastPixPlayer widget. The builder receives the error message as a string and returns a widget to display:

1FastPixPlayer(
2 controller: controller,
3 errorWidgetBuilder: (error) {
4 return Container(
5 color: Colors.black,
6 child: Center(
7 child: Column(
8 mainAxisAlignment: MainAxisAlignment.center,
9 children: [
10 Icon(Icons.error, color: Colors.red, size: 48),
11 SizedBox(height: 16),
12 Text(
13 'Playback Error',
14 style: TextStyle(color: Colors.white, fontSize: 18),
15 ),
16 SizedBox(height: 8),
17 Text(
18 error,
19 style: TextStyle(color: Colors.white70, fontSize: 14),
20 textAlign: TextAlign.center,
21 ),
22 ],
23 ),
24 ),
25 );
26 },
27);

Check player state for errors

You can also check the player state programmatically to detect errors:

1if (controller.currentState == FastPixPlayerState.error) {
2 // Handle error state
3}

Common error scenarios

  • Invalid playback ID: The SDK can’t resolve the stream URL. Verify that the ID is correct and case-sensitive.
  • Expired or invalid token: Secure streams reject the request if the JWT token has expired or is malformed.
  • Network issues: Unstable connections cause buffering or playback failures.
  • Unsupported format: The stream uses a format not supported by the device.