Closed ElielCohen closed 3 years ago
The Chime SDK demo applications have an AWS Lambda function for creating a meeting using AWS SDK. After creating a meeting, this Lambda function returns a custom response to the client application.
Chime SDK for JavaScript (this repository), iOS, and Android use the same Lambda functions from the JS serverless demo, while the Chime React component demo maintains its own Lambda functions.
⠀
The JS serverless demo (used by this repository, iOS, and Android demo)
The JS serverless demo uses the External
parameters to store the following information.
Chime API (AWS SDK) | Parameter | Usage |
---|---|---|
CreateMeeting | ExternalMeetingId | Includes the meeting title |
CreateAttendee | ExternalUserId | Includes the attendee's name |
⠀
Chime React component demo
The Chime React component demo does not use the External
parameters. Instead, it uses Amazon DynamoDB to store meeting and attendee's information. For example, the attendee Lambda function saves the attendee data to DynamoDB.
These demo applications show different use cases. In production, we recommend mapping your application's session ID and identity to the ExternalMeetingId
and ExternalUserId
, respectively.
If you use the Chime React component demo and the Chime SDK for iOS demo, you can choose one of the demos as a starting point for your server application. In case you use the Chime React demo, updating the JoinMeetingResponse.swift is the right approach. Or you can update the Chime React demo to use the JS serverless demo's response with the External
parameters.
Hey @ElielCohen, feel free to re-open this if you still have questions.
Describe the bug The API exposed by Chime SDK Javascript Sample app, and the one exposed by the Chime SDK React Component Sample App differs. This cause an issue with the native SDK implementation, that is built to support only the pure JavaScript API implementation.
To Reproduce Use API served on pure javascript sample meeting app, and on React JS component meeting app. Using Native iOS SDK with API from React JS component will fail, unless you modify the structure expected in JoinMeetingResponse.swift.
Expected behavior Both API should serve the same Response structure.
Structure comparaison On JS :
You have the following structure :
{ joinInfo: { meeting: { meeting: { [....] (here the externalUserId contains the meeting title) }, }, attendee: { attendee: { [....] }, } }
On ReactJs :
You have the following structure :
{ joinInfo: { title: string (contains the meeting title, that was previously in meeting.meeting.externalUserId). meeting: { [....] (here the externalUserId DOES NOT contain the meeting title, but is set to null) }, attendee: { [....] } }
Additional context In order to support the later, I had to change the file JoinMeetingResponse.swift, so that the structure we use is compatible with the different API response. Without that change, an iOS native application using the Chime SDK won't be able to connect to the API endpoint served by the React Component JS application. Of course this is not a long term solution, and I believe we should align both API to be the same.
Thanks,
Eliel Cohen WebRTC Technological Lead TytoCare
Ps : Have opened defect on amazon-chime-sdk-ios repo as well here : aws/amazon-chime-sdk-ios#264