@@ -29,16 +29,18 @@ public class AndroidStartScreenRecordingOptions
29
29
extends BaseStartScreenRecordingOptions <AndroidStartScreenRecordingOptions > {
30
30
private Integer bitRate ;
31
31
private String videoSize ;
32
+ private Boolean isBugReportEnabled ;
32
33
33
34
public static AndroidStartScreenRecordingOptions startScreenRecordingOptions () {
34
35
return new AndroidStartScreenRecordingOptions ();
35
36
}
36
37
37
38
/**
38
39
* The video bit rate for the video, in megabits per second.
39
- * The default value is 4. You can increase the bit rate to improve video quality,
40
+ * The default value is 4000000 (4 Mb/s) for Android API level below 27
41
+ * and 20000000 (20 Mb/s) for API level 27 and above.
42
+ * You can increase the bit rate to improve video quality,
40
43
* but doing so results in larger movie files.
41
- * The value of 5000000 equals to 5Mb/sec.
42
44
*
43
45
* @param bitRate The actual bit rate (Mb/s).
44
46
* @return self instance for chaining.
@@ -62,6 +64,18 @@ public AndroidStartScreenRecordingOptions withVideoSize(String videoSize) {
62
64
return this ;
63
65
}
64
66
67
+ /**
68
+ * Makes the recorder to display an additional information on the video overlay,
69
+ * such as a timestamp, that is helpful in videos captured to illustrate bugs.
70
+ * This option is only supported since API level 27 (Android P).
71
+ *
72
+ * @return self instance for chaining.
73
+ */
74
+ public AndroidStartScreenRecordingOptions enableBugReport () {
75
+ this .isBugReportEnabled = true ;
76
+ return this ;
77
+ }
78
+
65
79
/**
66
80
* The maximum recording time. The default and maximum value is 180 seconds (3 minutes).
67
81
* Setting values greater than this or less than zero will cause an exception. The minimum
@@ -81,6 +95,7 @@ public Map<String, Object> build() {
81
95
builder .putAll (super .build ());
82
96
ofNullable (bitRate ).map (x -> builder .put ("bitRate" , x ));
83
97
ofNullable (videoSize ).map (x -> builder .put ("videoSize" , x ));
98
+ ofNullable (isBugReportEnabled ).map (x -> builder .put ("bugReport" , x ));
84
99
return builder .build ();
85
100
}
86
101
}
0 commit comments