Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
set buffer(imageBuffer: Buffer) {
const movie = new QMovie();
movie.loadFromData(imageBuffer);
widget.setMovie(movie);
widget.movie()?.start();
}
};
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;
}