Add new SendStreamCaption command

v5-api
Dominik Nakamura 2 years ago
parent ab6a4c1473
commit 97ba550a48
No known key found for this signature in database
GPG Key ID: E4C6A749B2491910

@ -29,4 +29,13 @@ impl<'a> Streaming<'a> {
pub async fn stop_stream(&self) -> Result<()> {
self.client.send_message(RequestType::StopStream).await
}
/// Sends CEA-608 caption text over the stream output.
///
/// - `caption_text`: Caption text.
pub async fn send_stream_caption(&self, caption_text: &str) -> Result<()> {
self.client
.send_message(RequestType::SendStreamCaption { caption_text })
.await
}
}

@ -548,6 +548,11 @@ pub(crate) enum RequestType<'a> {
ToggleStream,
StartStream,
StopStream,
#[serde(rename_all = "camelCase")]
SendStreamCaption {
/// Caption text.
caption_text: &'a str,
},
}
#[derive(Clone, Copy, Serialize)]

Loading…
Cancel
Save