

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 Amazon Chime SDK 選取會議功能
<a name="js-meeting-features"></a>

當您呼叫 [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html) API 時，您可以指定可供加入工作階段的用戶端使用的功能。請注意，某些功能選項會產生額外的帳單。

下列功能適用於 工作階段：
+ `Audio.EchoReduction` – 機器學習回音減少。
+ `Video.MaxResolution` – 網路攝影機影片解析度上限。
+ `Content.MaxResolution` – 內容共用解析度上限。
+ `Attendees.MaxCount` – 出席者人數上限。

**Topics**
+ [使用 Audio.EchoReduction](#audio-echo-reduction)
+ [使用 Video.MaxResolution](#video-max-resolution)
+ [使用 Content.MaxResolution](#js-content-resolution)
+ [使用 Attendees.MaxCount](#js-max-attendees)
+ [在用戶端應用程式中使用會議功能](#meeting-features-client-app)

## 使用 Audio.EchoReduction
<a name="audio-echo-reduction"></a>

使用 `Audio.EchoReduction`協助保持來自使用者喇叭的聲音，從傳播回會議。

回音降低非常適合使用者揚聲器將成為會議音訊主要輸出裝置的情況。例如，當多個使用者從會議室中的相同裝置參加會議，或個別遠端出席者未佩戴耳機時。

回音減少功能可在 JavaScript 和 React 用戶端程式庫中使用。如需詳細資訊，請參閱 [ GitHub 上的 文件](https://aws.github.io/amazon-chime-sdk-js/modules/amazonvoice_focus.html#what-is-echo-reduction)。需支付額外費用，請參閱 [Amazon Chime SDK 定價頁面](https://aws.amazon.com/chime/chime-sdk/pricing/)以取得詳細資訊。

## 使用 Video.MaxResolution
<a name="video-max-resolution"></a>

使用 `Video.MaxResolution` 指定會議的網路攝影機視訊解析度上限。此功能提供下列選項：
+ `None`：不允許攝影機視訊
+ `HD`：高畫質攝影機視訊 (1280x720p)
+ `FHD`：full-high-definition攝影機視訊 (1920x1080)

如果請求 FHD (1080p) 影片，則會建立高畫質 WebRTC 工作階段。如需詳細資訊，請參閱 [Amazon Chime SDK 定價頁面](https://aws.amazon.com/chime/chime-sdk/pricing/)。

如果用戶端嘗試傳送超過指定上限的網路攝影機視訊，服務會拒絕視訊並傳送下列錯誤：

`Disabled video/content send capability, reason: Video resolution is above limit of current meeting feature selection.`

## 使用 Content.MaxResolution
<a name="js-content-resolution"></a>

使用 `Content.MaxResolution` 指定會議的最大內容共用解析度。此功能提供下列選項：
+ `None`：不允許內容共用
+ `FHD`：full-high-definition內容共享 (1920x1080)
+ `UHD`：ultra-high-definition內容共享 (3840x2160)

如果請求 UHD (4K) 內容，則會建立高畫質 WebRTC 工作階段。

如果傳送內容共用的用戶端屬性超過最大解析度，則該解析度會縮減至指定的最大值。您可以將 套用至內容共用軌道`MediaTrackConstraints`來擴展。下列範例示範如何擴展共享軌道。

```
const constraint: MediaTrackConstraints = {
    width: { ideal: videoQualitySettings.videoWidth },
    height: { ideal: videoQualitySettings.videoHeight },
    frameRate: { ideal: videoQualitySettings.videoFrameRate },
  };
  this.context.logger.info(
    `Video track (content = ${isContentAttendee}) with constraint: ${JSON.stringify(
      constraint
    )}, trackSettings: ${JSON.stringify(trackSettings)}`
  );
  try {
    await mediaStreamTrack.applyConstraints(constraint);
  } catch (error) {
    this.context.logger.info(
      `Could not apply constraint for video track (content = ${isContentAttendee})`
    );
  }
```

下表顯示內容共用的預期行為。


| 內容功能 | 內容共用原生解析度 | 擴展 | 內容編碼解析 | 
| --- | --- | --- | --- | 
| FHD | 1280x720 | 否 | 1280x720 | 
| FHD | 1920x1080 | 否 | 1920x1080 | 
| FHD | 3840X2160 | 是 | 1920x1080 | 
| UHD | 1920x1080 | 否 | 1920x1080 | 
| UHD | 3840X2160 | 否 | 3840X2160 | 
| UHD | 4200x2400 | 是 | 3780x2160 | 

## 使用 Attendees.MaxCount
<a name="js-max-attendees"></a>

使用 `Attendee.MaxCount`指定會議允許的出席者人數上限。Attendee.MaxCount 的上限取決於工作階段類型。對於標準工作階段，您最多可以選取 250 名出席者。對於高解析度工作階段，*您必須*選取最多 25 名出席者的值。

如果您請求 FHD (1080p) 影片或 UHD (4K) 內容，您的工作階段將是高畫質工作階段。

出席者容量成本適用於高解析度工作階段。如需詳細資訊，請參閱 [Amazon Chime SDK 定價頁面](https://aws.amazon.com/chime/chime-sdk/pricing/)。

## 在用戶端應用程式中使用會議功能
<a name="meeting-features-client-app"></a>



### 使用指定的功能建立會議
<a name="js-create-meetings-sdk-namespace"></a>

若要建立會議，請呼叫 [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html) API 並指定所需的會議功能。下列範例示範如何指定所有功能。

```
// You must migrate to the Amazon Chime SDK Meetings namespace.
const chime = AWS.ChimeSDKMeetings({ region: "{{eu-central-1}}" });

// Create meeting 
const meetingInfo = await chime.createMeeting({
    ...
    MeetingFeatures: {
      Audio: {
        EchoReduction: '{{AVAILABLE}}' 
      },
      Video: {
        MaxResolution: '{{FHD}}' 
      },
      Content: {
        MaxResolution: '{{UHD}}' 
      },
      Attendee: {
        MaxCount: {{25}} 
      },
    } 
  }).promise();
```

### 在用戶端中使用會議功能
<a name="js-client-level"></a>

建立具有所需功能的會議之後，您可以在建立`MeetingSessionConfiguration`物件`joinInfo`時傳入 。`meetingSession` 建立時使用會議功能來設定網路攝影機影片解析度和位元速率，以及內容共用解析度和位元速率。

```
const configuration = new MeetingSessionConfiguration(this.joinInfo.Meeting, this.joinInfo.Attendee);

this.meetingSession = new DefaultMeetingSession(
    configuration,
    this.meetingLogger,
    this.deviceController,
    new DefaultEventController(configuration, this.meetingLogger, this.eventReporter)
);
```