Skip to content

Conversation

Copy link

Copilot AI commented Nov 30, 2025

Camera mode was missing the fullscreen countdown overlay, and browser autoplay policies were blocking all match sounds.

Changes

Fullscreen Countdown Overlay (Camera Mode)

  • Added countdown overlay at zIndex 5 that displays "MATCH STARTING IN" with large animated countdown numbers (3, 2, 1)
  • Matches the visual treatment of the full display mode

Audio Unlock Mechanism

  • Added soundsEnabled state and SoundEnableOverlay component to handle browser autoplay restrictions
  • Modified useDisplayAudioService hook to gate playback on user interaction:
function useDisplayAudioService(soundsEnabled: boolean) {
  const playAudio = useCallback((key: string, onEnded?: () => void) => {
    if (!soundsEnabled) {
      onEnded?.();
      return;
    }
    // ... play audio
  }, [soundsEnabled]);
  
  return { playAudio, unlockAudio };
}
  • Overlay prompts user to click before sounds will play, then disappears

Sound Enable Overlay

Original prompt

The countdown for camera view is not working and the sounds don't play at all


✨ 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 Nov 30, 2025

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

Project Deployment Preview Comments Updated (UTC)
ftcscorer Ready Ready Preview Comment Nov 30, 2025 8:34pm

Copilot AI changed the title [WIP] Fix countdown for camera view and sound issues Fix camera view countdown display and enable audio playback Nov 30, 2025
Copilot AI requested a review from acurra3398 November 30, 2025 20:36
@acurra3398 acurra3398 marked this pull request as ready for review November 30, 2025 20:39
@acurra3398 acurra3398 merged commit 731e311 into main Nov 30, 2025
2 of 8 checks passed
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