ScreenCaptureParameters
- Flutter
更新时间
屏幕共享的参数配置。
class ScreenCaptureParameters {
const ScreenCaptureParameters(
{this.dimensions,
this.frameRate,
this.bitrate,
this.captureMouseCursor,
this.windowFocus,
this.excludeWindowList,
this.excludeWindowCount,
this.highLightWidth,
this.highLightColor,
this.enableHighLight});
@JsonKey(name: 'dimensions')
final VideoDimensions? dimensions;
@JsonKey(name: 'frameRate')
final int? frameRate;
@JsonKey(name: 'bitrate')
final int? bitrate;
@JsonKey(name: 'captureMouseCursor')
final bool? captureMouseCursor;
@JsonKey(name: 'windowFocus')
final bool? windowFocus;
@JsonKey(name: 'excludeWindowList')
final List<int>? excludeWindowList;
@JsonKey(name: 'excludeWindowCount')
final int? excludeWindowCount;
@JsonKey(name: 'highLightWidth')
final int? highLightWidth;
@JsonKey(name: 'highLightColor')
final int? highLightColor;
@JsonKey(name: 'enableHighLight')
final bool? enableHighLight;
factory ScreenCaptureParameters.fromJson(Map<String, dynamic> json) =>
_$ScreenCaptureParametersFromJson(json);
Map<String, dynamic> toJson() => _$ScreenCaptureParametersToJson(this);
}属性
| 参数名 | 描述 |
|---|---|
dimensions | 注: 在共享文档的场景(screenScenarioDocument)下设置编码分辨率时,选择以下两种方式其中之一。
屏幕共享流的视频编码分辨率。详见 VideoDimensions。默认值为 1920 × 1080,即 2073600 像素。该像素值为计费标准。当共享的屏幕分辨率宽高比与该值设置不一致时,SDK 按如下策略进行编码。假设
|
frameRate | 共享视频的帧率。单位为 fps;默认值为 5,建议不要超过 15。 |
bitrate | 共享视频的码率。单位为 Kbps;默认值为 0,表示 SDK 根据当前共享屏幕的分辨率计算出一个合理的值。 |
captureMouseCursor | 注: 受 macOS 系统限制,在共享屏幕时将该参数设置为 false 无效(共享窗口时无影响)。 是否采集鼠标用于屏幕共享:
|
windowFocus | 注: 由于 macOS 系统限制,设置该成员将窗口前置时,如果当前的应用存在多个窗口,只会将主窗口前置。 调用 startScreenCaptureByWindowId 方法共享窗口时,是否将该窗口前置:
|
excludeWindowList | 待屏蔽窗口的 ID 列表。调用 startScreenCaptureByDisplayId 开启屏幕共享时,你可以通过该参数屏蔽指定的窗口。你可以在调用 updateScreenCaptureParameters 更新屏幕共享的配置参数时,通过该参数动态屏蔽指定的窗口。 |
enableHighLight | 注: 当你在共享窗口或屏幕的部分区域时,如果将该参数设置为 true,SDK 会对整个窗口或屏幕进行描边。 (仅适用于 macOS 和 Windows)是否对共享的窗口或屏幕进行描边:
|
highLightColor | (仅适用于 macOS 和 Windows)
|
highLightWidth | (仅适用于 macOS 和 Windows)描边的宽度 (px)。默认值为 5,取值范围为 (0,50]。 注: 该参数仅在 |
excludeWindowCount | 待屏蔽窗口的数量。 注: 在 Windows 平台上,该参数最大值不超过 24,如果超过该值,则屏蔽窗口功能失效。 |