Skip to content

Conversation

Zaid0412
Copy link
Contributor

@Zaid0412 Zaid0412 commented Aug 6, 2025

Problem

Recording sounds (RECORDING_OFF_SOUND, RECORDING_ON_SOUND, etc.) were being played before the audio files finished loading, causing console warnings like: PLAY_SOUND: no sound found for id: RECORDING_OFF_SOUND

This happened because:

  1. Audio elements are only added to Redux store after onCanPlayThrough event fires
  2. Sound playback was attempted before audio files finished loading
  3. No retry mechanism existed for recording sounds

Solution

  • Early registration: Moved sound registration to BaseApp._extraInit() to register sounds as early as possible
  • Robust retry mechanism: Added exponential backoff retry for recording/streaming sounds
    • Starts at 500ms delay, doubles each attempt (500ms → 1s → 2s → 4s → 5s max)
    • Up to 10 attempts (about 30 seconds total)
    • Only stops when audio element is actually loaded
  • Graceful degradation: If audio fails to load after 10 attempts, logs a warning but doesn't crash

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@Zaid0412
Copy link
Contributor Author

@saghul Can you please review this.

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