-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap usage of useSensitiveMedia
with computed
#2982
Conversation
Size Change: +78 B (0%) Total Size: 891 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a request for changes to the implementation to avoid issues with creating computeds inside of computeds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the unref
to allow for passing audio
or ref<audio>
.
I think that we only need the ref for global audio, because it's the only element in which the value of audio
can change. For the other audio track components, audio
stays the same throughout the lifetime of the component.
d95c8a3
to
2219a4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Can the audio
in VAudioThumbnail
also change over the lifetime of the component? I thought that only VGlobalLayout
's audio does.
Yeah, the thumbnail also needs to account for the audio change. |
Fixes
Fixes #2927 by @obulat
Description
This PR wraps usages of the
useSensitiveMedia
composable withcomputed
so that the value ofshouldBlur
is updated with the propaudio
changes.Testing Instructions
Try to reproduce the problem in the linked issue. If you are unable to, consider the issue fixed.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin