π₯ Make videos programmatically with React
new article: The source provided could not be parsed as a value list
Jonny Burgerf81fbbbcb276
diff --git a/packages/docs/docs/troubleshooting/could-not-be-parsed-as-a-value-list.md b/packages/docs/docs/troubleshooting/could-not-be-parsed-as-a-value-list.mdnew file mode 100644index 0000000000..13c0b29088--- /dev/null+++ b/packages/docs/docs/troubleshooting/could-not-be-parsed-as-a-value-list.md@@ -0,0 +1,26 @@+---+image: /generated/articles-docs-troubleshooting-could-not-be-parsed-as-a-value-list.png+sidebar_label: Source could not be parsed+title: The source provided could not be parsed as a value list+crumb: "Browser quirks"+---++The following error message:++```+The source provided ([...]) could not be parsed as a value list.+```++can happen when the wrong syntax is passed to the `FontFace` API.++Older versions on Chrome, including Chrome 104 which runs in Remotion Lambda does not support the FontFace syntax without quotes.++```txt title="β Without quotes"+src: url(font.woff2) format(woff2);+```++```txt title="β With quotes"+src: url('font.woff2') format('woff2');+```++To fix the issue, always include quotes.diff --git a/packages/docs/docs/using-fonts.md b/packages/docs/docs/using-fonts.mdindex ace62c3e51..35b0144cda 100644--- a/packages/docs/docs/using-fonts.md+++ b/packages/docs/docs/using-fonts.md@@ -55,7 +55,7 @@ import { continueRender, delayRender, staticFile } from "remotion";const waitForFont = delayRender();const font = new FontFace(`Bangers`,- `url(${staticFile("bangers.woff2")}) format('woff2')`+ `url('${staticFile("bangers.woff2")}') format('woff2')`);font@@ -67,6 +67,10 @@ font.catch((err) => console.log("Error loading font", err));```+:::note+Make sure to include quotes [around the URL](/docs/troubleshooting/could-not-be-parsed-as-a-value-list)+:::+The font is now available for use:```tsx twoslash title="MyComp.tsx"diff --git a/packages/docs/render-cards.mjs b/packages/docs/render-cards.mjsindex 1a59c32eff..8260017d2a 100644--- a/packages/docs/render-cards.mjs+++ b/packages/docs/render-cards.mjs@@ -78,12 +78,18 @@ const compositions = await getCompositions(serveUrl);for (const composition of compositions.filter((c) => c.id.startsWith("expert") || c.id.startsWith("template"))) {- await renderStill({- composition,- output: `static/generated/${composition.id}.png`,- serveUrl,- });- console.log("Rendered", composition.id);+ const output = `static/generated/${composition.id}.png`;+ if (fs.existsSync(output)) {+ console.log("Existed", composition.id);+ continue;+ } else {+ await renderStill({+ composition,+ output,+ serveUrl,+ });+ console.log("Rendered", composition.id);+ }}for (const entry of data) {diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 31a03f5dd3..f5d1377ffe 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -465,6 +465,7 @@ module.exports = {"troubleshooting/rosetta","troubleshooting/loading-root-component","troubleshooting/defaultprops-too-big",+ "troubleshooting/could-not-be-parsed-as-a-value-list",],},{diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex d07bd0aad4..972fd0d595 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -1933,6 +1933,13 @@ export const articles = [compId: "articles-docs-troubleshooting-background-image",crumb: "Common mistakes",},+ {+ id: "troubleshooting/could-not-be-parsed-as-a-value-list",+ title: "The source provided could not be parsed as a value list",+ relativePath: "docs/troubleshooting/could-not-be-parsed-as-a-value-list.md",+ compId: "articles-docs-troubleshooting-could-not-be-parsed-as-a-value-list",+ crumb: "Browser quirks",+ },{id: "defaultprops-too-big",title: "defaultProps too big - could not serialize",diff --git a/packages/docs/static/generated/articles-docs-troubleshooting-could-not-be-parsed-as-a-value-list.png b/packages/docs/static/generated/articles-docs-troubleshooting-could-not-be-parsed-as-a-value-list.pngnew file mode 100644index 0000000000..678f311c2fBinary files /dev/null and b/packages/docs/static/generated/articles-docs-troubleshooting-could-not-be-parsed-as-a-value-list.png differ