Skip to content

Conversation

@lumburovskalina
Copy link
Collaborator

@lumburovskalina lumburovskalina commented Jan 19, 2026

if (!src) return;
audioRef.current = new Audio(src);
audioRef.current.volume = volume;
audioRef.current.play().catch(() => { });
Copy link
Member

Choose a reason for hiding this comment

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

maybe a warning/error in the console if it doesn't work.

also do we need to wrap it in a useCallback? otherwiese the function reference might change on every render

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