|
|
|
@ -9,12 +9,21 @@ pub struct MediaInputs<'a> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<'a> MediaInputs<'a> {
|
|
|
|
|
/// Gets the status of a media input.
|
|
|
|
|
///
|
|
|
|
|
/// - `input_name`: Name of the media input.
|
|
|
|
|
pub async fn get_media_input_status(&self, input_name: &str) -> Result<responses::MediaStatus> {
|
|
|
|
|
self.client
|
|
|
|
|
.send_message(RequestType::GetMediaInputStatus { input_name })
|
|
|
|
|
.await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Sets the cursor position of a media input.
|
|
|
|
|
///
|
|
|
|
|
/// This request does not perform bounds checking of the cursor position.
|
|
|
|
|
///
|
|
|
|
|
/// - `input_name`: Name of the media input.
|
|
|
|
|
/// - `media_cursor`: New cursor position to set.
|
|
|
|
|
pub async fn set_media_input_cursor(
|
|
|
|
|
&self,
|
|
|
|
|
input_name: &str,
|
|
|
|
@ -28,6 +37,12 @@ impl<'a> MediaInputs<'a> {
|
|
|
|
|
.await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Offsets the current cursor position of a media input by the specified value.
|
|
|
|
|
///
|
|
|
|
|
/// This request does not perform bounds checking of the cursor position.
|
|
|
|
|
///
|
|
|
|
|
/// - `input_name`: Name of the media input.
|
|
|
|
|
/// - `media_cursor_offset`: Value to offset the current cursor position by.
|
|
|
|
|
pub async fn offset_media_input_cursor(
|
|
|
|
|
&self,
|
|
|
|
|
input_name: &str,
|
|
|
|
@ -41,6 +56,10 @@ impl<'a> MediaInputs<'a> {
|
|
|
|
|
.await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Triggers an action on a media input.
|
|
|
|
|
///
|
|
|
|
|
/// - `input_name`: Name of the media input.
|
|
|
|
|
/// - `media_action`: Identifier of the media action.
|
|
|
|
|
pub async fn trigger_media_input_action(
|
|
|
|
|
&self,
|
|
|
|
|
input_name: &str,
|
|
|
|
|