Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call duration setup #84

Open
VimalNovelX opened this issue Dec 30, 2024 · 1 comment
Open

Call duration setup #84

VimalNovelX opened this issue Dec 30, 2024 · 1 comment

Comments

@VimalNovelX
Copy link

VimalNovelX commented Dec 30, 2024

call duration is not working , please help me with this,
ZegoUIKitPrebuiltCallInvitationService().init(
appID: zegoAppId,
appSign: zegoAppSignIn,
userID: userPhone.toString(),
userName: userName.toString(),
plugins: [ZegoUIKitSignalingPlugin()],
requireConfig: (ZegoCallInvitationData data) {
final config = ZegoUIKitPrebuiltCallConfig.oneOnOneVoiceCall();
config.topMenuBarConfig.isVisible = true;
config.durationConfig.isVisible = true;
config.durationConfig.onDurationUpdate = (Duration duration) {
callDuration = duration;
if (duration >= maxCallDuration) {
// Ensure the context is available
if (navigatorKey.currentState != null) {
ZegoUIKitPrebuiltCallController().hangUp(navigatorKey.currentState!.context);
} else {
debugPrint("Navigator key context is null");
}
}
};

@yoer
Copy link
Collaborator

yoer commented Dec 31, 2024

duration >= maxCallDuration
This judgment will be triggered many times. You know, for example, if the duration is set to 10 seconds, then after 10 seconds, every second after that will meet your condition.

You should set duration == maxCallDuration like this document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants