vime
vime copied to clipboard
initialMuted not set in the right lifecycle method
I'm trying to have a vimeo video autoplay as muted in React.
function VimeoVideo({ src }) {
return (
<Player muted autoplay>
<Vimeo videoId={src} />
<Ui>
<Poster />
</Ui>
</Player>
);
}
After some debugging (the first time I'm interacting with custom elements) noticed that the underlying "driver" is stencil.
While checking https://github.com/vime-js/vime/blob/main/packages/core/src/components/providers/vimeo/vimeo.tsx#L191 noticed that the lifecycle is wrong. Changing it to componentWillLoad
solves the issue.
I would be happy to provide a PR for this since most of the hard part (debugging) is done.
This applies to most provider components, too.
Awesome! Happy to accept a PR @codrin-iftimie :)