In the version of Human Emulator Studio 7.0.38, several interesting commands appeared that we would like to draw the attention of users to.
These are the start_video_record and stop_video_record commands added to two objects – windows and browser. Commands added to the object – windows – record video from a given area of the screen, commands added to the object – browser record video from a specified area of the browser.
How it works?
When you start recording video, the program performs the specified number of screenshots-frames per second with the specified quality, after which a file is created with the recording in avi format.
Description of the commands.
The start_video_record command accepts the following parameters:
path – full or relative path to the video file.
fps – is the number of frames per second. So with fps = 10, 10 frames per second will be done, and with fps = 30, 30 frames per second or 1 frame in 33 milliseconds. The optimal FPS value will depend on how quickly actions take place in the recorded area. To record normal browsing, fps = 10 will be enough. Default: 10.
quality – JPEG image quality. Maximum quality 100%. Image quality is understood as the amount of useful data that JPEG can save. Default: 70.
x – X coordinate of the upper left corner of the recorded area. Default: -1.
y – Y coordinate of the upper left corner of the recorded area. Default: -1.
width – the width of the recorded area. Default: -1.
height – the height of the recorded area. Default: -1.
With x = -1, y = -1, width = -1, height = -1 – the entire area of the screen or the built-in browser is recorded.
The stop_video_record command does not require any parameters. After calling this command, a record avi file will be created.
An example of use in php.
// 1 echo "1. Start screen recording : "; echo $windows->start_video_record("d://record.avi"); // actions // navigate to aol $browser->navigate("www.aol.com"); sleep(1); // navigate to google $browser->navigate("google.com"); sleep(1); // navigate to msn $browser->navigate("msn.com"); sleep(1); // 2 echo "\n2. Stop recording video : "; echo $windows->stop_video_record(); // open video file $app->shell_execute("","d:\\record.avi","","d:\\",true);