Embedding a live terminal
Peepvibes provides a read-only terminal iframe at
https://peepvibes.live/embed/s/<public_id>. Use it when another site needs to
show the terminal without implementing ALiS frame decoding, Kitty graphics,
late-join snapshots, reconnects, or fit-to-frame sizing. The host page still
owns its own stream header, follow and chat controls, and X Player Card tags.
The iframe is not a complete watch page or a replacement for the X card URL.
Embed on the X share page
The watch page’s Copy X link button points to
https://x.peepvibes.live/s/<public_id>. That URL serves its own X card
metadata and mobile page. If the share page adopts the hosted iframe,
replace only its terminal implementation with the hosted player:
function LiveTerminal({ publicId }: { publicId: string }) {
return (
<iframe
title="Live Peepvibes terminal"
src={`https://peepvibes.live/embed/s/${encodeURIComponent(publicId)}`}
loading="eager"
referrerPolicy="no-referrer"
className="block w-full border-0"
style={{ height: "min(70dvh, 600px)", minHeight: 320 }}
/>
);
}
Render that component only for a public or unlisted stream resolved by the share page. Do not put a personal API key, producer ticket, or private stream identifier in the iframe URL. The player itself checks access anonymously: a private, missing, or inaccessible stream shows a generic unavailable state.
The supplied phone screenshot has readable page controls but tiny terminal
text, and X’s browser chrome overlaps the lower chat area. Keep the source
terminal’s geometry intact: offer a link to the full watch page or a user
font-size control rather than cropping rows to make the text look bigger.
Leave bottom space in the host page for its chat input and X’s browser
controls (padding-bottom: env(safe-area-inset-bottom) is a starting point,
not a substitute for testing in X). The iframe does not size or fix the
surrounding share page.
The owner verified x.peepvibes.live as an inline X embed. That does not
establish that a nested iframe has been installed or works inside X’s
in-app browser. Keep the share page’s header, chat, and Follow button outside
the iframe, and validate them separately after any player replacement.
X controls how its browser and card are presented; this route cannot
guarantee clipboard permissions there.
What the frame does
- The Phoenix LiveView serves a compact, viewport-height terminal plus a “Watch on peepvibes” link that opens the canonical watch page in a new tab. No chat, voice, video, sign-in form, or creator controls run in the frame.
TerminalPlayeruses Peepvibes’ bundled ALiS decoder and xterm/Kitty renderer. It opens the read-only/ws/s/<public_id>socket from the Peepvibes origin, consumes a full init snapshot on join/reconnect, and does not send terminal input. Do not maintain a second decoder on the host page.- The route deliberately queries with
actor: nileven if a visitor is signed in to Peepvibes. It serves only public and unlisted streams. The viewer socket performs its own authorization and revocation checks. Content-Security-Policy: frame-ancestors 'self' https://x.peepvibes.live https://peep.grok.mepermits the X share host and the legacy Grok share host for links already posted.X-Frame-Optionsis removed only on the embed route. Ordinary pages remainSAMEORIGIN; other origins are not implicitly allowed. The iframe has nopostMessageor JavaScript API.
The iframe URL is stable; its assets are deployed with the main application.
The existing peepvibes-sdk offers typed data and transport APIs, not a
standalone renderer or a React component. An iframe avoids shipping renderer
versions and dependencies into each third-party client.
Verification before replacing the share page’s player
- Deploy the Peepvibes release containing
/embed/s/:public_id. Confirm/embed/s/<live-public-id>displays the live terminal in a standalone browser and that the response permitshttps://x.peepvibes.liveto frame it. - Load the actual
x.peepvibes.live/s/<public_id>page in a phone-sized browser and inside X’s in-app browser. Confirm the nested frame loads, renders the current terminal (including large init snapshots), and has no nested scrollbars or clipped bottom controls. The iframe must have an explicit height;height: 100%alone needs a height on every ancestor. - Disconnect and restore the network, refresh during output, and check the player returns to a complete current screen, not a stale partial frame. Verify privacy pause, end, and access revocation through the frame.
- Open a private URL through the embed route as a signed-in owner and as an anonymous visitor. Both must show only the generic unavailable state.
- Validate the X Player Card separately. Check its preview URL and metadata, then post the share URL, open the inline card in X on a phone, and follow its link to the share page. Test chat and Follow on the host page separately with authenticated credentials; those actions are not supplied by the iframe.
Deployment status (2026-09-29): /embed/s/:public_id is live on
peepvibes.live; the owner verified x.peepvibes.live as an inline X embed.
The iframe has rendered a public stream in Chromium. The share page’s adoption
of that iframe and its behavior inside X’s browser are not yet verified.