Skip to content

Commit 587fe0d

Browse files
authored
Updated README with script tag embed instructions (livekit#774)
1 parent d7719b2 commit 587fe0d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ yarn add livekit-client
3030
npm install livekit-client --save
3131
```
3232

33+
### Minified JS
34+
35+
To use the SDK without a package manager, you can include it with a script tag:
36+
37+
```html
38+
<script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
39+
```
40+
41+
The module will be exported under `LivekitClient` in the global namespace. When
42+
accessing symbols from the class, you'd need to prefix them with `LivekitClient.`.
43+
For example, `Room` becomes `LivekitClient.Room`.
44+
3345
## Usage
3446

3547
Examples below are in TypeScript, if using JS/CommonJS imports replace import with:
@@ -297,7 +309,9 @@ If you are targeting legacy browsers, but still want adaptiveStream functionalit
297309
Also when targeting legacy browsers, older than the ones specified in our browserslist target, make sure to transpile the library code to your desired target and include required polyfills with babel and/or corejs.
298310

299311
<!--BEGIN_REPO_NAV-->
312+
300313
<br/><table>
314+
301315
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
302316
<tbody>
303317
<tr><td>Client SDKs</td><td><a href="https://github.com/livekit/components-js">Components</a> · <b>JavaScript</b> · <a href="https://github.com/livekit/client-sdk-rust">Rust</a> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (web)</a> · <a href="https://github.com/livekit/client-sdk-python">Python</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native (beta)</a></td></tr><tr></tr>

0 commit comments

Comments
 (0)