Safe Voice Consent API
To utilize Safe Voice for Vivox in Unity, all users should grant consent to have their voice chat recorded by the Safe Voice service. Two APIs exist in the VivoxService of the Vivox Unity SDK to update and check consent:
VivoxService.Instance.SetSafeVoiceConsentStatus
- Use this request to change or set a user's consent status.
VivoxService.Instance.GetSafeVoiceConsentStatus
- Use this request to check a user's consent status.
Unity Authentication Services must be enabled in the project to use these APIs. UAS must be started before the VivoxService logging in.
The following is an example of using VivoxService.Instance.SetSafeVoiceConsentStatus
:
var consentStatus = await VivoxService.Instance.SetSafeVoiceConsent(true);
Debug.Log("ConsentStatus: " + consentStatus.ToString());
The following is an example of using VivoxService.Instance.GetSafeVoiceConsentStatus
:
var consentStatus = await VivoxService.Instance.GetSafeVoiceConsent();
Debug.Log("ConsentStatus: " + consentStatus.ToString());