mrc

Function set_property

Source
pub async fn set_property(
    property: &str,
    value: &Value,
    socket_path: Option<&str>,
) -> Result<Option<Value>>
Expand description

Sends the set_property command to MPV to change a property value.

§Arguments

  • property: The name of the property to set.
  • value: The new value to assign to the property.
  • socket_path: An optional custom socket path.

§Returns

A Result containing the response data.

§Errors

Returns an error if the connection to the socket fails or the command execution encounters issues.