Skip to content

Commit 376fe5a

Browse files
author
awstools
committed
feat(client-ivs-realtime): adds support for multiple new composition layout configuration options (grid, pip)
1 parent bf5a23e commit 376fe5a

File tree

5 files changed

+465
-0
lines changed

5 files changed

+465
-0
lines changed

clients/client-ivs-realtime/src/commands/GetCompositionCommand.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ export interface GetCompositionCommandOutput extends GetCompositionResponse, __M
4848
* // layout: { // LayoutConfiguration
4949
* // grid: { // GridConfiguration
5050
* // featuredParticipantAttribute: "STRING_VALUE",
51+
* // omitStoppedVideo: true || false,
52+
* // videoAspectRatio: "AUTO" || "VIDEO" || "SQUARE" || "PORTRAIT",
53+
* // videoFillMode: "FILL" || "COVER" || "CONTAIN",
54+
* // gridGap: Number("int"),
55+
* // },
56+
* // pip: { // PipConfiguration
57+
* // featuredParticipantAttribute: "STRING_VALUE",
58+
* // omitStoppedVideo: true || false,
59+
* // videoFillMode: "FILL" || "COVER" || "CONTAIN",
60+
* // gridGap: Number("int"),
61+
* // pipParticipantAttribute: "STRING_VALUE",
62+
* // pipBehavior: "STATIC" || "DYNAMIC",
63+
* // pipOffset: Number("int"),
64+
* // pipPosition: "TOP_LEFT" || "TOP_RIGHT" || "BOTTOM_LEFT" || "BOTTOM_RIGHT",
65+
* // pipWidth: Number("int"),
66+
* // pipHeight: Number("int"),
5167
* // },
5268
* // },
5369
* // destinations: [ // DestinationList // required

clients/client-ivs-realtime/src/commands/StartCompositionCommand.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ export interface StartCompositionCommandOutput extends StartCompositionResponse,
6464
* layout: { // LayoutConfiguration
6565
* grid: { // GridConfiguration
6666
* featuredParticipantAttribute: "STRING_VALUE",
67+
* omitStoppedVideo: true || false,
68+
* videoAspectRatio: "AUTO" || "VIDEO" || "SQUARE" || "PORTRAIT",
69+
* videoFillMode: "FILL" || "COVER" || "CONTAIN",
70+
* gridGap: Number("int"),
71+
* },
72+
* pip: { // PipConfiguration
73+
* featuredParticipantAttribute: "STRING_VALUE",
74+
* omitStoppedVideo: true || false,
75+
* videoFillMode: "FILL" || "COVER" || "CONTAIN",
76+
* gridGap: Number("int"),
77+
* pipParticipantAttribute: "STRING_VALUE",
78+
* pipBehavior: "STATIC" || "DYNAMIC",
79+
* pipOffset: Number("int"),
80+
* pipPosition: "TOP_LEFT" || "TOP_RIGHT" || "BOTTOM_LEFT" || "BOTTOM_RIGHT",
81+
* pipWidth: Number("int"),
82+
* pipHeight: Number("int"),
6783
* },
6884
* },
6985
* destinations: [ // DestinationConfigurationList // required
@@ -98,6 +114,22 @@ export interface StartCompositionCommandOutput extends StartCompositionResponse,
98114
* // layout: { // LayoutConfiguration
99115
* // grid: { // GridConfiguration
100116
* // featuredParticipantAttribute: "STRING_VALUE",
117+
* // omitStoppedVideo: true || false,
118+
* // videoAspectRatio: "AUTO" || "VIDEO" || "SQUARE" || "PORTRAIT",
119+
* // videoFillMode: "FILL" || "COVER" || "CONTAIN",
120+
* // gridGap: Number("int"),
121+
* // },
122+
* // pip: { // PipConfiguration
123+
* // featuredParticipantAttribute: "STRING_VALUE",
124+
* // omitStoppedVideo: true || false,
125+
* // videoFillMode: "FILL" || "COVER" || "CONTAIN",
126+
* // gridGap: Number("int"),
127+
* // pipParticipantAttribute: "STRING_VALUE",
128+
* // pipBehavior: "STATIC" || "DYNAMIC",
129+
* // pipOffset: Number("int"),
130+
* // pipPosition: "TOP_LEFT" || "TOP_RIGHT" || "BOTTOM_LEFT" || "BOTTOM_RIGHT",
131+
* // pipWidth: Number("int"),
132+
* // pipHeight: Number("int"),
101133
* // },
102134
* // },
103135
* // destinations: [ // DestinationList // required

clients/client-ivs-realtime/src/models/models_0.ts

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,37 @@ export interface Destination {
897897
detail?: DestinationDetail;
898898
}
899899

900+
/**
901+
* @public
902+
* @enum
903+
*/
904+
export const VideoAspectRatio = {
905+
AUTO: "AUTO",
906+
PORTRAIT: "PORTRAIT",
907+
SQUARE: "SQUARE",
908+
VIDEO: "VIDEO",
909+
} as const;
910+
911+
/**
912+
* @public
913+
*/
914+
export type VideoAspectRatio = (typeof VideoAspectRatio)[keyof typeof VideoAspectRatio];
915+
916+
/**
917+
* @public
918+
* @enum
919+
*/
920+
export const VideoFillMode = {
921+
CONTAIN: "CONTAIN",
922+
COVER: "COVER",
923+
FILL: "FILL",
924+
} as const;
925+
926+
/**
927+
* @public
928+
*/
929+
export type VideoFillMode = (typeof VideoFillMode)[keyof typeof VideoFillMode];
930+
900931
/**
901932
* @public
902933
* <p>Configuration information specific to Grid layout, for server-side composition. See
@@ -911,6 +942,140 @@ export interface GridConfiguration {
911942
* slot.</p>
912943
*/
913944
featuredParticipantAttribute?: string;
945+
946+
/**
947+
* @public
948+
* <p>Determines whether to omit participants with stopped video in the composition. Default: <code>false</code>.</p>
949+
*/
950+
omitStoppedVideo?: boolean;
951+
952+
/**
953+
* @public
954+
* <p>Sets the non-featured participant display mode. Default: <code>VIDEO</code>.</p>
955+
*/
956+
videoAspectRatio?: VideoAspectRatio;
957+
958+
/**
959+
* @public
960+
* <p>Defines how video fits within the participant tile. When not set,
961+
* <code>videoFillMode</code> defaults to <code>COVER</code> fill mode for participants in the grid
962+
* and to <code>CONTAIN</code> fill mode for featured participants.</p>
963+
*/
964+
videoFillMode?: VideoFillMode;
965+
966+
/**
967+
* @public
968+
* <p>Specifies the spacing between participant tiles in pixels. Default: <code>2</code>.</p>
969+
*/
970+
gridGap?: number;
971+
}
972+
973+
/**
974+
* @public
975+
* @enum
976+
*/
977+
export const PipBehavior = {
978+
DYNAMIC: "DYNAMIC",
979+
STATIC: "STATIC",
980+
} as const;
981+
982+
/**
983+
* @public
984+
*/
985+
export type PipBehavior = (typeof PipBehavior)[keyof typeof PipBehavior];
986+
987+
/**
988+
* @public
989+
* @enum
990+
*/
991+
export const PipPosition = {
992+
BOTTOM_LEFT: "BOTTOM_LEFT",
993+
BOTTOM_RIGHT: "BOTTOM_RIGHT",
994+
TOP_LEFT: "TOP_LEFT",
995+
TOP_RIGHT: "TOP_RIGHT",
996+
} as const;
997+
998+
/**
999+
* @public
1000+
*/
1001+
export type PipPosition = (typeof PipPosition)[keyof typeof PipPosition];
1002+
1003+
/**
1004+
* @public
1005+
* <p>Configuration information specific to Picture-in-Picture (PiP) layout,
1006+
* for <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/server-side-composition.html">server-side composition</a>.
1007+
* </p>
1008+
*/
1009+
export interface PipConfiguration {
1010+
/**
1011+
* @public
1012+
* <p>This attribute name identifies the featured slot. A participant with this attribute set
1013+
* to <code>"true"</code> (as a string value) in <a>ParticipantTokenConfiguration</a> is placed in the featured
1014+
* slot.</p>
1015+
*/
1016+
featuredParticipantAttribute?: string;
1017+
1018+
/**
1019+
* @public
1020+
* <p>Determines whether to omit participants with stopped video in the composition. Default: <code>false</code>.</p>
1021+
*/
1022+
omitStoppedVideo?: boolean;
1023+
1024+
/**
1025+
* @public
1026+
* <p>Defines how video fits within the participant tile. Default: <code>COVER</code>.
1027+
* </p>
1028+
*/
1029+
videoFillMode?: VideoFillMode;
1030+
1031+
/**
1032+
* @public
1033+
* <p>Specifies the spacing between participant tiles in pixels. Default: <code>0</code>.</p>
1034+
*/
1035+
gridGap?: number;
1036+
1037+
/**
1038+
* @public
1039+
* <p>Identifies the PiP slot. A participant with this attribute set
1040+
* to <code>"true"</code> (as a string value) in <a>ParticipantTokenConfiguration</a>
1041+
* is placed in the PiP slot.</p>
1042+
*/
1043+
pipParticipantAttribute?: string;
1044+
1045+
/**
1046+
* @public
1047+
* <p>Defines PiP behavior when all participants have left. Default: <code>STATIC</code>.</p>
1048+
*/
1049+
pipBehavior?: PipBehavior;
1050+
1051+
/**
1052+
* @public
1053+
* <p>Sets the PiP window’s offset position in pixels from the closest edges determined by <code>PipPosition</code>.
1054+
* Default: <code>0</code>.</p>
1055+
*/
1056+
pipOffset?: number;
1057+
1058+
/**
1059+
* @public
1060+
* <p>Determines the corner position of the PiP window. Default: <code>BOTTOM_RIGHT</code>.</p>
1061+
*/
1062+
pipPosition?: PipPosition;
1063+
1064+
/**
1065+
* @public
1066+
* <p>Specifies the width of the PiP window in pixels. When this is not set explicitly,
1067+
* <code>pipWidth</code>’s value will be based on the size of the composition and the
1068+
* aspect ratio of the participant’s video.</p>
1069+
*/
1070+
pipWidth?: number;
1071+
1072+
/**
1073+
* @public
1074+
* <p>Specifies the height of the PiP window in pixels. When this is not set explicitly,
1075+
* <code>pipHeight</code>’s value will be based on the size of the composition and the
1076+
* aspect ratio of the participant’s video.</p>
1077+
*/
1078+
pipHeight?: number;
9141079
}
9151080

9161081
/**
@@ -923,6 +1088,12 @@ export interface LayoutConfiguration {
9231088
* <p>Configuration related to grid layout. Default: Grid layout.</p>
9241089
*/
9251090
grid?: GridConfiguration;
1091+
1092+
/**
1093+
* @public
1094+
* <p>Configuration related to PiP layout.</p>
1095+
*/
1096+
pip?: PipConfiguration;
9261097
}
9271098

9281099
/**

clients/client-ivs-realtime/src/protocols/Aws_restJson1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ import {
111111
ParticipantTokenCapability,
112112
ParticipantTokenConfiguration,
113113
PendingVerification,
114+
PipConfiguration,
114115
RecordingConfiguration,
115116
ResourceNotFoundException,
116117
S3DestinationConfiguration,
@@ -1489,6 +1490,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
14891490

14901491
// se_ParticipantTokenConfigurations omitted.
14911492

1493+
// se_PipConfiguration omitted.
1494+
14921495
// se_RecordingConfiguration omitted.
14931496

14941497
// se_S3DestinationConfiguration omitted.
@@ -1733,6 +1736,8 @@ const de_ParticipantTokenList = (output: any, context: __SerdeContext): Particip
17331736
return retVal;
17341737
};
17351738

1739+
// de_PipConfiguration omitted.
1740+
17361741
// de_RecordingConfiguration omitted.
17371742

17381743
// de_S3DestinationConfiguration omitted.

0 commit comments

Comments
 (0)