@@ -48,69 +48,50 @@ var client = new MediaCompositionClient(endpoint, tokenCredential);
4848### Creating the media composition
4949
5050``` C# Snippet:CreateMediaComposition
51- var gridLayoutOptions = new GridLayoutOptions (2 , 2 );
52- gridLayoutOptions .InputIds .Add (new List <string > { " jill" , " jack" });
53- gridLayoutOptions .InputIds .Add (new List <string > { " jane" , " jerry" });
54- var layout = new MediaCompositionLayout ()
51+ var layout = new GridLayout (2 , 2 , new List <List <string >>{ new List <string > { " jill" , " jack" }, new List <string > { " jane" , " jerry" } })
5552{
56- Resolution = new (1920 , 1080 ),
57- Grid = gridLayoutOptions
53+ Resolution = new (1920 , 1080 )
5854};
5955
6056var inputs = new Dictionary <string , MediaInput >()
6157{
62- [" jill" ] = new ()
58+ [" jill" ] = new ParticipantInput
59+ (
60+ id : new () { MicrosoftTeamsUser = new (" f3ba9014-6dca-4456-8ec0-fa03cfa2b7b7" ) },
61+ call : " teamsMeeting" )
6362 {
64- Participant = new (
65- id : new () { MicrosoftTeamsUser = new (" f3ba9014-6dca-4456-8ec0-fa03cfa2b7b7" ) },
66- call : " teamsMeeting" )
67- {
68- PlaceholderImageUri = " https://imageendpoint"
69- }
63+ PlaceholderImageUri = " https://imageendpoint"
7064 },
71- [" jack" ] = new ()
65+ [" jack" ] = new ParticipantInput
66+ (
67+ id : new () { MicrosoftTeamsUser = new (" fa4337b5-f13a-41c5-a34f-f2aa46699b61" ) },
68+ call : " teamsMeeting" )
7269 {
73- Participant = new (
74- id : new () { MicrosoftTeamsUser = new (" fa4337b5-f13a-41c5-a34f-f2aa46699b61" ) },
75- call : " teamsMeeting" )
76- {
77- PlaceholderImageUri = " https://imageendpoint"
78- }
70+ PlaceholderImageUri = " https://imageendpoint"
7971 },
80- [" jane" ] = new ()
72+ [" jane" ] = new ParticipantInput
73+ (
74+ id : new () { MicrosoftTeamsUser = new (" 2dd69470-dc25-49cf-b5c3-f562f08bf3b2" ) },
75+ call : " teamsMeeting"
76+ )
8177 {
82- Participant = new (
83- id : new () { MicrosoftTeamsUser = new (" 2dd69470-dc25-49cf-b5c3-f562f08bf3b2" ) },
84- call : " teamsMeeting" )
85- {
86- PlaceholderImageUri = " https://imageendpoint"
87- }
78+ PlaceholderImageUri = " https://imageendpoint"
8879 },
89- [" jerry" ] = new ()
80+ [" jerry" ] = new ParticipantInput
81+ (
82+ id : new () { MicrosoftTeamsUser = new (" 30e29fde-ac1c-448f-bb34-0f3448d5a677" ) },
83+ call : " teamsMeeting" )
9084 {
91- Participant = new (
92- id : new () { MicrosoftTeamsUser = new (" 30e29fde-ac1c-448f-bb34-0f3448d5a677" ) },
93- call : " teamsMeeting" )
94- {
95- PlaceholderImageUri = " https://imageendpoint"
96- }
85+ PlaceholderImageUri = " https://imageendpoint"
9786 },
98- [" teamsMeeting" ] = new ()
99- {
100- TeamsMeeting = new (" https://teamsJoinUrl" )
101- }
87+ [" teamsMeeting" ] = new TeamsMeetingInput (teamsJoinUrl : " https://teamsJoinUrl" )
10288};
10389
10490var outputs = new Dictionary <string , MediaOutput >()
10591{
106- {
107- " acsGroupCall" ,
108- new ()
109- {
110- GroupCall = new (" d12d2277-ffec-4e22-9979-8c0d8c13d193" )
111- }
112- }
92+ [" acsGroupCall" ] = new GroupCallOutput (" d12d2277-ffec-4e22-9979-8c0d8c13d193" )
11393};
94+
11495var response = await mediaCompositionClient .CreateAsync (mediaCompositionId , layout , inputs , outputs );
11596```
11697
@@ -124,15 +105,11 @@ var gridMediaCompositionResponse = await mediaCompositionClient.GetAsync(mediaCo
124105
125106You can update the layout:
126107``` C# Snippet:UpdateLayout
127- var layout = new MediaCompositionLayout ( )
108+ var layout = new AutoGridLayout ( new List < string >() { " teamsMeeting " } )
128109{
129110 Resolution = new (720 , 480 ),
130- Presenter = new (" jill" , " jack" )
131- {
132- SupportPosition = SupportPosition .BottomRight ,
133- SupportAspectRatio = 3 / 2
134- }
135111};
112+
136113var response = await mediaCompositionClient .UpdateLayoutAsync (mediaCompositionId , layout );
137114```
138115
@@ -142,16 +119,16 @@ You can upsert or remove inputs:
142119``` C# Snippet:UpsertInputs
143120var inputsToUpsert = new Dictionary <string , MediaInput >()
144121{
145- [" james" ] = new ()
122+ [" james" ] = new ParticipantInput
123+ (
124+ id : new () { MicrosoftTeamsUser = new (" f3ba9014-6dca-4456-8ec0-fa03cfa2b70p" ) },
125+ call : " teamsMeeting"
126+ )
146127 {
147- Participant = new (
148- id : new () { MicrosoftTeamsUser = new (" f3ba9014-6dca-4456-8ec0-fa03cfa2b70p" ) },
149- call : " teamsMeeting" )
150- {
151- PlaceholderImageUri = " https://imageendpoint"
152- }
128+ PlaceholderImageUri = " https://imageendpoint"
153129 }
154130};
131+
155132var response = await mediaCompositionClient .UpsertInputsAsync (mediaCompositionId , inputsToUpsert );
156133```
157134
@@ -167,14 +144,9 @@ You can also upsert or remove outputs:
167144``` C# Snippet:UpsertOutputs
168145var outputsToUpsert = new Dictionary <string , MediaOutput >()
169146{
170- {
171- " youtube" ,
172- new ()
173- {
174- Rtmp = new (" key" , new (1920 , 1080 ), " rtmp://a.rtmp.youtube.com/live2" )
175- }
176- }
147+ [" youtube" ] = new RtmpOutput (" key" , new (1920 , 1080 ), " rtmp://a.rtmp.youtube.com/live2" )
177148};
149+
178150var response = await mediaCompositionClient .UpsertOutputsAsync (mediaCompositionId , outputsToUpsert );
179151```
180152
0 commit comments