Handle playback errors
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:
Check player state for errors
You can also check the player state programmatically to detect errors:
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.