How to control left and right volume of audio separately(imagine wearing a headphone) while playing a sound in flutter app?

Viewed 342

I am creating an app in flutter and stuck in a problem.

Problem : "How to control left and right volume of audio separately(imagine wearing a headphone) while playing a sound in flutter app?" Please redirect me to some specific helpful resource like how can i control the left and right ear volumes by having 2 separate sliders.

Here is my ui, I want left slider to control the volume of my left channel and same with right.

you can also imagine a mixer for recording audio. Kindly please help.

Thank you.

you can see the ui part here

1 Answers

For that, you will have to use the android MediaPlayer class. It has a method called setVolume which accepts two parameters (one for right volume scalar and other one for left)

Related