Skip to content

Commit 8a12dd2

Browse files
sirknightjdependabot[bot]stefankiesz
authored
Release 2.4.0 (#469)
* Auto-merge dependabot & retarget to develop (#451) * Bump eslint from 9.18.0 to 9.24.0 (#450) Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.24.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v9.18.0...v9.24.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.24.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @types/node from 22.10.6 to 22.14.0 (#449) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.6 to 22.14.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-plugin-prettier from 5.2.1 to 5.2.6 (#448) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.1 to 5.2.6. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v5.2.1...v5.2.6) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @typescript-eslint/parser from 8.20.0 to 8.29.0 (#445) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.20.0 to 8.29.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @typescript-eslint/eslint-plugin from 8.20.0 to 8.29.0 (#444) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.20.0 to 8.29.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump undici from 6.21.0 to 6.21.1 (#401) Bumps [undici](https://github.com/nodejs/undici) from 6.21.0 to 6.21.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v6.21.0...v6.21.1) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump image-size from 1.2.0 to 1.2.1 (#447) Bumps [image-size](https://github.com/image-size/image-size) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/image-size/image-size/releases) - [Commits](image-size/image-size@v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: image-size dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-config-prettier from 10.0.1 to 10.1.1 (#452) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.0.1 to 10.1.1. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](prettier/eslint-config-prettier@v10.0.1...v10.1.1) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-version: 10.1.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump fork-ts-checker-webpack-plugin from 9.0.2 to 9.1.0 (#453) Bumps [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) from 9.0.2 to 9.1.0. - [Release notes](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases) - [Changelog](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](TypeStrong/fork-ts-checker-webpack-plugin@v9.0.2...v9.1.0) --- updated-dependencies: - dependency-name: fork-ts-checker-webpack-plugin dependency-version: 9.1.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump webpack from 5.97.1 to 5.99.0 (#454) Bumps [webpack](https://github.com/webpack/webpack) from 5.97.1 to 5.99.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.97.1...v5.99.0) --- updated-dependencies: - dependency-name: webpack dependency-version: 5.99.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ws from 8.18.0 to 8.18.1 (#455) Bumps [ws](https://github.com/websockets/ws) from 8.18.0 to 8.18.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@8.18.0...8.18.1) --- updated-dependencies: - dependency-name: ws dependency-version: 8.18.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump typescript from 5.7.3 to 5.8.3 (#456) Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.3 to 5.8.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.8.3 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump prettier from 3.4.2 to 3.5.3 (#458) Bumps [prettier](https://github.com/prettier/prettier) from 3.4.2 to 3.5.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.4.2...3.5.3) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.5.3 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump webpack-dev-server from 5.2.0 to 5.2.1 (#459) Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.0 to 5.2.1. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md) - [Commits](webpack/webpack-dev-server@v5.2.0...v5.2.1) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-version: 5.2.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ts-jest from 29.2.5 to 29.3.1 (#460) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.5 to 29.3.1. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v29.2.5...v29.3.1) --- updated-dependencies: - dependency-name: ts-jest dependency-version: 29.3.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Migrate the sample page to v3 (#426) * Migrate the test page to v3 * Debug build, use production build on github pages * Address comments * Add a link to the aws-sdk-build in the main readme * Bump webpack from 5.99.0 to 5.99.4 (#464) Bumps [webpack](https://github.com/webpack/webpack) from 5.99.0 to 5.99.4. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.99.0...v5.99.4) --- updated-dependencies: - dependency-name: webpack dependency-version: 5.99.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump webpack from 5.99.4 to 5.99.5 (#466) Bumps [webpack](https://github.com/webpack/webpack) from 5.99.4 to 5.99.5. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.99.4...v5.99.5) --- updated-dependencies: - dependency-name: webpack dependency-version: 5.99.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint-config-prettier from 10.1.1 to 10.1.2 (#467) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.1.1 to 10.1.2. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](prettier/eslint-config-prettier@v10.1.1...v10.1.2) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-version: 10.1.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Samples: Signaling reconnect and refresh/cache turn credentials (#465) * Signaling reconnect and refresh ice server config * Address comments * Add the event listener only once (#463) * Update Master and Viewer Logic for Determining whether to use STUN Server (#434) * Master - don't add STUN server for sendPrflxCandidates * Viewer - add STUN only if sendSrflxCandidates is checked --------- Co-authored-by: sirknightj <jggunawa@amazon.com> * Bump project version to 2.3.3 (#462) * Bump version to 2.4.0 (#468) * Correct comment about file size for optimized build (#470) * Bump @typescript-eslint/parser from 8.29.1 to 8.30.0 (#472) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.29.1 to 8.30.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.30.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-version: 8.30.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ts-jest from 29.3.1 to 29.3.2 (#475) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.3.1 to 29.3.2. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v29.3.1...v29.3.2) --- updated-dependencies: - dependency-name: ts-jest dependency-version: 29.3.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @types/node from 22.14.0 to 22.14.1 (#471) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.14.0 to 22.14.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.14.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @typescript-eslint/eslint-plugin from 8.29.1 to 8.30.0 (#474) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.29.1 to 8.30.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.30.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.30.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jsdom from 26.0.0 to 26.1.0 (#473) Bumps [jsdom](https://github.com/jsdom/jsdom) from 26.0.0 to 26.1.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](jsdom/jsdom@26.0.0...26.1.0) --- updated-dependencies: - dependency-name: jsdom dependency-version: 26.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add the update media storage configuration to v3 (#476) * Cleanup listeners properly (#477) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com>
1 parent d6dab16 commit 8a12dd2

29 files changed

+22842
-671
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ updates:
44
directory: /
55
target-branch: develop
66
schedule:
7-
interval: daily
7+
interval: weekly
88
labels:
99
- dependencies

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,22 @@ jobs:
2828
run: npm install
2929
- name: Run release
3030
run: npm run release
31+
32+
dependabot-auto-merge-after-ci-passes:
33+
needs: nodejs-ubuntu-build
34+
runs-on: ubuntu-latest
35+
permissions:
36+
pull-requests: write
37+
contents: write
38+
if: >-
39+
github.actor == 'dependabot[bot]' &&
40+
github.event_name == 'pull_request' &&
41+
github.event.pull_request.base.ref == 'develop'
42+
env:
43+
PR_URL: ${{ github.event.pull_request.html_url }}
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
steps:
46+
- name: Approve Dependabot PR
47+
run: gh pr review --approve "$PR_URL"
48+
- name: Auto-merge Dependabot PR
49+
run: gh pr merge --squash --auto "$PR_URL"

.github/workflows/develop-publish-gh-pages.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ jobs:
1414
uses: actions/setup-node@v2
1515
with:
1616
node-version: 22
17+
- name: Build AWS SDK
18+
working-directory: ./aws-sdk-build
19+
run: |
20+
npm install
21+
npm run build
22+
rm -rf ../examples/*-kvswebrtc.js
23+
mv dist/*-kvswebrtc.js ../examples
1724
- name: Install dependencies
1825
run: npm install
1926
- name: Run release

.github/workflows/master-publish-gh-pages-and-npm.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ jobs:
1414
uses: actions/setup-node@v2
1515
with:
1616
node-version: 22
17+
- name: Build AWS SDK
18+
working-directory: ./aws-sdk-build
19+
run: |
20+
npm install
21+
npm run build
22+
rm -rf ../examples/*-kvswebrtc.js
23+
mv dist/*-kvswebrtc.js ../examples
1724
- name: Install dependencies
1825
run: npm install
1926
- name: Run release
@@ -25,8 +32,12 @@ jobs:
2532
branch: gh-pages
2633
clean: true
2734
clean-exclude: develop/
28-
- name: Delete examples directories
29-
run: rm -rf examples dist/examples
35+
- name: Delete extra directories
36+
run: |
37+
# Delete the examples
38+
rm -rf examples dist/examples
39+
# Remove the infra to build the AWS SDK v3 browser script
40+
rm -rf aws-sdk-build
3041
- name: Deploy to npm packages
3142
uses: JS-DevTools/npm-publish@v1
3243
with:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Retarget Dependabot PRs to develop
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
retarget-pull-request:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
permissions:
13+
pull-requests: write
14+
contents: read
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
PR_URL: ${{ github.event.pull_request.html_url }}
18+
steps:
19+
- name: Change base branch to develop
20+
run: gh pr edit "$PR_URL" --base develop

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<br />
44
</h1>
55

6-
<div align="center">
7-
6+
<div align="center">
7+
88
[![NPM version](https://img.shields.io/npm/v/amazon-kinesis-video-streams-webrtc.svg?style=flat-square)](https://www.npmjs.com/package/amazon-kinesis-video-streams-webrtc)
99
[![NPM downloads](https://img.shields.io/npm/dm/amazon-kinesis-video-streams-webrtc.svg?style=flat-square)](https://www.npmjs.com/package/amazon-kinesis-video-streams-webrtc)
1010
[![NPM version](https://img.shields.io/npm/l/amazon-kinesis-video-streams-webrtc?style=flat-square)](https://www.npmjs.com/package/amazon-kinesis-video-streams-webrtc)
@@ -476,6 +476,10 @@ The source code for the test page is in the [`examples`](examples) directory.
476476

477477
For advanced debugging, use the `WebRTC Internals` tool your browser provides.
478478

479+
#### Building AWS SDK for JS v3
480+
481+
Refer to the [aws-sdk-build](./aws-sdk-build) directory for more details.
482+
479483
## License
480484

481485
This project is licensed under the [Apache-2.0 License](http://www.apache.org/licenses/LICENSE-2.0). See LICENSE.txt and NOTICE.txt for more information.

aws-sdk-build/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
node_modules/

aws-sdk-build/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Building the browser script version of AWS SDK for JS v3
2+
3+
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.
4+
* [Kinesis Video](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_Streams.html) client
5+
* [Kinesis Video Signaling Channels](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_Signaling_Channels.html) client
6+
* [Kinesis Video WebRTC Storage](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_WebRTC_Storage.html) client
7+
8+
## **Installation**
9+
10+
Before building, ensure you have **Node.js** installed.
11+
12+
### **1. Install Dependencies**
13+
Run the following command in this directory:
14+
15+
```sh
16+
npm install
17+
```
18+
19+
### **2. Build the SDK**
20+
Generate the bundled JavaScript file by running:
21+
22+
```sh
23+
npm run build
24+
```
25+
26+
This creates the file:
27+
```
28+
dist/aws-sdk-VERSION-kvswebrtc.js
29+
```
30+
31+
> [!NOTE]
32+
> `VERSION` will be replaced with the bundled AWS SDK version. For example: 3.758.0
33+
34+
## **Usage in HTML**
35+
Once built, include the script in your HTML file:
36+
37+
```html
38+
<script src="dist/aws-sdk-VERSION-kvswebrtc.js"></script>
39+
```
40+
41+
After that, the `AWS` object is globally available, just like AWS SDK v2.
42+
43+
> [!NOTE]
44+
> AWS SDK for JS v3 uses different syntax than v2. Refer to the [documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis-video/) for the syntax and usage.
45+
46+
## **Updating the AWS SDK for JS v3 to the latest**
47+
48+
If you need to update the AWS SDK clients, modify `package.json` and run:
49+
50+
```sh
51+
npm update
52+
```
53+
54+
Then, rebuild the bundle:
55+
56+
```sh
57+
npm run build
58+
```
59+
60+
You can now move it to the `examples` to use it:
61+
```shell
62+
mv ./dist/aws-sdk-*-kvswebrtc.js ../examples
63+
```
64+
65+
> [!NOTE]
66+
> You will also need to modify the `<script>` import in `examples/index.html` to pull the new file.
67+
68+
## **Troubleshooting**
69+
- If `npm run build` fails, try deleting `node_modules` and `package-lock.json`, then reinstall:
70+
```sh
71+
rm -rf node_modules package-lock.json
72+
npm install
73+
```
74+
- Ensure Webpack is installed by running:
75+
```sh
76+
npx webpack -v
77+
```

aws-sdk-build/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as KinesisVideo from "@aws-sdk/client-kinesis-video";
2+
import * as KinesisVideoSignaling from "@aws-sdk/client-kinesis-video-signaling";
3+
import * as KinesisVideoWebRTCStorage from "@aws-sdk/client-kinesis-video-webrtc-storage";
4+
5+
// Webpack configuration places these into window.AWS object
6+
// Should be accessible: window.AWS.KinesisVideo.KinesisVideoClient(...)
7+
export {
8+
KinesisVideo,
9+
KinesisVideoSignaling,
10+
KinesisVideoWebRTCStorage
11+
};

0 commit comments

Comments
 (0)