🎥 Make videos programmatically with React
Merge branch 'puppeteer-support' of github.com:JonnyBurger/remotion into puppeteer-support
Shankhadeep Dey54a18dd18210
diff --cc packages/renderer/src/get-compositions.tsindex a23984cfaa,878a303166..3c16c823de--- a/packages/renderer/src/get-compositions.ts+++ b/packages/renderer/src/get-compositions.ts@@@ -6,18 -6,14 +6,17 @@@ export const getCompositions = asyncwebpackBundle: string): Promise<TCompMetadata[]> => {const executablePath = await getLocalChromiumExecutable();- const browser = await puppeteer.launch({- executablePath,- args: ['--no-sandbox', '--disable-setuid-sandbox'],- });- const page = await browser.newPage();-- await page.goto(`file://${webpackBundle}/index.html?evaluation=true`);- await page.waitForFunction('window.ready === true');- const result = await page.evaluate('window.getStaticCompositions()');- return result as TCompMetadata[];+ try {+ const browser = await puppeteer.launch({+ executablePath,+ args: ['--no-sandbox', '--disable-setuid-sandbox'],+ });+ const page = await browser.newPage();-+ await page.goto(`file://${webpackBundle}/index.html?evaluation=true`);+ await page.waitForFunction('window.ready === true');+ const result = await page.evaluate('window.getStaticCompositions()');+ return result as TCompMetadata[];+ } catch (err) {+ throw new Error('Chrome or Chromium executable path is not working.');+ }};