startScreencast method

Future<void> startScreencast({
  1. @Enum(['jpeg', 'png']) String? format,
  2. int? quality,
  3. int? maxWidth,
  4. int? maxHeight,
  5. int? everyNthFrame,
})

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,
  });
}