Skip to main content

Crate tauri_plugin_silent_mode

Crate tauri_plugin_silent_mode 

Source
Expand description

tauri-plugin-silent-mode: tells an app whether the phone is set to be quiet, so its sounds can keep to the choice the player made for the whole phone.

Only Android has a ringer mode an app can read. There the Kotlin side answers state and sends change whenever the mode moves. On iOS the silent switch already mutes an app’s sound when it asks for ambient audio, and a desktop has no such mode, so everywhere else state answers Mode::Normal and change never fires.

Structs§

State
What state answers, in the shape the Kotlin side answers it.

Enums§

Mode
How the phone’s ringer is set.

Functions§

init
Registers the plugin: the Kotlin side on Android, the state stub everywhere else.