fetch Token
fun AgoraVideoViewer.Companion.fetchToken(urlBase: String, channelName: String, userId: Int, completion: TokenCallback)
Requests the token from our backend token service
Parameters
url Base
: base URL specifying where the token server is located
channel Name
: Name of the channel we're requesting for
user Id
: User ID of the user trying to join (0 for any user)
callback
: Callback method for returning either the string token or error