i have a meeting with screenshare, how can i share...
# ask-ai
s
i have a meeting with screenshare, how can i share screenshots from it with ai or with the agent, and what is the interval or actions that i can get from it a snap or screenshot from the screenshare
t
Thanks for reaching out, Mostafa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to share screenshots from a screenshare in your meeting with an AI/agent, and what automatic snapshot intervals or triggers are possible. Here are the practical options you can use: • Manual screenshots (best for control) ◦ Take a screenshot locally (OS tool). ◦ Send it to the agent via LiveKit byte/file API (use
sendFile()
or publish a byte stream with a topic like
screenshots
). • Let the agent receive the live screenshare (best for continuous, real‑time processing) ◦ Enable screenshare in the room (
setScreenShareEnabled(true)
). ◦ An agent connected to the room can subscribe to the screenshare video track and process frames in real time. • Periodic automatic snapshots (best for logging/archives) ◦ Use LiveKit Egress ImageOutput to generate snapshots at a configured
capture_interval
(e.g., every 5 or 10 seconds). ◦ Egress uploads images (JPEG) to configured storage (S3/GCS/etc.) and can include timestamps/metadata in filenames. • Triggered snapshots (best for on-demand captures) ◦ There’s no built-in single-click trigger, but you can implement it: ▪︎ Send a data message or RPC from the client (
publishData
or a command topic) saying “take screenshot now.” ▪︎ Backend/agent responds by triggering an Egress snapshot or instructing a client to capture and send a file. Which do you want to use for your meeting? • If you want code snippets for client-side
sendFile()
or an example Egress ImageOutput config with
capture_interval
, tell me which platform (web, Node, Python) and whether you prefer on-demand or periodic captures. Sources: Sending files & bytes | LiveKit docs | Screen sharing | LiveKit docs | Egress examples | LiveKit docs | RoomComposite Egress | LiveKit Docs | Egress output types | LiveKit docs
s
Periodic automatic snapshots (best for logging/archives) > so that can have a snapshot from the current track of screenshare?
t
Yes — periodic snapshots from Egress capture the current composited room output, so a participant's active screenshare will be included in those images. Configure an ImageOutput with a
capture_interval
(seconds) and output sizing; Egress will produce JPEGs (with timestamp/metadata support) to your configured storage (S3/GCS/Azure). If you want, I can provide an example ImageOutput JSON for your preferred interval, resolution, and storage target — which storage and interval (seconds) do you want?
s
can i know when the user share the screen if he is sharing a tab or the fullscreen?
t
You can detect tab vs full‑screen, but only from the sharer’s side. Here’s what to do: • On the sharer (publisher) client: ◦ Inspect the
MediaStreamTrack
returned by
getDisplayMedia()
and check
track.getSettings().displaySurface
— it will be
"browser"
for a tab,
"monitor"
for full screen, or
"window"
for a single app window. ◦ Send that info to other participants/agents via a LiveKit data message (e.g.,
localParticipant.publishData(...)
) or include it with any file/egress metadata. • For remote participants or server-side logic: ◦ LiveKit does not expose the
displaySurface
automatically for remote tracks. ◦ Have the publisher send a data message when they start screenshare specifying the type (tab/window/screen), or attach the value to your application-level signaling so agents can act on it. If you want, I can provide a short code example for the publisher (web) to read
displaySurface
and publish a data message or an example of the data-message handler for the agent. Which would you prefer? Sources: RoomComposite Egress | LiveKit Docs | Screen sharing | LiveKit docs