Frontmatter
| id | 5676 |
| title | component.Video: handleAutoplay() => redundant update() call |
| state | Closed |
| labels | bug |
| assignees | Dinkh |
| createdAt | Aug 3, 2024, 8:40 PM |
| updatedAt | Aug 10, 2024, 6:22 PM |
| githubUrl | https://github.com/neomjs/neo/issues/5676 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Aug 10, 2024, 6:22 PM |

If I see it correctly,
handleAutoplay()only gets called insideconstruct(). If so, the method needs the@protectedflag.It is using
this.update()before changing the value of the playing config, which itself also triggers anupdate()call.We really want to batch all changes into one
update()call instead => removing it insidehandleAutoplay()would be sufficient.Rationale:
update()sends the vdom & vnode on a workers roundtrip to get the deltas. While this is happening, the component locks itself for future updates until the new vnode got back (async). After the delay the framework would trigger a 2nd roundtrip to get the deltas for the visible node.