pub struct Video { /* private fields */ }Expand description
Video recording controller for a page.
Videos are recorded using CDP’s screencast feature which captures compressed frames from the browser. These frames are then assembled into a video file.
§Example
ⓘ
// Recording is usually started via context options
let context = browser.new_context()
.record_video(VideoOptions::new("./videos"))
.build()
.await?;
let page = context.new_page().await?;
page.goto("https://example.com").goto().await?;
// Get the video path after recording
if let Some(video) = page.video() {
let path = video.path().await?;
println!("Video saved to: {}", path.display());
// Or save to a specific location
video.save_as("my-test.webm").await?;
}Implementations§
Source§impl Video
impl Video
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Video
impl !RefUnwindSafe for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl !UnwindSafe for Video
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more