Skip to content

Commit

Permalink
Fix virtual background demo
Browse files Browse the repository at this point in the history
  • Loading branch information
manjeshbhargav committed Aug 13, 2024
1 parent 5048cab commit edd4e3d
Show file tree
Hide file tree
Showing 3 changed files with 30,449 additions and 1 deletion.
17 changes: 17 additions & 0 deletions examples/virtualbackground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Virtual Background Demo

## Setup

Go to `${PROJECT_ROOT}/examples` and run `npm install`. It will install the dependencies and run the application server.

## Running the Demo

Open `http://localhost:3000` in a Chrome tab. The app captures your camera upon loading and plays it in a `<video>` element. You can choose to enable, disable or update the background settings using the controls on the page. Additionally, you can specify the following url parameters:

- `blurFilterRadius` - Radius of the background blur filter (default: 15)
- `capFramerate` - Choose video capture frame rate (default: 30)
- `capResolution=wxh` - Choose video capture resolution (default: 1280x720)
- `deferInputFrameDownscale=true|false` - **(Chrome only)** Whether to calculate the person mask without waiting for the input frame to be downscaled (default: false)
- `maskBlurRadius` - Radius of the mask blur filter (default: 8)
- `stats=advanced|hide|show` - Show performance benchmarks (default: show)
- `useWebWorker=true|false` - **(Chrome only)** Whether to use a web worker for background replacement (default: true)
2 changes: 1 addition & 1 deletion examples/virtualbackground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h5 class="modal-title" id="errorModalLabel">Error</h5>
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@2/dist/zero-md.min.js"></script>
<script>
(async () => {
const response = await fetch('/README.md');
const response = await fetch('README.md');
const text = await response.text();
const $instructions = document.getElementById('instructions');
const $zeroMd = document.createElement('zero-md');
Expand Down
Loading

0 comments on commit edd4e3d

Please sign in to comment.