Trait Controller
Source pub trait Controller {
// Required method
fn is_info_some(&self) -> bool;
// Provided methods
fn toggle(&self) -> bool { ... }
fn play(&self) -> bool { ... }
fn pause(&self) -> bool { ... }
fn next(&self) -> bool { ... }
fn previous(&self) -> bool { ... }
}
Toggles between play and pause states.
§Returns
true if the command was successfully sent.
false if the command failed.
§Example
use media_remote::prelude::*;
let now_playing = NowPlaying::new();
now_playing.toggle();
Play the currently playing media.
§Returns
true if the command was successfully sent.
false if the operation failed.
§Example
use media_remote::prelude::*;
let now_playing = NowPlaying::new();
now_playing.play();
Pauses the currently playing media.
§Returns
true if the command was successfully sent.
false if the command failed.
§Example
use media_remote::prelude::*;
let now_playing = NowPlaying::new();
now_playing.pause();
Skips to the next track in the playback queue.
§Returns
true if the command was successfully sent.
false if the command failed.
§Example
use media_remote::prelude::*;
let now_playing = NowPlaying::new();
now_playing.next();
Returns to the previous track in the playback queue.
§Returns
true if the command was successfully sent.
false if the command failed.
§Example
use media_remote::prelude::*;
let now_playing = NowPlaying::new();
now_playing.previous();