diff --git a/README.md b/README.md index 1b291c1..28a67d1 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,9 @@ npm run dev ## Frameworks -| Framework | Supported | -|-----------------------------------------------|-----------| -| [Vite 5](./vite-5) | ✅ | -| [Vite 6](./vite-6) | ✅ | +| Framework | Supported | +|-------------------------------------------------|------------| +| [Vite 5](./vite-5) | ✅ | +| [Vite 6](./vite-6) | ✅ | +| [Vite 7](./vite-7) | ✅ | | [Astro 5](https://github.com/kixelated/moq.dev) | ✅ | diff --git a/vite-5/README.md b/vite-5/README.md index 74872fd..e71a818 100644 --- a/vite-5/README.md +++ b/vite-5/README.md @@ -1,50 +1,50 @@ -# React + TypeScript + Vite +# MoQ Web Components + React -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +React application demonstrating Media over QUIC (MoQ) web components for real-time media streaming. Uses `@moq/watch` and `@moq/publish` packages with React 18 and Vite 5. -Currently, two official plugins are available: +## Features -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +- **Watch**: Subscribe to real-time media streams from a MoQ relay +- **Publish**: Publish camera/screen media to a MoQ relay +- Custom web components with Solid.js-based UI overlays +- Feature detection and browser support banners -## Expanding the ESLint configuration +## Prerequisites -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: +- Node.js 20.19.0 or >=22.12.0 -- Configure the top-level `parserOptions` property like this: +## Quick Start -```js -export default tseslint.config({ - languageOptions: { - // other options... - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - }, -}) +```bash +npm install +npm run dev ``` -- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` -- Optionally add `...tseslint.configs.stylisticTypeChecked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: - -```js -// eslint.config.js -import react from 'eslint-plugin-react' - -export default tseslint.config({ - // Set the react version - settings: { react: { version: '18.3' } }, - plugins: { - // Add the react plugin - react, - }, - rules: { - // other rules... - // Enable its recommended rules - ...react.configs.recommended.rules, - ...react.configs['jsx-runtime'].rules, - }, -}) +The app opens at `http://localhost:5173`. + +## Build + +```bash +npm run build ``` + +Output is generated in the `dist/` directory. + +## Web Components + +### Watch (Subscribe) +- **``** - Core element for subscribing to MoQ streams. Accepts `url`, `path`, `muted`, `paused`, `volume`, `jitter` attributes. Contains a `` or `