> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a JS package

> Full reference documentation to help developers rapidly add calls to any site or app using the Daily real-time API built on WebRTC.

In addition to live testing in the [simulator](/docs/vcs/tools/simulator), you can also build a composition as a JavaScript library bundle, which you can then load into your own web app:

```jsx theme={null}
yarn build-browser daily:baseline
```

The second argument here is a [composition ID](/docs/vcs/tools/simulator#the-composition-id).

The JS library is written into the build subdirectory.

The file name contains the composition ID with the colon replaced by and underscore. For example:

`daily_baseline.bundle.js`

To load the composition in a web application, load the `.js` file using a script tag in your HTML loader. Then you can access the VCS composition library using a global variable that contains the composition ID, like so:

```js theme={null}
const vcsComp = window.VCSComposition_daily_baseline;
```

The library provides a single function named `startDOMOutputAsync`. It takes a container DOM element (where your VCS rendering will be directed), a viewport size, input image descriptions, and a few other arguments. It then returns an API object that lets you send commands data to the live VCS composition.

Please refer to the [VCS web renderer API documentation](/docs/vcs/tools/vcs-web-renderer#using-the-composition-library-directly) for more information for how to use the `vcsComp` object.

A practical way to learn more about this API is to read the [VCS Simulator](/docs/vcs/tools/simulator)'s source code, as it uses this exact mechanism to load up the composition and send data to it. The VCS Simulator is a single-file HTML+JS application without a build step, so its source is entirely in `devrig/vcs-rig.html`.
