This message was deleted.
# helpdesk
s
This message was deleted.
m
cc @eager-raincoat-52616
b
Hello. I am following up on this question. Is there a code snippet you can share?
m
hm, I think this slipped under the radar, sorry @bulky-terabyte-42780 — I’ll shoot DL a note about it directly
✅ 1
e
hey @bulky-terabyte-42780, sorry about missing this. If you have a Room object already, you can create a video track directly with room.localParticipant.createVideoTrack(), and render the video from that. note that you can’t have two simultaneous camera tracks going at the same time, so you’ll have to stop the video track or handle publishing the camera directly. example:
Copy code
// Create video track
val localParticipant = room.localParticipant
val track = localParticipant.createVideoTrack()
track.startCapture()


// For rendering in view-based apps
track.addRenderer(surfaceOrTextureViewRenderer)

// For rendering in compose-based apps
VideoRenderer(room = room, videoTrack = track)


// When connected, publish the track
localParticipant.publishVideoTrack(track)
b
Regarding the above, VideoRenderer is a composable that will show the raw video before connected?
Also on a side note. Does LiveKit have any zoom APIs for the native camera?
e
Yeah,
VideoRenderer
is a composable supplied by the livekit android sdk
✅ 1
we don’t have any zoom APIs available at the moment
b
Are zoom controls on the roadmap?
e
not in the near future. I think a custom implementation of VideoCapturer with Camera3 to use zoom controls would be feasible to do, but not planned for at the moment
✅ 1
b
@eager-raincoat-52616 Do you all have an example code for this?
I think a custom implementation of VideoCapturer with Camera3
e
no, that’d be my plan to support zoom controls; don’t have it implemented