Last updated:
0 purchases
playback capture
Flutter Playback Capture #
Easily capture your System's audio
⚠️ Attention: This api is only available for Android
Quick Example #
Import:
import 'package:playback_capture/playback_capture.dart';
copied to clipboard
Implement the following:
final _playbackCapture = PlaybackCapture();
final PlaybackCaptureResult playbackCaptureResult = await _playbackCapture.listenAudio(
audioDataCallback: (Uint8List data) {
// TODO: Do something with your data
},
);
if (playbackCaptureResult != PlaybackCaptureResult.recording) {
if (playbackCaptureResult == PlaybackCaptureResult.missingAudioRecordPermission) {
// You have to ask for permission to use the microphone
// Ask for permission using https://pub.dev/packages/permission_handler
await Permission.microphone.request();
} else if(playbackCaptureResult == PlaybackCaptureResult.recordRequestDenied) {
// TODO: User denied capturing
}
} else {
// Recording successfully started
}
copied to clipboard
Important Notes #
This api is only supported on Android Q (10) and up
Apps that specify android:allowAudioPlaybackCapture="false" in their Manifest.xml will not be captured. See docs
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.