onQualityUpdate method

  1. @override
void onQualityUpdate(
  1. int videoTrackUid,
  2. int qualityUid,
  3. String? name,
  4. int bandwidth,
  5. String? codecs,
  6. int width,
  7. int height,
  8. double frameRate,
  9. double firstFrame,
)
override

Implementation

@override
void onQualityUpdate(int videoTrackUid, int qualityUid, String? name, int bandwidth, String? codecs, int width, int height, double frameRate, double firstFrame) {
  VideoTrack? videoTrack = _videoTracks.firstWhereOrNull((item) => item.uid == videoTrackUid);
  VideoQualityImpl? videoQuality = videoTrack?.qualities.firstWhereOrNull((item) => item.uid == qualityUid) as VideoQualityImpl?;
  if (videoQuality == null) {
    return;
  }

  videoQuality.update(name, bandwidth, codecs, width, height, frameRate, firstFrame);
  videoQuality.dispatchEvent(VideoQualityUpdateEvent());
}