Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tapper

Flutter plugin that captures system/app playback audio on Android using the AudioPlaybackCapture API, introduced in Android 10.

Android only

Features

  • Requests screen-capture consent (MediaProjection) and reuses the token for audio-only capture, so no video is recorded
  • Captures USAGE_MEDIA, USAGE_GAME, and USAGE_UNKNOWN playback streams
  • Runs the capture loop in a foreground service so it survives backgrounding
  • Fixed output format: 48 kHz, 16-bit PCM, stereo

Getting started

Playback capture requires API 29+. The manifest already declares FOREGROUND_SERVICE and FOREGROUND_SERVICE_MEDIA_PROJECTION, so no extra manifest changes are needed — the MediaProjection consent dialog is the actual permission gate the user sees.

DRM-protected playback is excluded from capture by the OS itself, not by anything in this plugin.

Usage

final tapper = Tapper();

final granted = await tapper.requestCapturePermission(); // shows system dialog
if (granted) {
  await tapper.startCapture();
  // ... later
  await tapper.stopCapture();
}

getPlatformVersion() is also exposed and returns the Android release string, handy as a quick check that the method channel is set up correctly.

Captured audio is written as raw PCM to <app external files dir>/capture_raw.pcm while capture is running.

About

Crossplatform Flutter Plugin to capture system audio for starting the udp piepline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages