zero-query 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/cli/scaffold/webrtc/app/components/video-room.js +482 -98
- package/cli/scaffold/webrtc/global.css +190 -31
- package/dist/zquery.dist.zip +0 -0
- package/dist/zquery.js +3 -3
- package/dist/zquery.min.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -247,6 +247,24 @@ my-app/ ← SSR scaffold (npx zquery create my-app --ss
|
|
|
247
247
|
|
|
248
248
|
Components in `app/components/` export plain definition objects - the client registers them with `$.component()`, the server with `app.component()`. The scaffold includes a blog with param-based routing (`/blog/:slug`), per-route SEO metadata, JSON API endpoints (`/api/posts`), and `window.__SSR_DATA__` hydration. The `--ssr` flag handles everything automatically - installs dependencies, starts the server at `http://localhost:3000`, and opens the browser.
|
|
249
249
|
|
|
250
|
+
Use `--webrtc-demo` (`-w`) for a one-page video room backed by [zero-server](https://github.com/tonywied17/zero-server):
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
my-app/ ← webrtc scaffold (npx zquery create my-app --webrtc-demo)
|
|
254
|
+
index.html ← single-page video room shell
|
|
255
|
+
global.css
|
|
256
|
+
package.json ← declares @zero-server/sdk + @zero-server/webrtc deps
|
|
257
|
+
app/
|
|
258
|
+
app.js ← boots the room component
|
|
259
|
+
components/
|
|
260
|
+
video-room.js ← join controls, peer grid, z-stream bindings
|
|
261
|
+
server/
|
|
262
|
+
index.js ← signaling + static server (zero-server-backed)
|
|
263
|
+
assets/
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
The signaling server is a thin wrapper around `@zero-server/webrtc` that issues join tokens, relays SDP/ICE, and serves the static client. Set `WEBRTC_JWT_SECRET`, `TURN_SECRET`, and `TURN_URLS` env vars to enable TURN. The `--webrtc-demo` flag installs all deps (zQuery + the two `@zero-server` packages), starts the signaling + static server at `http://localhost:3000`, and opens the browser.
|
|
267
|
+
|
|
250
268
|
- One component per file inside `components/`.
|
|
251
269
|
- Names **must contain a hyphen** (Web Component convention): `home-page`, `app-counter`, etc.
|
|
252
270
|
- Components with external templates or styles can use a subfolder (e.g. `contacts/contacts.js` + `contacts.html` + `contacts.css`).
|