This module bundles the AWS SDK v3 clients into a single JavaScript file that can be imported in a <script>
tag, similar to how AWS SDK v2 worked.
- Kinesis Video client
- Kinesis Video Signaling Channels client
- Kinesis Video WebRTC Storage client
Before building, ensure you have Node.js installed.
Run the following command in this directory:
npm install
Generate the bundled JavaScript file by running:
npm run build
This creates the file:
dist/aws-sdk-VERSION-kvswebrtc.js
Note
VERSION
will be replaced with the bundled AWS SDK version. For example: 3.758.0
Once built, include the script in your HTML file:
<script src="dist/aws-sdk-VERSION-kvswebrtc.js"></script>
After that, the AWS
object is globally available, just like AWS SDK v2.
Note
AWS SDK for JS v3 uses different syntax than v2. Refer to the documentation for the syntax and usage.
If you need to update the AWS SDK clients, modify package.json
and run:
npm update
Then, rebuild the bundle:
npm run build
You can now move it to the examples
to use it:
mv ./dist/aws-sdk-*-kvswebrtc.js ../examples
Note
You will also need to modify the <script>
import in examples/index.html
to pull the new file.
- If
npm run build
fails, try deletingnode_modules
andpackage-lock.json
, then reinstall:rm -rf node_modules package-lock.json npm install
- Ensure Webpack is installed by running:
npx webpack -v