onActiveQualityChange method
void
onActiveQualityChange(
- int audioTrackUid,
- int qualityUid
)
override
Implementation
@override
void onActiveQualityChange(int audioTrackUid, int qualityUid) {
AudioTrackImpl? audioTrack = _audioTracks.firstWhereOrNull((item) => item.uid == audioTrackUid) as AudioTrackImpl?;
AudioQuality? audioQuality = audioTrack?.qualities.firstWhereOrNull((item) => item.uid == qualityUid);
if (audioTrack == null || audioQuality == null) {
return;
}
audioTrack.activeQuality = audioQuality;
audioTrack.dispatchEvent(AudioActiveQualityChangedEvent(quality: audioQuality));
}