Skip to content

fix: show local camera feed during try-on loading to eliminate black screen#14

Open
tomershlasky wants to merge 1 commit into
mainfrom
slack-agent/fix-black-screen-during-loading
Open

fix: show local camera feed during try-on loading to eliminate black screen#14
tomershlasky wants to merge 1 commit into
mainfrom
slack-agent/fix-black-screen-during-loading

Conversation

@tomershlasky
Copy link
Copy Markdown
Collaborator

Problem\n\nUsers see a black screen when opening the try-on modal while the WebRTC connection is being established (can take 10–15s). The local camera stream was being passed to the WebRTC connection but never rendered in the <video> element — leaving bg-gray-900 visible during the entire loading phase.\n\n## Fix\n\nAfter startCamera() succeeds, immediately set videoRef.current.srcObject = mediaStream so the local camera feed is shown while connecting. When the remote AI stream arrives, handleRemoteStream naturally overwrites it.\n\nChanged: examples/ecommerce/components/TryOnModal.tsx — 3 lines added in init()\n\n## Notes\n\n- Almog confirmed this happens before the session starts (and also on the demo site / B2C product)\n- The underlying server-side latency (slow moderation, ICE connectivity) is a separate infra concern; this makes the UX acceptable regardless of connection time\n\nRequested by Almog in Slack (#webrtc)


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant