a
hi
t
Thanks for reaching out, Andre. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi — welcome! How can I help you with LiveKit today? If you’re not sure where to start, tell me whether you need help with setup (API keys, SDKs), rooms and participants, recording, or something else.
a
some user share screen is blank, while the other is not
t
Sorry you’re seeing that — I can help diagnose it. A few quick questions to narrow the cause: • Which platform and browser are the users with the blank share using (e.g., Chrome on Windows, Safari on macOS, Android, iOS)? • How are they starting the share — browser tab, window, or entire screen/app? • Do the affected users see any permission prompt? Did they allow screen capture and choose a source? • Do you see any errors in the browser/dev console for the blank share participant? • Are the working and non-working users using the same app version / SDK version? • Is the blank share happening for specific content (video players, DRM content, slides) or always blank? Send answers and, if possible, a short console log or screenshots — I’ll suggest targeted steps next (permissions, platform-specific fixes, or capture method changes). Sources: Screen sharing | LiveKit docs
a
• Chrome • browser tab, window, and entire screen • Do the affected users see any permission prompt? Did they allow screen capture and choose a source? Yes • Do you see any errors in the browser/dev console for the blank share participant? Yes • Are the working and non-working users using the same app version / SDK version? Yes • Is the blank share happening for specific content (video players, DRM content, slides) or always blank? always blank
t
Thanks — I’m looking at the console output you shared (publishing a
screen_share
track; forcing
contentHint
to
motion
with SVC codecs) and that helps. Let’s narrow this down with a few quick checks and a targeted workaround. Please try these in order and tell me which step changes anything: 1. Confirm the publisher’s Chrome flags/extensions ◦ Disable all Chrome extensions (or test in an Incognito window with extensions off). ◦ In chrome://flags ensure no experimental media flags are enabled that affect capture. 1. Test a direct native getDisplayMedia capture ◦ In the same browser tab, run this in the console to confirm the raw capture is not blank:
Copy code
navigator.mediaDevices.getDisplayMedia({video:true})
       .then(s => { const v = document.createElement('video'); v.autoplay = true; v.srcObject = s; document.body.appendChild(v); })
       .catch(e => console.error(e));
• If this is blank, it’s a browser/OS capture issue. If it shows correctly, the problem is after capture (publisher/encoder). 1. Check encoder / SVC interaction ◦ The log shows you force
contentHint
to
motion
and mention SVC codecs. Temporarily disable SVC or any custom codec selection in your publisher settings (use default codec negotiation). See if the share renders. 1. Verify track and element wiring ◦ Confirm the received track has a non-empty
readyState
and that the remote video element’s
srcObject
is set to the track’s MediaStream. Example checks in console on the receiver: ▪︎ Inspect received track object:
track.enabled
,
track.muted
,
track.readyState
▪︎ Inspect element:
videoElem.srcObject
contains tracks and
videoElem.play()
resolves. 1. Compare SDP/RTCPeerConnection behavior ◦ Capture the publisher and receiver SDP/track info (logs you already have are helpful). If possible paste the lines showing
codec
negotiation or SVC mentions — I can scan for mismatches. 1. Quick platform checks ◦ Ensure Chrome is updated on both sides. ◦ If the publisher is on a GPU-accelerated device, try disabling hardware acceleration in Chrome temporarily. Tell me the outcome of step 2 and step 3 first. If capture itself is fine but disabling SVC/fallback codec fixes it, I’ll provide exact code changes to stop forcing SVC or to change the contentHint/codec selection. Sources: Screen sharing | LiveKit docs
a
check this LocalVideoTrack {"_eventsCount":9,"isCpuConstrained":false,"_currentBitrate":0,"log":{"rebuild":"[Function] unknown","setDefaultLevel":"[Function] unknown","debug":"[Function] e","log":"[Function] e","enableAll":"[Function] unknown","error":"[Function] bound ","setLevel":"[Function] unknown","getLevel":"[Function] unknown","warn":"[Function] bound ","trace":"[Function] e","resetLevel":"[Function] unknown","methodFactory":"[Function] d","name":"livekit-track","disableAll":"[Function] unknown","levels":{"TRACE":0,"ERROR":4,"INFO":2,"DEBUG":1,"WARN":3,"SILENT":5},"info":"[Function] bound "},"simulcastCodecs":"[Map]","_mediaStreamID":"fb2fab4a-8eea-4967-a4f9-44a59939968b","source":"screen_share","handleTrackMuteEvent":"[Function] unknown","_events":{"upstreamResumed":"[Function] unknown","cpuConstrained":"[Function] unknown","upstreamPaused":"[Function] unknown","restarted":"[Function] unknown","unmuted":["[Function] unknown","[Function] unknown"],"ended":["[Function] unknown","[Function] unknown"],"audioTrackFeatureUpdate":"[Function] unknown","muted":["[Function] unknown","[Function] unknown"],"trackProcessorUpdate":"[Function] unknown"},"sid":"TR_VSRjAAUnsHr9ho","appVisibilityChangedListener":"[Function] unknown","isInBackground":false,"muteLock":{"_locking":"[Promise]","_locks":0},"optimizeForPerformance":false,"_constraints":{"advanced":[{"width":{"min":640}},{"width":{"max":1920}},{"height":{"min":480}},{"height":{"max":1080}},{"frameRate":{"min":15}},{"frameRate":{"max":30}}],"deviceId":{"exact":"window2636500"}},"_isUpstreamPaused":false,"providedByUser":true,"mediaStream":"[MediaStream]","_sender":"[RTCRtpSender]","kind":"video","handleEnded":"[Function] unknown","encodings":[{"adaptivePtime":false,"scalabilityMode":"L1T3","networkPriority":"medium","active":true,"maxBitrate":2500000,"maxFramerate":15,"priority":"medium"}],"signalClient":{"resetCallbacks":"[Function] unknown","onAnswer":"[Function] unknown","log":{"rebuild":"[Function] unknown","setDefaultLevel":"[Function] unknown","debug":"[Function] e","log":"[Function] e","enableAll":"[Function] unknown","error":"[Function] bound ","setLevel":"[Function] unknown","getLevel":"[Function] unknown","warn":"[Function] bound ","trace":"[Function] e","resetLevel":"[Function] unknown","methodFactory":"[Function] d","name":"livekit-signal","disableAll":"[Function] unknown","levels":{"TRACE":0,"ERROR":4,"INFO":2,"DEBUG":1,"WARN":3,"SILENT":5},"info":"[Function] bound "},"useJSON":false,"onSubscriptionError":"[Function] unknown","onLocalTrackPublished":"[Function] unknown","onRoomUpdate":"[Function] unknown","onConnectionQuality":"[Function] unknown","onSubscriptionPermissionUpdate":"[Function] unknown","pingIntervalDuration":5,"_requestId":0,"onSpeakersChanged":"[Function] unknown","onParticipantUpdate":"[Function] unknown","options":{"maxRetries":1,"e2eeEnabled":false,"websocketTimeout":15000,"autoSubscribe":true,"adaptiveStream":false},"pingTimeout":242,"onTrickle":"[Function] unknown","state":1,"connectionLock":{"_locking":"[Promise]","_locks":0},"onLocalTrackSubscribed":"[Function] unknown","ws":"[WebSocket]","onRemoteMuteChanged":"[Function] unknown","pingInterval":73,"onTokenRefresh":"[Function] unknown","requestQueue":{"pendingTasks":"[Map]","taskMutex":{"_locking":"[Promise]","_locks":0},"nextTaskIndex":27},"onStreamStateUpdate":"[Function] unknown","onOffer":"[Function] unknown","onRoomMoved":"[Function] unknown","onClose":"[Function] unknown","connectOptions":"[Reference seen at $.localVideoTrack.signalClient.options]","rtt":30,"loggerContextCb":"[Function] loggerContextCb","closingLock":{"_locking":"[Promise]","_locks":0},"onSubscribedQualityUpdate":"[Function] unknown","pingTimeoutDuration":15,"onLocalTrackUnpublished":"[Function] unknown","onRequestResponse":"[Function] unknown","onLeave":"[Function] unknown"},"monitorSender":"[Function] unknown","degradationPreference":"maintain-resolution","debouncedTrackMuteHandler":"[Function] u","reacquireTrack":false,"manuallyStopped":false,"codec":"vp9","_mediaStreamTrack":"[MediaStreamTrack]","senderLock":{"_locking":"[Promise]","_locks":0},"monitorInterval":243,"loggerContextCb":"[Function] loggerContextCb","_streamState":"active","handleTrackUnmuteEvent":"[Function] unknown","pauseUpstreamLock":{"_locking":"[Promise]","_locks":0},"trackChangeLock":{"_locking":"[Promise]","_locks":0},"isMuted":false,"_maxListeners":100}
t
Thanks — your
LocalVideoTrack
shows:
source: "screen_share"
,
codec: "vp9"
, active stream, encodings with
scalabilityMode: "L1T3"
, and
currentBitrate: 0
. That tells me capture is active but no encoded frames are being sent/decoded (blank on subscribers). Let’s troubleshoot with focused checks and a quick workaround. Please try these steps in order and tell me results for each: 1. Quick local-preview check (publisher) • Run in publisher console to confirm capture contains visible frames:
Copy code
const v = document.createElement('video');
v.autoplay = true;
v.muted = true;
v.srcObject = localVideoTrack.mediaStream;
document.body.appendChild(v);
If this is blank, the problem is capture/Chrome; if it shows video, the problem is post-capture (encoding/transport/subscriber). 1. Disable VP9 / SVC (quick workaround) • Your track uses VP9 +
L1T3
SVC. Force H.264 (no SVC) for the screenshare and retest:
Copy code
await room.localParticipant.setScreenShareEnabled(true, {
  video: { codec: 'h264' }
});
If subscribers see the share after this, it’s a VP9 decode/SVC compatibility issue. 1. Test getDisplayMedia directly (isolates Chrome capture) • In publisher console:
Copy code
navigator.mediaDevices.getDisplayMedia({ video: true })
  .then(s => { const v = document.createElement('video'); v.autoplay = true; v.srcObject = s; document.body.appendChild(v); })
  .catch(console.error);
If this is blank, disable extensions / try Incognito / update Chrome / disable hardware acceleration. 1. Check sender RTCRtpSender stats &
currentBitrate
• In publisher console, check sender bytes to confirm frames are encoded:
Copy code
const sender = localVideoTrack._sender;
sender.getStats().then(s => console.log(s));
Look for outbound-rtp bytesSent/frameRate. If bytesSent stays zero, encoder isn’t producing output. 1. Subscriber-side checks • On a subscriber that sees blank, confirm the remote
track.readyState
, and that the video element
srcObject
contains the track and
video.play()
resolves. Also inspect
chrome://webrtc-internals
for inbound-rtp frames received and decoder stats. 1. Short-term mitigations • If capture preview is fine but subscribers are blank and switching to H.264 fixes it, keep H.264 for screenshare. • If getDisplayMedia is blank, test Entire Screen vs Tab vs Window: Chrome can black out certain tabs (DRM/enterprise policy). Tell me results of steps 1 and 2 first (local preview and H.264 test). If you share the sender
getStats()
outbound-rtp summary or a snippet of any decoder errors from the subscriber console, I’ll recommend the exact code/config change to fix it. Sources: Screen sharing | LiveKit docs | Managing Video Quality During Network Congestion | WebRTC Codecs Guide - LiveKit
a
I'm using this code but the share screen is very slow // For web browsers, use getDisplayMedia directly logger.info('Using getDisplayMedia for screen sharing'); const stream = await navigator.mediaDevices.getDisplayMedia({ video: { frameRate: { ideal: 30 } } }); logger.info('Screen share stream obtained, creating LocalVideoTrack'); const videoTrack = stream.getVideoTracks()[0]; if (!videoTrack) { throw new Error('No video track available from screen share'); } const localVideoTrack = new LocalVideoTrack(videoTrack); localVideoTrack.source = Track.Source.ScreenShare; logger.info('Publishing screen share track', { trackId: localVideoTrack.sid, source: localVideoTrack.source, }); await room.localParticipant.publishTrack(localVideoTrack); logger.info('Screen share published successfully');
t
Thanks — I see you’re using getDisplayMedia + creating a LocalVideoTrack manually and the screenshare is very slow. Try these focused fixes (start with #1–3): 1) Use LiveKit’s built-in helper (best and simplest) • Replace manual creation with:
Copy code
await room.localParticipant.setScreenShareEnabled(true);
This applies LiveKit’s screen-optimized defaults (codec, simulcast, encodings, dynacast) and usually fixes slowness. 2) Prefer H.264 for screen content • VP9 can be CPU-heavy and SVC may add latency. Force H.264 when publishing if you must create a track:
Copy code
const localVideoTrack = new LocalVideoTrack(videoTrack, { videoCodec: 'h264' });
await room.localParticipant.publishTrack(localVideoTrack, { simulcast: true });
3) Ensure appropriate encoding params • Increase bitrate / framerate for screenshare:
Copy code
await room.localParticipant.publishTrack(localVideoTrack, {
  simulcast: true,
  videoEncoding: { maxBitrate: 3_000_000, maxFramerate: 30 }
});
Or configure publish defaults on Room to apply globally. 4) Verify capture vs publish • Confirm capture is fine locally:
Copy code
const v = document.createElement('video');
v.autoplay = true; v.muted = true; v.srcObject = stream;
document.body.appendChild(v);
If this is smooth, issue is encoding/transport. If this is slow/jerky, it’s a capture/Chrome problem. 5) Reduce CPU/GPU pressure • Disable VP9/SVC, enable H.264 to use hardware encode. • Disable other heavy tabs/apps and Chrome extensions. • Try disabling Chrome hardware acceleration toggle (test both ways). 6) Enable Dynacast / adaptive streaming • Ensure
adaptiveStream: true
and Dynacast is enabled so LiveKit only sends needed layers, reducing upstream load. 7) Check sender stats to confirm encoding output • In publisher console:
Copy code
const sender = localVideoTrack._sender;
sender.getStats().then(s => console.log(s));
Look for outbound-rtp
bytesSent
and
framesPerSecond
. If bytesSent≈0 or fps very low, encoder settings need adjustment. Tell me the results of: • Switching to
setScreenShareEnabled(true)
(step 1), and • The local preview check (step 4). If slowness remains, paste the relevant
sender.getStats()
outbound-rtp lines and I’ll recommend exact encoding values or a config change. Sources: Screen sharing | LiveKit docs | Codecs and more | LiveKit docs | Configuring the Client SDK for Optimal Video Quality | Bringing Zoom's end-to-end optimizations to WebRTC
a
setScreenShareEnabled(true) -> slow The local preview check -> fast
t
Thanks — since the local preview is fast but
setScreenShareEnabled(true)
is slow, the bottleneck is in encoding/transport or LiveKit publish settings. Try these targeted tuning steps in order and report which change helps. 1) Force H.264 (hardware encode) • H.264 is usually hardware-accelerated and lowers CPU/latency vs VP9.
Copy code
await room.localParticipant.setScreenShareEnabled(true, {
  video: { codec: 'h264' }
});
2) Increase encoder bitrate & framerate for screenshare • Raise max bitrate and framerate so encoder isn’t throttled:
Copy code
await room.localParticipant.setScreenShareEnabled(true, {
  video: { maxBitrate: 3_000_000, maxFramerate: 30 }
});
3) Adjust simulcast / SVC behavior • If SVC (scalabilityMode) is used and causes encoder overhead, disable SVC by preferring H.264 and enable simulcast instead:
Copy code
await room.localParticipant.setScreenShareEnabled(true, {
  video: { codec: 'h264' },
  publishOptions: { simulcast: true }
});
4) Enable Dynacast + adaptiveStream (reduce upstream load) • Ensure room options use dynacast/adaptive so only active layers are sent:
Copy code
const room = new Room({ dynacast: true, adaptiveStream: true });
(or enable these in your server/room config if controlled there) 5) Verify sender encoding actually sending frames • Check outbound stats after publishing:
Copy code
const sender = localVideoTrack._sender;
sender.getStats().then(s => console.log(s));
Look for outbound-rtp
bytesSent
,
framesPerSecond
, and
packetsSent
. If bytesSent is low, encoder params are still limiting output. 6) Lower CPU load on publisher • Close other heavy tabs/apps, disable extensions, and test with hardware acceleration toggled in Chrome (try both on/off). 7) If you use custom publish defaults, ensure they aren’t overriding screen defaults • Check
publishDefaults
for restrictive encodings/codecs that could throttle screenshare. 8) Short experiment to isolate encoder vs transport • Publish with very high bitrate/framerate and H.264 to see if perceived slowness goes away. If it improves, reduce to find the lowest acceptable settings. Tell me results for steps 1–3 and the outbound-rtp `bytesSent`/`framesPerSecond` from step 5. I’ll suggest exact values or a fallback config based on those stats.
a
I don't use setScreenShareEnabled
t
Thanks — since you’re not using
setScreenShareEnabled
, here are concise, actionable steps to optimize your manual publish flow (focus: make publish as fast as the local preview). 1) Force H.264 and hardware encoder when creating the LocalVideoTrack
Copy code
const localVideoTrack = new LocalVideoTrack(videoTrack, { videoCodec: 'h264' });
await room.localParticipant.publishTrack(localVideoTrack, { simulcast: true });
2) Supply explicit video encoding params on publish
Copy code
await room.localParticipant.publishTrack(localVideoTrack, {
  simulcast: true,
  videoEncoding: { maxBitrate: 3_000_000, maxFramerate: 30 }
});
3) Disable VP9/SVC temporal layers if present • If your
encodings
contain
scalabilityMode
(e.g. "L1T3"), prefer H.264 and simulcast instead to reduce encoder CPU. 4) Use Dynacast / adaptiveStream so only needed layers are sent • Ensure room/connection options enable them:
Copy code
const room = new Room({ dynacast: true, adaptiveStream: true });
5) Confirm sender is encoding and sending frames (diagnose) • After publish, run:
Copy code
const sender = localVideoTrack._sender;
sender.getStats().then(stats => console.log(stats));
Look for outbound-rtp:
bytesSent
increasing and
framesPerSecond
> 0. If bytesSent ≈ 0, encoder is not producing output. 6) Quick capture-vs-encode test • If local preview (video element) is smooth but publish is slow: ◦ Try creating a new LocalVideoTrack with same MediaStreamTrack but H.264 and higher bitrate (steps 1–2). ◦ Temporarily close other heavy tabs/apps and test hardware acceleration toggle in Chrome. 7) If you must keep VP9, reduce SVC load • Lower
scalabilityMode
(e.g., remove or set to a simpler mode) and increase
maxBitrate
so encoder can output required frames. If you want, paste the
sender.getStats()
outbound-rtp lines (bytesSent, framesPerSecond, packetsSent) after publishing and I’ll recommend exact codec/bitrate/encoding values.