aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.6k stars 1.55k forks source link

Newly added Chime SDK Media Pipelines Composition Capabilities not available #4469

Closed iencotech closed 1 year ago

iencotech commented 1 year ago

Describe the bug

On 7/24/2023, Amazon Chime SDK introduced enhancements to the composition capability of media pipelines in Amazon Chime SDK.

However, the newly added properties for the CreateMediaLiveConnectorPipeline command are not available in this library. The typescript types are not updated, and even when using any for the type, an error is thrown in runtime when trying to use the new properties.

More info:

Expected Behavior

Newly added composition capabilities should be available for use in TypeScript and on runtime.

Current Behavior

Error is thrown when using new properties such as HorizatontalLayoutConfiguration:

UnexpectedParameter: Unexpected key 'HorizontalLayoutConfiguration' found in params.Sources[0].ChimeSdkMeetingLiveConnectorConfiguration.CompositedVideo.GridViewConfiguration

Reproduction Steps

    const params: CreateMediaLiveConnectorPipelineRequest = {
      Sources: [
        {
          SourceType: 'ChimeSdkMeeting',
          ChimeSdkMeetingLiveConnectorConfiguration: {
            Arn: `arn:aws:chime::<accountId>:meeting:${meeting.MeetingId}`,
            MuxType: `AudioWithCompositedVideo`,
            CompositedVideo: {
              Layout: 'GridView',
              Resolution: 'FHD',
              GridViewConfiguration: {
                ContentShareLayout: 'Horizontal',
                HorizontalLayoutConfiguration: {
                  TileOrder: 'SpeakerSequence',
                  TilePosition: 'Top',
                  TileCount: 2,
                  TileAspectRatio: '4/3',
                },
              },
            },
          },
        },
      ],
      Sinks: [
        {
          SinkType: 'RTMP',
          RTMPConfiguration: {
            Url: ingestUrl,
            AudioChannels: 'Stereo',
            AudioSampleRate: '48000',
          },
        },
      ],
    };

    const mediaPipeline: MediaPipeline = await pipelineClient.createMediaLiveConnectorPipeline(params).promise();

Possible Solution

No response

Additional Information/Context

SDK version used

"@aws-sdk/client-chime-sdk-media-pipelines": "3.376.0"

Environment details (OS name and version, etc.)

Ubuntu 22.04 LTS

RanVaknin commented 1 year ago

Hi @jienco ,

Thanks for reaching out about this. I believe you saw this discrepancy because it took time from the moment the service team announced the launch and the time it took for our release pipeline to approve all the changes.

https://github.com/aws/aws-sdk-go-v2/blame/main/codegen/sdk-codegen/aws-models/chime-sdk-media-pipelines.json#L2943

I see that the model changed last week to include those new features. You'll have to update your SDK version through npm, and those new types should be available.

Thanks! Ran~

iencotech commented 1 year ago

Thanks for checking @RanVaknin

I updated @aws-sdk/client-chime-sdk-media-pipelines to 3.386.0 but the new grid configurations are not yet available:

image

The following example from this article cannot be implemented in CreateMediaLiveConnectorPipelineRequest:

                GridViewConfiguration: {
                    ContentShareLayout: "Horizontal",
                    HorizontalLayoutConfiguration:{
                        TileOrder: "SpeakerSequence",
                        TilePosition: "Top",
                        TileCount: 4,
                        TileAspectRatio: "4/3"
                    }
                }

See also this reference