vime icon indicating copy to clipboard operation
vime copied to clipboard

initialMuted not set in the right lifecycle method

Open codrin-iftimie opened this issue 2 years ago • 1 comments

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.

codrin-iftimie avatar Jul 21 '22 08:07 codrin-iftimie

Awesome! Happy to accept a PR @codrin-iftimie :)

mihar-22 avatar Jul 21 '22 09:07 mihar-22