startScreencast method
Starts sending each frame using the screencastFrame
event.
format
Image compression format.
quality
Compression quality from range 0..100
.
maxWidth
Maximum screenshot width.
maxHeight
Maximum screenshot height.
everyNthFrame
Send every n-th frame.
Implementation
Future<void> startScreencast(
{@Enum(['jpeg', 'png']) String? format,
int? quality,
int? maxWidth,
int? maxHeight,
int? everyNthFrame}) async {
assert(format == null || const ['jpeg', 'png'].contains(format));
await _client.send('Page.startScreencast', {
if (format != null) 'format': format,
if (quality != null) 'quality': quality,
if (maxWidth != null) 'maxWidth': maxWidth,
if (maxHeight != null) 'maxHeight': maxHeight,
if (everyNthFrame != null) 'everyNthFrame': everyNthFrame,
});
}