How to use the @nodegui/nodegui.QMovie function in @nodegui/nodegui

To help you get started, weโ€™ve selected a few @nodegui/nodegui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nodegui / react-nodegui / src / components / AnimatedImage / RNAnimatedImage.ts View on Github external
set buffer(imageBuffer: Buffer) {
      const movie = new QMovie();
      movie.loadFromData(imageBuffer);
      widget.setMovie(movie);
      widget.movie()?.start();
    }
  };
github nodegui / react-nodegui / src / components / AnimatedImage / RNAnimatedImage.ts View on Github external
async function getLoadedQMovie(imageUrlOrPath: string): Promise {
  const movie = new QMovie();
  if (isValidUrl(imageUrlOrPath)) {
    const res = await phin(imageUrlOrPath);
    const imageBuffer = Buffer.from(res.body);
    movie.loadFromData(imageBuffer);
  } else {
    movie.setFileName(imageUrlOrPath);
  }
  return movie;
}