Skip to content

Commit def2fdd

Browse files
authored
Merge pull request #70 from itzmanish/fix-audio
fix: moq-js player lifecycle and browser audio playback
2 parents 12853f5 + 3e3f628 commit def2fdd

106 files changed

Lines changed: 9527 additions & 6425 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

demo/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ This demo consists of two main pages:
1414

1515
1. **Setup and serve the demo**:
1616
```bash
17-
# From the root moq-demo-site directory
18-
npm run setup # Copy MoQ library files to demo/lib/
19-
npm run dev # Start local server with required headers
17+
# From the root moq-js directory
18+
npm run dev # Watch lib/, rebuild @moq-js/player, and serve the demo
2019
```
2120

2221
2. **Open the publisher**:
@@ -158,7 +157,7 @@ demo/
158157
### Development Issues
159158
- Make sure the local server is running (`npm run dev`)
160159
- Check browser console for WebTransport errors
161-
- Verify the MoQ library files are loading from `lib/` directory
160+
- Verify the demo is loading the current player bundle from `lib/dist` via the local dev server
162161
- Ensure all required headers are present (our server includes them automatically)
163162
- If using Python server (`npm run serve:python`), note that required headers are missing
164163

@@ -172,9 +171,8 @@ demo/
172171

173172
1. **Start Local Development**:
174173
```bash
175-
# From the root moq-demo-site directory
176-
npm run setup # Copy MoQ library files (one-time setup)
177-
npm run dev # Start local server with headers
174+
# From the root moq-js directory
175+
npm run dev # Start local server with headers and watch the player bundle
178176
```
179177

180178
2. **Test Locally**:
@@ -187,8 +185,12 @@ demo/
187185
- Test configuration
188186

189187
4. **Deploy**:
188+
- Run `npm run build` from the repo root so the current IIFE bundles from
189+
`lib/dist` are copied into `demo/lib`
190190
- Upload `demo/` folder contents to Cloudflare Pages
191-
- The MoQ library files are copied locally and included
191+
- For local development, the demo server serves the current `lib/dist` bundles directly
192+
- For production deploys, the published `demo/` folder contains synced copies
193+
of the current player bundles in `demo/lib`
192194
- Run `npm run deploy:restore` to switch back to dev config
193195

194196
## Future Enhancements
@@ -215,4 +217,4 @@ demo/
215217

216218
## License
217219

218-
This demo is part of the MoQT protocol demonstration project. Please refer to the main project license for usage terms.
220+
This demo is part of the MoQT protocol demonstration project. Please refer to the main project license for usage terms.

demo/lib/moq-player.iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/moq-player.iife.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/moq-publisher.iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/moq-publisher.iife.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/moq-simple-player.iife.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/moq-simple-player.iife.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)