You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i use flutter sound to play url,and to change audiomanager
fun changeToSpeaker(context: Context?, isSpeaker: Boolean) {
if (context != null) {
val audioManager = context.getSystemService("audio") as AudioManager
audioManager.setSpeakerphoneOn(isSpeaker)
if (!isSpeaker) {
audioManager.setMode(0)
} else {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
} else {
audioManager.setMode(AudioManager.MODE_IN_CALL);
}
}
}
}
but the volume of the voice played did not change
The text was updated successfully, but these errors were encountered:
Do you have any problem to run a player or a recorder?
If you are a beginner on Flutter Sound, I suggest that you look to the very simple examples to start.
If you have a specific problem, please explain what is your issue.
i use flutter sound to play url,and to change audiomanager
fun changeToSpeaker(context: Context?, isSpeaker: Boolean) {
if (context != null) {
val audioManager = context.getSystemService("audio") as AudioManager
audioManager.setSpeakerphoneOn(isSpeaker)
if (!isSpeaker) {
audioManager.setMode(0)
} else {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
} else {
audioManager.setMode(AudioManager.MODE_IN_CALL);
}
}
}
}
but the volume of the voice played did not change
The text was updated successfully, but these errors were encountered: