I am building my app on iOS and Android with Agora's Video SDK. For some reason if the user changes his/her role during the live streaming, the volume of the stream changes. Is there a way to prevent that?
I am building my app on iOS and Android with Agora's Video SDK. For some reason if the user changes his/her role during the live streaming, the volume of the stream changes. Is there a way to prevent that?
To ensure a better audio experience in different scenarios, by default, the SDK adjusts the underlying audio settings when the user switches user roles, as follows:
To avoid volume changes when the user switches user roles, ensure that the volume type used by the SDK remains the same before and after the switch. The volume type used by the SDK varies from case to case. See Volume type introduction for details.
For example, if you use AUDIO_SCENARIO_CHATROOM_ENTERTAINMENT on Android and AUDIO_SCENARIO_GAME_STREAMING on iOS, then even if the user role switches and the audio routing changes, the user's volume type does not change, and thus the volume is not affected.