mirror of https://github.com/dnaka91/obws
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
use anyhow::Result;
|
|
use obws::requests::ui::{
|
|
Location, OpenSourceProjector, OpenVideoMixProjector, QtGeometry, QtRect, VideoMixType,
|
|
};
|
|
|
|
use crate::common::{self, TEST_TEXT};
|
|
|
|
#[tokio::test]
|
|
async fn ui() -> Result<()> {
|
|
let client = common::new_client().await?;
|
|
let client = client.ui();
|
|
|
|
let enabled = client.studio_mode_enabled().await?;
|
|
client.set_studio_mode_enabled(!enabled).await?;
|
|
client.set_studio_mode_enabled(enabled).await?;
|
|
|
|
client.list_monitors().await?;
|
|
client
|
|
.open_video_mix_projector(OpenVideoMixProjector {
|
|
r#type: VideoMixType::Preview,
|
|
location: Some(Location::ProjectorGeometry(QtGeometry {
|
|
rect: QtRect {
|
|
left: 50,
|
|
top: 150,
|
|
right: 250,
|
|
bottom: 350,
|
|
},
|
|
..QtGeometry::default()
|
|
})),
|
|
})
|
|
.await?;
|
|
client
|
|
.open_source_projector(OpenSourceProjector {
|
|
source: TEST_TEXT.as_source(),
|
|
location: Some(Location::MonitorIndex(-1)),
|
|
})
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|