pub trait RemoteVolumeControl: Send + Sync {
// Required methods
fn enable(&self, initial_volume: i32);
fn disable(&self);
}Expand description
Platform hook for attaching/detaching the OS remote-volume control.
On Android, entering remote mode hands the MediaSession a
VolumeProviderCompat so hardware volume buttons and the system slider drive
the remote session; leaving remote mode must hand it back to the local
media stream. Behind a trait so the routing rule (see
PlaybackModeManager::set_mode) is unit-testable off-device — the real
implementation is JNI and only exists on Android.