pub struct Sources<'a> { /* private fields */ }Expand description
API functions related to sources.
Implementations§
Source§impl Sources<'_>
impl Sources<'_>
Sourcepub async fn active(&self, source: SourceId<'_>) -> Result<SourceActive>
pub async fn active(&self, source: SourceId<'_>) -> Result<SourceActive>
Gets the active and show state of a source.
Sourcepub async fn take_screenshot(
&self,
settings: TakeScreenshot<'_>,
) -> Result<String>
pub async fn take_screenshot( &self, settings: TakeScreenshot<'_>, ) -> Result<String>
Gets a Base64-encoded screenshot of a source.
The TakeScreenshot::width and TakeScreenshot::height parameters are treated as
“scale to inner”, meaning the smallest ratio will be used and the aspect ratio of the
original resolution is kept. If TakeScreenshot::width and TakeScreenshot::height are
not specified, the compressed image will use the full resolution of the source.
Sourcepub async fn save_screenshot(&self, settings: SaveScreenshot<'_>) -> Result<()>
pub async fn save_screenshot(&self, settings: SaveScreenshot<'_>) -> Result<()>
Saves a screenshot of a source to the file system.
The SaveScreenshot::width and SaveScreenshot::height parameters are treated as
“scale to inner”, meaning the smallest ratio will be used and the aspect ratio of the
original resolution is kept. If SaveScreenshot::width and SaveScreenshot::height are
not specified, the compressed image will use the full resolution of the source.