is it possible to dynamically change adaptive stre...
# ask-ai
s
is it possible to dynamically change adaptive stream?
t
Thanks for reaching out, John. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you asked about adaptive streaming in LiveKit! It’s designed to thoughtfully adjust video quality during your session based on how visible and large the video elements are, which helps provide a smooth experience. Just a quick note: the adaptive stream feature can’t be switched on or off once the room is created—it needs to be set when you initialize the Room object. Once you've enabled it, the system takes care of managing video quality automatically throughout your session. If you ever want more hands-on control over video settings, you can use methods like
setVideoDimensions
or
setVideoQuality
. Just keep in mind, these manual controls work best when adaptive streaming isn’t actively managing the track. I hope this helps clarify things! Feel free to reach out if you have any more questions. Sources: Sources/LiveKit/TrackPublications/RemoteTrackPublication.swift | src/room/track/types.ts | lib/src/track/local/video.dart | livekit-rtc/livekit/rtc/_proto/room_pb2.pyi | Bringing Zoom's end-to-end optimizations to WebRTC
s
it seems like having adaptive stream on messes up with PIP, here is the report: If a doctor joins before the patient + shares screen - no bug. If a doctor joins after the patient + shares screen - bug [9:49 PM] dynamically changing adaptiveStreaming doesn't seem to work either. [9:49 PM] But when I turn it off, works fine. [9:50 PM] Debugging it was a pain because it was quite unclear what the root cause was. [9:50 PM] https://docs.livekit.io/reference/client-sdk-android/livekit-android-sdk/io.livekit.android.room/-room/adaptive-stream.html Basically pauses the stream if you move off the tab [9:51 PM] And we're using the element in PIP
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
s
essentially, when adaptive stream is on, the user who joins second (of two users) whenever they share their screen, the PIP stream appears to lock, do you know what's happening there?