onActiveQualityChange method
void
onActiveQualityChange(
- int videoTrackUid,
- int qualityUid
)
override
Implementation
@override
void onActiveQualityChange(int videoTrackUid, int qualityUid) {
VideoTrackImpl? videoTrack = _videoTracks.firstWhereOrNull((item) => item.uid == videoTrackUid) as VideoTrackImpl?;
VideoQuality? videoQuality = videoTrack?.qualities.firstWhereOrNull((item) => item.uid == qualityUid);
if (videoTrack == null || videoQuality == null) {
return;
}
videoTrack.activeQuality = videoQuality;
videoTrack.dispatchEvent(VideoActiveQualityChangedEvent(quality: videoQuality));
}