-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Chime SDK Doesn't work with React Native #1856
Comments
Thanks for creating an issue. In addition to WebSocket, Chime SDK for JavaScript uses WebRTC, MediaDevices, Web Audio, and other browser APIs that may not or partially be supported in React Native, e.g., The WebRTC module for React Native. For React Native use cases, we have a demo application using Chime SDK for iOS and Android. Could you check out the following demo? |
I have checked that out and have no issues with the meeting functionality provided by those SDKs! They work great 😄. This issue came about after implementing the messaging (which is implemented in web sockets - something that react native supports). The patch file I provided was enough for this to be completely fixed. Not an issue with this project, I just need something fixed in the detect-browser package. I made the issue here for when they get back to me with a fix, so I can recommend a dependency upgrade! |
Hi @NS-BOBBY-C, Thanks for your interest in Chime SDK for JavaScript! Please let us know when |
We added null check in majorVersion() in #2688. This is no longer an issue. |
What happened and what did you expect to happen?
React Native supports websockets and can handle it. I expected messaging to work, but I got an error
I ended up tracing it to the detect-browser React Native implementation here:
https://github.com/DamonOehlman/detect-browser/blob/546e6f1348375d8a486f21da07b20717267f6c49/src/index.ts#L59-L65
which is referenced in
https://github.com/aws/amazon-chime-sdk-js/blob/8af993e501fbf0c18b0b567e5e5a20114f08abd2/src/browserbehavior/DefaultBrowserBehavior.ts
The solution is:
I've been able to successfully create a patch which I can use patch-package to run in a post install script for the time being (see attached) and confirmed that this patch did correctly fix the issue and I was successfully able to use the SDK. I'm creating this issue here to track this issue until it is resolved, and will update this as I fix issues in detect-browser.
I had to rename the ".patch" file to ".patch.txt" to upload to GitHub:
detect-browser+5.3.0.patch.txt
Have you reviewed our existing documentation?
Reproduction steps
Try creating a DefaultMessagingSession in React Native
Amazon Chime SDK for JavaScript version
latest
What browsers are you seeing the problem on?
React Native
Browser version
0.65.1
Meeting and Attendee ID Information.
N/A
Browser console logs
N/A - see top section
The text was updated successfully, but these errors were encountered: