This message was deleted.
# helpdesk
s
This message was deleted.
n
I guess this is a similar case: https://docs.livekit.io/reference/components/react/concepts/rendering-a-track/ Just need to figure out how to filter the presenting participant perhaps?
p
I beleive you can use custom layouts for the same, please read more here. Livekit will only record whatever components you display in this page when someone is sharing. Make sure that this page is accessible public without any login required, livekit handles the token authentication on it's own so you don't need to worry about random user visiting the url as they won't be able to join room via this url if they don't have proper join room token with them. If you want to record specific track only, that can also be done using the egress, please read more here . For filtering only screen share track you can use track.source property.
n
Thanks for your help @proud-lunch-18247! Appreciate it đŸ’Ș
Follow up question: reading the docs it seems like it suggests no rendering the local participant - if I wanted to have the person screen sharing still visible, and the screen being recorded - I guess you can do both? e.g Use the LiveKitRoom react component and Set up the Egress on the same room?
p
the way egress works in this case is that it joins a room as a “hidden” participant. So the
localParticipant
on your egress instance will not be the one who’s sharing their screen.
n
Sorry I'm a bit confused. Does this mean you cannot have a local participant sharing their screen, and record that track at the same time? 😅 if the local participant is not the one sharing the screen in the instance? đŸ€”
p
It means you can record any track of any participant (including screen share) but the egress template (that records the session) will not see any of these as the
localParticipant
- they are all
remote
participants from the perspective of the egress instance. That’s why the docs recommend not to render the local participant.
n
Ahh okay, makes kinda sense. I'm not quite there but I'll try to remember it đŸ’Ș thanks!
p
Maybe the concept you’re missing is that egress does not record locally in your browser. It’s an application in a VM somewhere in the cloud that does the recording. So if you and I are in a room and I start sharing my screen, then you will see the screen share on the
remote
participant
Lukas
. Egress joins the room like any other participant, but hidden. So egress will see the screen share also as a
remote
participant
Lukas
.
n
Ah okay gotcha, so then I guess you can determine who the person sharing the screen is and use that track to record?
appreciate the explanation
p
exactly. With
@livekit/components-react
you can get all screen share tracks e.g. like this https://docs.livekit.io/reference/components/react/hook/usetracks/#usage-example-1 (just replace
source: Track.Source.Camera
with
source: Track.Source.ScreenShare
)
🙌 1