New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pause on interruption #6
Conversation
say when a call is received. ANDROID ONLY. Based off: https://gist.github.com/kuccello/5816882
Thanks, @cosmok ! Nice addition! That's indeed a very useful feature to the lib. Some comments:
private static final String CMD_STOP = "pause";
I'd add an optional parameter to the constructor (on Dart): AudioPlayer({ bool runOnBackground: false }) { /* ... */ } Save that as a field and pass it in the play method on the channel: Future<int> play(String url, {bool isLocal: false, double volume: 1.0}) =>
_channel.invokeMethod('play', {"playerId": playerId, "url": url, "isLocal": isLocal, 'volume': volume, 'runOnBackground': runOnBackground }); And then receive this on the Android end and use it appropriately. Or something along those lines.
Thanks again for your contribution! |
Closing due to lack of response, please feel free to re-open or contact me anytime :)) |
pause say when a call is received.
only on Android.
based off: https://gist.github.com/kuccello/5816882