Skip to content

Remove video element event handlers causing waiting state issues#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-status-reposting-issue
Draft

Remove video element event handlers causing waiting state issues#1
Copilot wants to merge 3 commits intomainfrom
copilot/fix-status-reposting-issue

Conversation

Copy link

Copilot AI commented Dec 17, 2025

Video elements were getting stuck in waiting states due to event handlers that logged but didn't resolve the condition, and unnecessary .load() calls that interfere with MediaStream playback.

Changes

  • Removed non-functional event handlers: onwaiting, onstalled, onloadedmetadata, oncanplay, onplay, onpause that only logged to console
  • Removed .load() calls after setting srcObject on video elements - calling .load() on MediaStream objects can prevent proper playback
  • Simplified video stream handling in both Calls.jsx and GroupCalls.jsx

Before

localVideoRef.current.srcObject = localStream;
localVideoRef.current.load(); // Problematic for MediaStreams
localVideoRef.current.onwaiting = () => {
  console.log('Local video is waiting for data'); // No resolution
};

After

localVideoRef.current.srcObject = localStream;
const playPromise = localVideoRef.current.play();
if (playPromise !== undefined) {
  playPromise.catch(error => {
    console.error('Error playing local video:', error);
  });
}

The browser now handles MediaStream playback naturally without interference. Reduced codebase by 161 lines of debugging noise.

Original prompt

it is saying waiting for the status to be reposted


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
video-chat Error Error Dec 17, 2025 3:10pm
video-chat-b8pr Error Error Dec 17, 2025 3:10pm
video-chat-csqr Error Error Dec 17, 2025 3:10pm

…ling

Co-authored-by: mandar1045 <180984698+mandar1045@users.noreply.github.com>
Co-authored-by: mandar1045 <180984698+mandar1045@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix waiting for status to be reposted error Remove video element event handlers causing waiting state issues Dec 17, 2025
Copilot AI requested a review from mandar1045 December 17, 2025 15:11
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.

2 participants

Comments