pub async fn send_ipc_command(
command: &str,
args: &[Value],
socket_path: Option<&str>,
) -> Result<Option<Value>>
Expand description
Sends a generic IPC command to the specified socket and returns the parsed response data.
§Arguments
command
: The name of the command to send to MPV.args
: A slice ofValue
arguments to include in the command.socket_path
: An optional custom path to the MPV IPC socket. IfNone
, the default path is used.
§Returns
A Result
containing an Option<Value>
with the parsed response data if successful.
§Errors
Returns an error if the connection to the socket fails or if the response cannot be parsed.