Skip to navigation

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:

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

Set a resolution range

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

final qualityControl = FastPixPlayerQualityControl(
minResolution: FastPixResolution.p480,
maxResolution: FastPixResolution.p1080,
);

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.
final qualityControl = FastPixPlayerQualityControl(
minResolution: FastPixResolution.p480,
maxResolution: FastPixResolution.p1080,
renditionOrder: FastPixRenditionOrder.desc,
);

Apply quality control to playback

Pass the qualityControl object to your data source:

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

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.