setSpatialAudioParams abstract method
Enables or disables spatial audio for the media player.
After successfully setting the spatial audio parameters of the media player, the SDK enables spatial audio for the media player, allowing the local user to perceive spatial sound from media resources. To disable spatial audio for the media player, you need to set the params parameter to null.
paramsSpatial audio parameters for the media player. See SpatialAudioParams.
Returns When the method call succeeds, there is no return value; when it fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setSpatialAudioParams(SpatialAudioParams params);