useRoomExp

useRoomExp(params?): Object

Returns the automatic ejection date for the local participant, based on room or token configuration properties eject_after_elapsed, eject_at_room_exp and exp. It also allows to register a countdown using the onCountdown parameter.

Params (optional)

ParameterRequiredTypeDescription
onCountdownFunctionWhen onCountdown is set and the room is configured to eject the local participant at a given time, onCountdown will be called every second with an object parameter with keys hours, minutes and seconds

Return type

An object with the following properties:

NameTypeDescription
ejectDateDate | nullThe date when the local participant will be automatically ejected from the meeting

Sample code