Skip to content

fix/replay-crash-mobile-shortcuts-webcams#300

Merged
antobinary merged 4 commits intobigbluebutton:developfrom
Beldaa:fix/webcams-null-currenttime
May 29, 2025
Merged

fix/replay-crash-mobile-shortcuts-webcams#300
antobinary merged 4 commits intobigbluebutton:developfrom
Beldaa:fix/webcams-null-currenttime

Conversation

@Beldaa
Copy link
Contributor

@Beldaa Beldaa commented May 27, 2025

🐛 What does this PR fix?
This PR resolves two issues that caused session replays to crash, especially on mobile devices and in moderated classrooms:

  1. Broken keyboard shortcut cleanup
    Improper use of removeEventListener with only one argument was causing the following error:
    TypeError: Failed to execute 'removeEventListener' on 'EventTarget': 2 arguments required

  2. Webcam replay crash due to null video reference
    When student webcams are disabled (e.g., via moderation), the video element may be missing, causing:
    Uncaught TypeError: Cannot read properties of null (reading 'currentTime')

✅ Changes
Refactored Shortcuts utility to properly store and clean up event listeners.
Wrapped videoRef.current access in a null-safe check before calling currentTime.
Added guard conditions to ensure both features degrade gracefully without errors.

@antobinary
Copy link
Member

Much appreciated, @Beldaa !

@antobinary antobinary merged commit 643d6f8 into bigbluebutton:develop May 29, 2025
2 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.

3 participants