onVideoUpgraded method

void onVideoUpgraded(
  1. bool withVideo,
  2. bool isUpgradeModeRecvOnly
)

Handle response of the upgrade to video request

Implementation

void onVideoUpgraded(bool withVideo, bool isUpgradeModeRecvOnly) {
  //PjsipConnect mutes camera when upgrade video request received from remote side AND mode set as recvOnly
  if (withVideo && isUpgradeModeRecvOnly && !_isUpgradingToVideo) {
    _isCamMuted = true;
  }

  _hasVideo = withVideo;
  _isUpgradingToVideo = false;
  notifyListeners();
}