StudioCompanion / companion-studio

Studio website
https://companion.studio
0 stars 1 forks source link

fix: call play in event handler #252

Closed joshuaellis closed 2 years ago

joshuaellis commented 2 years ago

won't work in async function

Why

What

The issue is play in low battery mode will only work if called in an event handler

Because were assuming that the play button would always work so the state informed the elements state, play was called in an effect - async code, this was the wrong way round so it has now been reversed so the state of the element informs the state of the UI and the play method is called in the event handler.

Also suppress the stupid error that it can't autoplay because LBM.

Checklist

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
companion-studio ✅ Ready (Inspect) Visit Preview May 28, 2022 at 10:32AM (UTC)