Network status
Hi Zoom, Could you give me some advice for this?
I follow the network document : https://developers.zoom.us/docs/video-sdk/flutter/quality/
then I receive no event links to network eventListener.addListener(EventType.onUserVideoNetworkStatusChanged,
(data) async {
data = data as Map;
ZoomVideoSdkUser? networkUser =
ZoomVideoSdkUser.fromJson(jsonDecode(data["user"]));
ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf();
if (networkUser.userId != mySelf?.userId) {
// only track status for local user
return;
}
final networkStatus = data["status"];
switch (networkStatus) {
case NetworkStatus.Bad:
showSnackBar(
snackBarType: SnackBarType.error,
title: "Poor network quality".tr,
message: "Move to an area with better connection".tr,
);
break;
case NetworkStatus.Normal:
showSnackBar(
snackBarType: SnackBarType.warning,
title: "Unstable network quality".tr,
message: "Improve your network to prevent disruptions".tr,
);
break;
case NetworkStatus.Good:
showSnackBar(
snackBarType: SnackBarType.success,
title: "Optimal network quality".tr,
message: "Enjoy a seamless consultation experience".tr,
);
break;
case NetworkStatus.None:
showSnackBar(
snackBarType: SnackBarType.success,
title: "No network".tr,
message: "We have to end the call due to no network connection. Please try again later".tr,
);
break;
}
});
Show less

