

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 为 Amazon Chime SDK 创建 VideoFxProcessor 对象
<a name="create-videofxprocessor"></a>

创建`VideoFxProcessor`对象时， AWS 服务器会下载运行时资源，或者浏览器缓存加载资源。如果网络或 CSP 配置阻止访问资产，则 `VideoFx.create` 操作会引发异常。结果 VideoFxProcessor 被配置为无操作处理器，这不会影响视频流。

```
let videoFxProcessor: VideoFxProcessor | undefined = undefined;
try {
  videoFxProcessor = await VideoFxProcessor.create(logger, videoFxConfig);
} catch (error) {
  logger.warn(error.toString());
}
```

`VideoFxProcessor.create` 还会尝试从 `backgroundReplacement.backgroundImageURL` 中加载图像。如果图像加载失败，处理器会抛出异常。处理器还会出于其他原因抛出异常，例如配置无效、浏览器不受支持或硬件性能不足。