set breakpoint attributes quicker again
luwes opened this issue · comments
#682 added a delay to setting these attributes
in themes these attributes are used to trigger render and Mux player uses the breakpoints to conditionally render size based views.
as a result this delay adds a delay to render the view in Mux player and this is noticeable on player load.
some examples:
try refreshing a couple of times and you can see the jumping of control bar
I see a small resize of the controls on reload but nothing signifiant. Is that what we're talking about?
Do we have any sense of why there's an issue with setTimeout compared to microTask?
Edit: Is the answer just to lower the timeout?
yes, it's the small resize. it's small but worth fixing I think.
yes, lowering the timeout would probably cause that resizeobserver exceeded error / warning again.
fix should be really easy, we can add those attributes 1 time "instantly" and subsequent ones will be handled by the resize observer callback...
Ok that generally makes sense. Should be good to prioritize.