Package io.appium.java_client.android
Class AndroidStartScreenRecordingOptions
java.lang.Object
io.appium.java_client.screenrecording.BaseScreenRecordingOptions<BaseStartScreenRecordingOptions<T>>
io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
io.appium.java_client.android.AndroidStartScreenRecordingOptions
public class AndroidStartScreenRecordingOptions
extends BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a map, which is ready to be passed to the subordinated Appium API.Makes the recorder to display an additional information on the video overlay, such as a timestamp, that is helpful in videos captured to illustrate bugs.withBitRate(int bitRate) The video bit rate for the video, in megabits per second.withTimeLimit(Duration timeLimit) The maximum recording time.withUploadOptions(ScreenRecordingUploadOptions uploadOptions) Upload options set for the recorded screen capture.withVideoSize(String videoSize) The video size of the generated media file.Methods inherited from class io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions
disableForcedRestart, enableForcedRestart
-
Constructor Details
-
AndroidStartScreenRecordingOptions
public AndroidStartScreenRecordingOptions()
-
-
Method Details
-
startScreenRecordingOptions
-
withBitRate
The video bit rate for the video, in megabits per second. The default value is 4000000 (4 Mb/s) for Android API level below 27 and 20000000 (20 Mb/s) for API level 27 and above. You can increase the bit rate to improve video quality, but doing so results in larger movie files.- Parameters:
bitRate- The actual bit rate (Mb/s).- Returns:
- self instance for chaining.
-
withUploadOptions
public AndroidStartScreenRecordingOptions withUploadOptions(ScreenRecordingUploadOptions uploadOptions) Upload options set for the recorded screen capture.- Overrides:
withUploadOptionsin classBaseScreenRecordingOptions<BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>>- Parameters:
uploadOptions- see the documentation onScreenRecordingUploadOptionsfor more details.- Returns:
- self instance for chaining.
-
withVideoSize
The video size of the generated media file. The format is WIDTHxHEIGHT. The default value is the device's native display resolution (if supported), 1280x720 if not. For best results, use a size supported by your device's Advanced Video Coding (AVC) encoder.- Parameters:
videoSize- The actual video size: WIDTHxHEIGHT.- Returns:
- self instance for chaining.
-
enableBugReport
Makes the recorder to display an additional information on the video overlay, such as a timestamp, that is helpful in videos captured to illustrate bugs. This option is only supported since API level 27 (Android P).- Returns:
- self instance for chaining.
-
withTimeLimit
The maximum recording time. The default and maximum value is 180 seconds (3 minutes). Setting values greater than this or less than zero will cause an exception. The minimum time resolution unit is one second.Since Appium 1.8.2 the time limit can be up to 1800 seconds (30 minutes). Appium will automatically try to merge the 3-minutes chunks recorded by the screenrecord utility, however, this requires FFMPEG utility to be installed and available in PATH on the server machine. If the utility is not present then the most recent screen recording chunk is going to be returned as the result.
- Overrides:
withTimeLimitin classBaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>- Parameters:
timeLimit- The actual time limit of the recorded video.- Returns:
- self instance for chaining.
-
build
Description copied from class:BaseScreenRecordingOptionsBuilds a map, which is ready to be passed to the subordinated Appium API.- Overrides:
buildin classBaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>- Returns:
- arguments mapping.
-