Safe Voice Consent API
Learn to implement the Safe Voice Consent Application Programming Interface.
読み終わるまでの所要時間 1 分最終更新 7ヶ月前
To utilize Safe Voice with Vivox in Unreal, all users must grant consent to have their voice chat recorded by the Safe Voice service. Two APIs exist in the ILoginSession of the Vivox Unreal SDK to allow for consent to be updated and checked:
ILoginSession::BeginSetSafeVoiceConsent- Use this request to change or set a user's consent status.
ILoginSession::BeginGetSafeVoiceConsent- Use this request to check a user's consent status.
Calling these APIs requires additional information from the Unity Dashboard:
- The Unity Project ID
- Unity Environment ID
- The Authentication Token of an actively authenticated login to the Unity Authentication Service.
It’s recommended to use the Unity Gaming Services for Unreal Engine module, which can be found in the Unreal Engine Marketplace, to access UAS functionality.
The following code sample is an example of using :
ILoginSession::BeginSetSafeVoiceConsentILoginSession::FOnBeginSetSafeVoiceConsentCompletedDelegate OnBeginSetSafeVoiceConsentCompletedCallback;OnBeginSetSafeVoiceConsentCompletedCallback.BindLambda([this](VivoxCoreError status, bool consentStatus){ //React to the consentStatus that was set here});ILoginSession& loginSession = GetClient().GetLoginSession(m_account);loginSession.BeginSetSafeVoiceConsentStatus(consentToSet, unityEnvironmentId, unityProjectId, UASToken, OnBeginSetSafeVoiceConsentCompletedCallback);
The following code sample is an example of using :
ILoginSession::BeginGetSafeVoiceConsentILoginSession::FOnBeginGetSafeVoiceConsentCompletedDelegate OnBeginGetSafeVoiceConsentCompletedCallback;OnBeginGetSafeVoiceConsentCompletedCallback.BindLambda([this](VivoxCoreError status, bool consentStatus){ //React to the consentStatus that was set here});ILoginSession& loginSession = GetClient().GetLoginSession(m_account);loginSession.BeginGetSafeVoiceConsentStatus(unityEnvironmentId, unityProjectId, UASToken, OnBeginGetSafeVoiceConsentCompletedCallback);