Skip to content

Conversation

@Harsh-Wardhan-404
Copy link

Title

fix(recording): keep UI camera alive after stopping local recording by using cloned tracks

Summary

Stopping a local recording with “Record only my audio and video streams” was ending the initiator’s live camera track, resulting in a black self-view and an unresponsive camera toggle. This change records from cloned gUM tracks and resets local-recording flags on stop so the UI track remains live.

Related issue

Problem

  • After stopping local recording (self-only), the initiator’s video turns black.
  • Camera cannot be re-enabled without a page reload.
  • Reproducible on meet.jit.si and stable 10314.

Root cause

  • In react/features/recording/components/Recording/LocalRecordingManager.web.ts, the local-recording stream was built from the app’s live gUM tracks.
  • On recorder stop, all tracks in this.stream were stopped, which also ended the same live camera track used by the UI (readyState → ended).
  • selfRecording flags could linger and affect mute interception.

Fix

  • Build the recording stream from cloned tracks:
    • Use audioTrack.clone() / videoTrack.clone() when creating this.stream in the self-only path.
  • Reset local-recording state on stop:
    • Clear this.recorder, this.stream, audio context/destination.
    • Set selfRecording.on = false and selfRecording.withVideo = false.

@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 :(.

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.

3 participants