

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

# 在 Amazon Chime SDK 會議中使用配置組態進行合成
<a name="compositing-layouts"></a>

下列主題說明如何使用不同的組態配置。配置只會在有人開始內容共享時生效。展開每個區段以進一步了解。

## ActiveSpeakerOnlyConfiguration
<a name="active-speaker-only"></a>

`ActiveSpeakerOnlyConfiguration` 會顯示內容共用和作用中發言者的影片，這表示說話的人會出現在覆蓋內容共用串流的小型影片圖磚中。

下圖顯示喇叭圖磚的組態和可用位置。

![影像顯示視窗中心的大型影片圖磚，以及左上角的小型圖磚。](http://docs.aws.amazon.com/zh_tw/chime-sdk/latest/dg/images/compositing-active-speaker-4x.png)


下列範例示範如何以程式設計方式實作`ActiveSpeakerOnly`配置。在此情況下，簡報者圖磚會出現在左上角。

```
{
   "CompositedVideo":{
      "Layout":"GridView",
      "Resolution":"FHD",
      "GridViewConfiguration":{
         "ContentShareLayout":"ActiveSpeakerOnly",
         "ActiveSpeakerOnlyConfiguration":{
            "ActiveSpeakerPosition":"TopLeft"
         }
      }
   }
}
```

**ActiveSpeakerOnlyConfiguration**  
*描述* – `ActiveSpeakerOnly`影片圖標的組態設定  
*類型* – ActiveSpeakerOnlyConfiguration 物件  
*必要* – 否

**ActiveSpeakerOnlyConfiguration.ActiveSpeakerPosition**  
*描述* – 作用中發言者視訊圖磚的位置  
*類型* – 字串  
*有效值* – `TopLeft` \| `TopRight` \| `BottomLeft` \| `BottomRight`  
*必要* – 否  
*預設* – `TopRight`

## PresenterOnlyConfiguration
<a name="presenter-only"></a>

`PresenterOnlyConfiguration` 無論誰說話， 只會顯示內容共用和簡報者的影片。下圖顯示 組態。

![四個畫面的影像。每個畫面中間都有一個共用視窗，每個角落都有一個影片圖標。](http://docs.aws.amazon.com/zh_tw/chime-sdk/latest/dg/images/compositing-presenter-only-4x.png)


下列範例顯示如何以程式設計方式實作配置，其中簡報者位於右上角。

```
{
    "CompositedVideo": {
    "Layout": "GridView",
    "Resolution": "FHD",
     "GridViewConfiguration": {
         "ContentShareLayout": "PresenterOnly",
         "PresenterOnlyConfiguration": { 
             "PresenterPosition": "TopRight"
             }
         }           
     }
}
```

**PresenterOnlyConfiguration**  
*描述* – `PresenterOnly`配置的組態設定  
*類型* – `PresenterOnlyConfiguration` 物件  
*必要* – 否

**PresenterOnlyConfiguration.PresenterPosition**  
*描述* – 簡報者影片圖磚的位置  
*類型* – 字串  
*有效值* – `TopLeft` \| `TopRight` \| `BottomLeft` \| `BottomRight`  
*必要* – 否  
*預設* – `TopRight`

## HorizontalLayoutConfiguration
<a name="horizontal-layout"></a>

`HorizontalLayoutConfiguration` 水平顯示內容共用和影片串流。您可以使用 `TilePosition`設定，在內容共用串流上方或下方顯示圖磚。簡報者一律會出現在左側。其他圖磚會以 指定的順序顯示`JoinSequence`。

下圖顯示內容共用串流下方的圖磚。

![此圖顯示下方一行中的大型中央圖磚和 4 個較小的圖磚。](http://docs.aws.amazon.com/zh_tw/chime-sdk/latest/dg/images/compositing-horizontal-bottom.png)


下列範例示範如何以程式設計方式實作水平配置。在此情況下，配置會依 排序圖磚`SpeakerSequence`，並將其置於畫面共用下方。配置最多允許四個圖磚，並套用 16/9 長寬比。

```
{
   "CompositedVideo":{
      "Layout":"GridView",
      "Resolution":"FHD",
      "GridViewConfiguration":{
         "ContentShareLayout":"Horizontal",
         "HorizontalLayoutConfiguration":{
            "TileOrder":"SpeakerSequence",
            "TilePosition":"Bottom",
            "TileCount":4,
            "TileAspectRatio":"16/9"
         }
      }
   }
}
```

**HorizontalLayoutConfiguration**  
*描述* – 水平配置的組態設定  
*類型* – HorizontalLayoutConfiguration 物件  
*必要* – 否

**HorizontalLayoutConfiguration.TilePosition**  
*描述* – 將圖磚放置在內容共用的上方或下方。  
*類型* - 字串  
*有效值* – `Bottom` \| `Top`  
*必要* – 否  
*預設* – 底部

**HorizontalLayoutConfiguration.TileOrder**  
*描述* – 使用者加入或說話時排序圖磚  
*類型* – 字串  
*有效值* – `JoinSequence` \| `SpeakerSequence`  
*必要* – 否  
*預設* – JoinSequence

**HorizontalLayoutConfiguration.TileCount**  
*描述* – 指定畫面共用期間保持可見的圖磚數量  
*類型* – 整數  
*有效值* – 1–10  
*必要* – 否  
*預設* – 4

**HorizontalLayoutConfiguration.TileAspectRatio**  
*描述* – 指定圖磚的長寬比  
*類型* – 整數  
*有效值* – *n***/***n*  
*必要* – 否  
*預設* – 16/9，值會套用至所有圖磚

## VerticalLayoutConfiguration
<a name="vertical-layout"></a>

`VerticalLayoutConfiguration` 會顯示內容共用和四部最近堆疊在右側的影片。簡報者一律會出現在頂端。其他出席者會以 指定的順序顯示`TileOrder`。

![影像顯示在視窗中心的大型影片圖磚，以及堆疊在右側的 4 個較小的圖磚。](http://docs.aws.amazon.com/zh_tw/chime-sdk/latest/dg/images/grid-vertical.png)


下列範例示範如何以程式設計方式實作垂直配置。在此情況下，配置會依 JoinSequence 排序圖磚，並將其放置在畫面共用的右側。配置最多允許四個圖磚，並套用 16/9 長寬比。

```
{
   "CompositedVideo":{
      "Layout": "GridView",
      "Resolution": "FHD",
      "GridViewConfiguration":{
         "ContentShareLayout": "Vertical",
         "VerticalLayoutConfiguration":{
            "TileOrder": "JoinSequence",
            "TilePosition": "Right",
            "TileCount": 4,
            "TileAspectRatio": "16/9"
         }
      }
   }
}
```

**VerticalLayoutConfiguration**  
*描述* – 垂直配置的組態設定  
*類型* – VerticalLayoutConfiguration 物件  
*必要* – 否

**VerticalLayoutConfiguration.TilePosition**  
*描述* – 將圖磚放置在內容共用的右側或左側。  
*類型* – 字串  
*有效值* – `Bottom` \| `Top`  
*必要* – 否  
*預設* – 底部

**VerticalLayoutConfiguration.TileOrder**  
*描述* – 使用者加入或說話時排序圖磚  
*類型* – 字串  
*有效值* – `JoinSequence` \| `SpeakerSequence`  
*必要* – 否  
*預設* – JoinSequence

**VerticalLayoutConfiguration.TileCount**  
*描述* – 指定圖磚數量  
*類型* – 整數  
*有效值* – 1–10  
*必要* – 否  
*預設* – 4

**VerticalLayoutConfiguration.TileAspectRatio**  
*描述* – 指定圖磚的長寬比  
*類型* – 整數  
*有效值* – *n***/***n*  
*必要* – 否  
*預設* – 9/16，值會套用至所有圖磚