Skip to content

Conversation

@oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Dec 29, 2025

💡 Overview

Introduces new useModeration hook that handles the call.moderation_blur event.
Follow-up of: #1822

🎫 Ticket: https://linear.app/stream/issue/RN-329/moderation-video-blurring
📑 Docs: https://github.com/GetStream/docs-content/pull/373

clearTimeout(blurTimeoutRef.current);
if (!isSupported) return turnCameraOff();

restoreRef.current = (restoreRef.current || Promise.resolve()).then(() =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to pass Promise.resolve() in userRef() as init value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to create junk on every re-render. useRef(Promise.resolve()) will create many dangling promises that should be garbage collected afterwards.

@oliverlaz oliverlaz merged commit 4105ee7 into main Dec 30, 2025
5 of 6 checks passed
@oliverlaz oliverlaz deleted the use-moderation branch December 30, 2025 14:27
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.

4 participants