We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey! Amazed with this library so far. I'm wondering if there is a way to update the options after the initial render?
I confirmed with a console log that the options are changed, but it's not reacting to the state change. Is there a way to manually trigger a redraw?
// Listen for changes in dark mode const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.type === 'attributes' && mutation.attributeName === 'class') { const isDarkMode = document.documentElement.classList.contains('dark'); console.log(player.options) player.options.themeColor = isDarkMode ? '#6366f1' : '#4A5568'; player.options.theme = isDarkMode ? 'dark' : 'light'; } }); }); observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey! Amazed with this library so far. I'm wondering if there is a way to update the options after the initial render?
I confirmed with a console log that the options are changed, but it's not reacting to the state change. Is there a way to manually trigger a redraw?
The text was updated successfully, but these errors were encountered: