onTokenPrivilegeWillExpire property
Callback when the token is about to expire in 30 seconds.
When you receive this callback, you need to generate a new token on your server and update it using one of the following methods: Single-channel scenario: Call renewToken to pass in the new token. Call leaveChannel to leave the current channel, then pass in the new token when calling joinChannel to rejoin the channel. Multi-channel scenario: Call updateChannelMediaOptionsEx to pass in the new token.
tokenThe token that is about to expire.
Implementation
final void Function(RtcConnection connection, String token)?
onTokenPrivilegeWillExpire;