Skip to content

amazon-chime-sdk.min.js problems.

0

How do I create amazon-chime-sdk.min.js file? Because I am using webview in my flutter project and I am getting the error TypeError: meetingSession.audioVideo.chooseVideoInputDevice is not a function", source: file:///android_asset/flutter_assets/assets/chime_call.html (186). I tried version 3.28 but it didn't work.

asked a year ago162 views

1 Answer
0

To create an amazon-chime-sdk.min.js file for use in your Flutter WebView, you can use the rollup script provided by AWS. The Amazon Chime SDK client library for JavaScript is written in TypeScript and can be compiled to JavaScript, then bundled into a minified JS file.

Here's how you can create the amazon-chime-sdk.min.js file:

  1. Install the Amazon Chime SDK client library for JavaScript from the NPM registry.
  2. Use the rollup script provided by AWS to bundle the SDK into a minified JS file.
  3. Include this file as a script tag in your HTML.

The error you're encountering ("TypeError: meetingSession.audioVideo.chooseVideoInputDevice is not a function") suggests that you might be using an incompatible version of the SDK or that the method you're trying to call has a different name or implementation in the version you're using.

Make sure you're using a compatible version of the SDK and that your code aligns with the API of that version. The Amazon Chime SDK client library for JavaScript has specific browser compatibility requirements, so ensure your WebView environment meets these requirements.

For Flutter WebView, you'll need to make sure the underlying browser engine supports the necessary WebRTC features required by the Amazon Chime SDK. The SDK supports various browsers including Chrome (version 78 and later), Firefox (version 75 and later), and Safari (version 13 and later) on different operating systems.

If you continue to face issues, you might want to check the Amazon Chime SDK Samples GitHub Repository for examples and the demo applications to understand the correct implementation.
Sources
Understanding web application component architecture for the Amazon Chime SDK - Amazon Chime SDK
Using the Amazon Chime SDK - Amazon Chime SDK
Amazon Chime SDK Resources | Amazon Web Services

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.