Class AndroidStartScreenRecordingOptions


public class AndroidStartScreenRecordingOptions extends BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
  • Constructor Details

    • AndroidStartScreenRecordingOptions

      public AndroidStartScreenRecordingOptions()
  • Method Details

    • 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 class BaseScreenRecordingOptions<BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>>
      Parameters:
      uploadOptions - see the documentation on ScreenRecordingUploadOptions for more details.
      Returns:
      self instance for chaining.
    • withVideoSize

      public AndroidStartScreenRecordingOptions withVideoSize(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(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 class BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
      Parameters:
      timeLimit - The actual time limit of the recorded video.
      Returns:
      self instance for chaining.
    • build

      public Map<String,Object> build()
      Description copied from class: BaseScreenRecordingOptions
      Builds a map, which is ready to be passed to the subordinated Appium API.
      Overrides:
      build in class BaseStartScreenRecordingOptions<AndroidStartScreenRecordingOptions>
      Returns:
      arguments mapping.