Control playback resolution

Learn how to control video quality and rendition order in the FastPix Flutter Player.

The FastPix Flutter Player lets you lock playback to a target resolution, set min/max bounds, and control the order in which renditions are selected.

Set a target resolution

Lock playback to a specific resolution:

1final qualityControl = FastPixPlayerQualityControl(
2 resolution: FastPixResolution.p720,
3);

Set a resolution range

Define minimum and maximum boundaries. The player switches between levels within this range based on network conditions:

1final qualityControl = FastPixPlayerQualityControl(
2 minResolution: FastPixResolution.p480,
3 maxResolution: FastPixResolution.p1080,
4);

Set rendition order

Control which quality level the player selects first:

  • asc (ascending): starts at the lowest resolution and scales up. Better for poor connectivity.
  • desc (descending): starts at the highest resolution and scales down. Better for high-quality first impressions.
1final qualityControl = FastPixPlayerQualityControl(
2 minResolution: FastPixResolution.p480,
3 maxResolution: FastPixResolution.p1080,
4 renditionOrder: FastPixRenditionOrder.desc,
5);

Apply quality control to playback

Pass the qualityControl object to your data source:

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

Supported resolutions

ValueResolution
autoAutomatic
p360360p
p480480p
p720720p
p10801080p
p14401440p
p21602160p (4K)

Note: If renditionOrder is set to asc, the player starts with the lowest resolution and scales up based on network. Use desc to prefer high-quality playback immediately.