public static class ScreencastStreamConfig.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ScreencastStreamConfig |
build() |
ScreencastStreamConfig.Builder |
densityDpi(int densityDpi)
Sets the density of the virtual display in dpi for screencast.
|
ScreencastStreamConfig.Builder |
mediaProjection(MediaProjection mediaProjection)
Sets mediaProjection to capture screen contents for screencast live stream.
|
ScreencastStreamConfig.Builder |
videoResolution(int width,
int height)
Sets video resolution for live stream, this means the resolution that audience can see.
|
public ScreencastStreamConfig.Builder mediaProjection(@NonNull MediaProjection mediaProjection)
mediaProjection
- A token granting applications the ability to capture screen contents.public ScreencastStreamConfig.Builder videoResolution(int width, int height)
width
- video widthheight
- video heightpublic ScreencastStreamConfig.Builder densityDpi(int densityDpi)
DisplayMetrics.DENSITY_MEDIUM
.densityDpi
- the density of the virtual display in dpi, must be greater than 0.public ScreencastStreamConfig build()