Since AudioSession is shared across the whole app, it may be used by other plugins too, so the right way to manage this is to use a specific plugin for this purpose (like https://pub.dev/packages/audio_session for instance). That way the AudioSession will be managed only by one plugin and it will avoid any conflicts because other plugins want to manage it too.
Since AudioSession is shared across the whole app, it may be used by other plugins too, so the right way to manage this is to use a specific plugin for this purpose (like https://pub.dev/packages/audio_session for instance). That way the AudioSession will be managed only by one plugin and it will avoid any conflicts because other plugins want to manage it too.
You can read more about this on this comment of another similar package https://github.com/Canardoux/flutter_sound/issues/855#issuecomment-1066059995