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 Constructor Description AndroidStartScreenRecordingOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
build()
Builds a map, which is ready to be passed to the subordinated Appium API.AndroidStartScreenRecordingOptions
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.static AndroidStartScreenRecordingOptions
startScreenRecordingOptions()
AndroidStartScreenRecordingOptions
withBitRate(int bitRate)
The video bit rate for the video, in megabits per second.AndroidStartScreenRecordingOptions
withTimeLimit(java.time.Duration timeLimit)
The maximum recording time.AndroidStartScreenRecordingOptions
withUploadOptions(ScreenRecordingUploadOptions uploadOptions)
Upload options set for the recorded screen capture.AndroidStartScreenRecordingOptions
withVideoSize(java.lang.String videoSize)
The video size of the generated media file.-
Methods inherited from class io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions
disableForcedRestart, enableForcedRestart
-
-
-
-
Method Detail
-
startScreenRecordingOptions
public static AndroidStartScreenRecordingOptions startScreenRecordingOptions()
-
withBitRate
public AndroidStartScreenRecordingOptions withBitRate(int bitRate)
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:
withUploadOptions
in classBaseScreenRecordingOptions<BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>>
- Parameters:
uploadOptions
- see the documentation onScreenRecordingUploadOptions
for more details.- Returns:
- self instance for chaining.
-
withVideoSize
public AndroidStartScreenRecordingOptions withVideoSize(java.lang.String videoSize)
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
public AndroidStartScreenRecordingOptions 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
public AndroidStartScreenRecordingOptions withTimeLimit(java.time.Duration timeLimit)
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:
withTimeLimit
in classBaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
- Parameters:
timeLimit
- The actual time limit of the recorded video.- Returns:
- self instance for chaining.
-
build
public java.util.Map<java.lang.String,java.lang.Object> build()
Description copied from class:BaseScreenRecordingOptions
Builds a map, which is ready to be passed to the subordinated Appium API.- Overrides:
build
in classBaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
- Returns:
- arguments mapping.
-
-