staticFile() 不支持远程 URL
如果你收到以下错误信息:
🌐 If you got the following error message:
staticFile() does not support remote URLs. Instead, pass the URL without wrapping it in staticFile().你尝试将远程 URL 传递给 staticFile()。你不需要用 staticFile 封装路径,可以直接传递它:
🌐 You have tried to pass a remote URL to staticFile(). You don't need to wrap the path in staticFile, you can pass it directly:
❌ Remote URL inside staticFile()import {Img ,staticFile } from "remotion"; constMyComp = () => { return <Img src ={staticFile ("https://example.com/image.png")} />; };
相反,:
🌐 Instead, :
✅ Remote URL passed directlyimport {Img } from "remotion"; constMyComp = () => { return <Img src ={"https://example.com/image.png"} />; };
另请参阅
🌐 See also