diff --git a/.lock b/.lock new file mode 100644 index 00000000..e69de29b diff --git a/cli/all.html b/cli/all.html new file mode 100644 index 00000000..c9ad48ad --- /dev/null +++ b/cli/all.html @@ -0,0 +1 @@ +
pub(crate) enum CommandOptions {
+Show 14 variants
Play {
+ index: Option<usize>,
+ },
+ Pause,
+ Stop,
+ Next,
+ Prev,
+ Seek {
+ seconds: i32,
+ },
+ Move {
+ index1: usize,
+ index2: usize,
+ },
+ Remove {
+ index: Option<usize>,
+ },
+ Clear,
+ List,
+ Add {
+ filenames: Vec<String>,
+ },
+ Replace {
+ filenames: Vec<String>,
+ },
+ Prop {
+ properties: Vec<String>,
+ },
+ Interactive,
+}Play media at the specified index in the playlist
+Pause the currently playing media
+Stop the playback and quit MPV
+Skip to the next item in the playlist
+Skip to the previous item in the playlist
+Seek to a specific position in the currently playing media
+Move an item in the playlist from one index to another
+Remove an item from the playlist
+If invoked while playlist has no entries, or if the only entry +is the active video, then this will exit MPV.
+Clear the entire playlist
+List all the items in the playlist
+Add files to the playlist
+Needs at least one file to be passed.
+Replace the current playlist with new files
+Fetch properties of the current playback or playlist
+Enter interactive mode to send commands to MPV IPC
+ArgMatches to self.ArgMatches to self.Command] so it can instantiate Self via
+[FromArgMatches::from_arg_matches_mut] Read moreCommand] so it can instantiate self via
+[FromArgMatches::update_from_arg_matches_mut] Read moreSelf can parse a specific subcommandSubscriber to this type, returning a
+[WithDispatch] wrapper. Read morepub(crate) struct Cli {
+ pub(crate) debug: bool,
+ pub(crate) command: CommandOptions,
+}debug: bool§command: CommandOptionsArgGroup::id][crate::ArgGroup::id] for this set of argumentsCommand] so it can instantiate Self via
+[FromArgMatches::from_arg_matches_mut] Read moreCommand] so it can instantiate self via
+[FromArgMatches::update_from_arg_matches_mut] Read moreArgMatches to self.ArgMatches to self.Subscriber to this type, returning a
+[WithDispatch] wrapper. Read moreMRC -A library for interacting with the MPV media player using its JSON IPC (Inter-Process Communication) protocol.
-This crate provides a set of utilities to communicate with MPV’s IPC socket, enabling you to send commands -and retrieve responses in a structured format.
-set_property, seek, and playlist-nextuse serde_json::json;
-use tokio;
-use mrc::{send_ipc_command, playlist_next, set_property};
-
-#[tokio::main]
-async fn main() {
- let result = playlist_next(None).await;
- match result {
- Ok(response) => println!("Playlist moved to next: {:?}", response),
- Err(err) => eprintln!("Error: {:?}", err),
- }
-
- let property_result = set_property("volume", &json!(50), None).await;
- match property_result {
- Ok(response) => println!("Volume set: {:?}", response),
- Err(err) => eprintln!("Error: {:?}", err),
- }
-}SOCKET_PATHDefault path for the MPV IPC socket: /tmp/mpvsocket
get_property command to retrieve a property value from MPV.loadfile command to load a file into MPV.playlist-clear command to clear the playlist.playlist-move command to move a playlist item from one index to another.playlist-next command to move to the next playlist item.playlist-prev command to move to the previous playlist item.playlist-remove command to remove an item from the playlist.quit command to terminate MPV.seek command to seek the media playback by a given number of seconds.set_property command to MPV to change a property value.as_str method.
T: 'static + ?Sized,