// 监听 onNetworkQuality 回调并感知当前网络状态的变化-(void)onNetworkQuality:(TRTCQualityInfo *)localQuality remoteQuality:(NSArray<trtcqualityinfo *="">*)remoteQuality {// Get your local network qualityswitch(localQuality.quality){case TRTCQuality_Unknown:NSLog(@"SDK has not yet sensed the current network quality.");break;case TRTCQuality_Excellent:NSLog(@"The current network is very good.");break;case TRTCQuality_Good:NSLog(@"The current network is good.");break;case TRTCQuality_Poor:NSLog(@"The current network quality barely meets the demand.");break;case TRTCQuality_Bad:NSLog(@"The current network is poor, and there may be significant freezes and call delays.");break;case TRTCQuality_VeryBad:NSLog(@"The current network is very poor, the communication quality cannot be guaranteed");break;case TRTCQuality_Down:NSLog(@"The current network does not meet the minimum requirements.");break;default:break;}// Get the network quality of remote usersfor(TRTCQualityInfo *info in arrayList){NSLog(@"remote user : = %@, quality = %@", info.userId,@(info.quality));}}
// 监听 onNetworkQuality 回调并感知当前网络状态的变化voidonNetworkQuality(liteav::TRTCQualityInfo local_quality,
liteav::TRTCQualityInfo* remote_quality,uint32_t remote_quality_count){// Get your local network qualityswitch(local_quality.quality){case TRTCQuality_Unknown:printf("SDK has not yet sensed the current network quality.");break;case TRTCQuality_Excellent:printf("The current network is very good.");break;case TRTCQuality_Good:printf("The current network is good.");break;case TRTCQuality_Poor:printf("The current network quality barely meets the demand.");break;case TRTCQuality_Bad:printf("The current network is poor, and there may be significant freezes and call delays.");break;case TRTCQuality_Vbad:printf("The current network is very poor, the communication quality cannot be guaranteed");break;case TRTCQuality_Down:printf("The current network does not meet the minimum requirements.");break;default:break;}// Get the network quality of remote usersfor(int i =0; i < remote_quality_count;++i){printf("remote user : = %s, quality = %d", remote_quality[i].userId, remote_quality[i].quality);}}