directory

Calculate call duration

This doc describes how to calculate the call duration through configuration.

null

To calculate call duration, do the following:

  1. Set the isVisible property of ZegoCallDurationConfig to display the current call timer. (It is displayed by default)

  2. Assuming that the call duration is 5 minutes, the call will automatically end when the time is up (refer to the following code). You will be notified of the end of the call duration through durationConfig.onDurationUpdate. To end the call, you can call the hangUp method of ZegoUIKitPrebuiltCallController.

Copy
Copy