onRequestToken property
Callback when the token has expired.
During audio and video interaction, if the token becomes invalid, the SDK triggers this callback to report that the token has expired. 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 call joinChannel with the new token to rejoin. Multi-channel scenario: Call updateChannelMediaOptionsEx with the new token.
connectionConnection information. See RtcConnection.
Implementation
final void Function(RtcConnection connection)? onRequestToken;