code wiki / _hdl_build / nx_video_embed_page_emit.nx
nx_video_embed_page_emit.nx
buildroot/runtime/_hdl_build/nx_video_embed_page_emit.nx
about
nx_video_embed_page_emit.nx -- GENERATED EMITTER (nx_asset_emit_gen). THIS ORGAN IS THE SSOT for
sites/nishifamily/video/embed.html -- edit HERE (or regenerate), NEVER the emitted artifact.
argv[1] overrides the target (the drift-kill seam: emit to a compare path + byte-diff).
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 7 | const P0: *u8 = "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<base href=\"/video/\">\n<title>Nishi Video — embed on your site</title>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"theme-color\" content=\"#0a0a0c\">\n<link rel=\"icon\" href=\"data:,\">\n<script defer src=\"/video/nishi-video.js\"></script>\n<style>\n :root { color-scheme: dark; }\n * { box-sizing: border-box; }\n html,body { margin:0; background:#0a0a0e; color:#e7e7e9; font:15px/1.55 -apple-system,system-ui,sans-serif; }\n .wrap { max-width:920px; margin:0 auto; padding:28px 20px 60px; }\n h1 { font-size:1.7rem; margin:0 0 4px; }\n .sub { color:#8a8a92; margin:0 0 22px; }\n .card { background:#111118; border:1px solid #24242e; border-radius:14px; padding:18px 20px; margin:16px 0; }\n .card h2 { font-size:1.05rem; margin:0 0 10px; color:#cfcfe0; }\n label { display:block; font-size:.82rem; color:#9a9aa6; margin:10px 0 4px; }\n input { background:#16161d; border:1px solid #2c2c36; color:#fff; border-radius:9px; padding:10px 13px; font-size:1rem; width:100%; max-width:340px; }\n .row { display:flex; gap:18px; flex-wrap:wrap; }\n .row > div { flex:1; min-width:180px; }\n pre { background:#0d0" |
| 8 | const P1: *u8 = "d13; border:1px solid #2a2a34; border-radius:10px; padding:14px; overflow-x:auto; font-size:.85rem; color:#b8d0f0; white-space:pre-wrap; word-break:break-all; }\n button { background:#2a4d8f; color:#fff; border:0; border-radius:9px; padding:10px 20px; font-size:.95rem; cursor:pointer; margin-top:10px; }\n button:active { transform:scale(.98); }\n .note { color:#c9a05a; font-size:.85rem; }\n ul.features { columns:2; column-gap:28px; padding-left:20px; margin:8px 0 0; color:#c2c2cc; font-size:.9rem; }\n ul.features li { margin:3px 0; break-inside:avoid; }\n iframe.preview { width:100%; height:600px; border:0; border-radius:12px; background:#000; }\n a { color:#6fa8ff; }\n</style>\n</head>\n<body>\n<div class=\"wrap\">\n <h1>Nishi Video — embed it on your site</h1>\n <p class=\"sub\">A native <code><nishi-video></code> element — NO iframe. Runs sovereign in your page (Shadow-DOM isolated), the wasm codec + FEC transport built from the hardware up. Private N-party calls, no third-party SDK, no account for viewers.</p>\n\n <div class=\"card\">\n <h2>1 · Name your room + size</h2>\n <div class=\"row\">\n <div><label for=\"room\">Room name</label><input id=\"room\" value=\"" |
| 9 | const P2: *u8 = "family\" maxlength=\"24\" autocomplete=\"off\"></div>\n <div><label for=\"h\">Height (px)</label><input id=\"h\" value=\"640\" inputmode=\"numeric\"></div>\n </div>\n </div>\n\n <div class=\"card\">\n <h2>2 · Copy this into your page</h2>\n <pre id=\"snippet\"></pre>\n <button id=\"copy\">Copy embed code</button>\n <p class=\"note\" id=\"copied\" style=\"display:none\">Copied ✓</p>\n <p class=\"note\">Camera/mic are requested first-party in YOUR page (no iframe permission-delegation). HTTPS pages only.</p>\n </div>\n\n <div class=\"card\">\n <h2>3 · Live preview (this is the real element, running here)</h2>\n <nishi-video id=\"preview\" class=\"preview\" room=\"demo\"></nishi-video>\n </div>\n\n <div class=\"card\">\n <h2>What every embed includes</h2>\n <ul class=\"features\">\n <li>N-party video (up to 8/room)</li>\n <li>Live audio (sovereign LPC codec)</li>\n <li>In-call text chat</li>\n <li>Screen sharing</li>\n <li>One-tap invite links</li>\n <li>Video “circles” (async messages)</li>\n <li>Live caption translation (EN/RU/BE/UK/PL)</li>\n <li>Adaptive bitrate + FEC loss recovery</li>\n <li>Camera/mic optional (view-only fallbac" |
| 10 | const P3: *u8 = "k)</li>\n <li>Mobile + desktop</li>\n </ul>\n </div>\n</div>\n<script>\n(() => {\n const $ = (id) => document.getElementById(id);\n const clean = (s) => (s || \"family\").toLowerCase().replace(/[^a-z0-9-]/g, \"\").slice(0, 24) || \"family\";\n function build() {\n const room = clean($(\"room\").value);\n let h = parseInt($(\"h\").value, 10); if (!h || h < 200) h = 640; if (h > 2000) h = 2000;\n const snip = '<script src=\"https://nishifamily.com/video/nishi-video.js\"></scr' + 'ipt>\\n<nishi-video room=\"' + room + '\"></nishi-video>';\n $(\"snippet\").textContent = snip;\n $(\"preview\").style.maxWidth = Math.round(h * 16 / 9) + \"px\";\n }\n $(\"room\").addEventListener(\"input\", build);\n $(\"h\").addEventListener(\"input\", build);\n $(\"copy\").addEventListener(\"click\", async () => {\n try { await navigator.clipboard.writeText($(\"snippet\").textContent); $(\"copied\").style.display = \"block\"; setTimeout(() => $(\"copied\").style.display = \"none\", 2000); }\n catch { const r = document.createRange(); r.selectNode($(\"snippet\")); getSelection().removeAllRanges(); getSelection().addRange(r); }\n });\n build();\n})();\n</script>\n</body>\n</html>\n" |
functions
| 12 | func ep(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return n } |
| 14 | func main(argc: i64, argv: *i64) -> i64 |