addBundleToSandbox()v4.0.426
warning
实验性包:我们保留在本通知取消之前,为了纠正糟糕的设计决策而进行重大更改的权利。
将你的 Remotion 包复制到沙箱中。在 createSandbox() 之后调用此操作以添加你的包文件。
🌐 Copies your Remotion bundle into a sandbox. Call this after createSandbox() to add your bundle files.
示例
🌐 Example
create-snapshot.tsconstsandbox = awaitcreateSandbox (); awaitaddBundleToSandbox ({sandbox ,bundleDir : '/path/to/bundle', }); // ... use the sandbox awaitsandbox .stop ();
参数
🌐 Arguments
一个具有以下属性的对象:
🌐 An object with the following properties:
sandbox
一个 Sandbox 实例,通常从 createSandbox() 获取。
🌐 A Sandbox instance, typically obtained from createSandbox().
bundleDir
你的 Remotion 打包目录路径,相对于当前工作目录。
可以使用 npx remotion bundle 命令创建打包,或使用 bundle() API 创建打包。
🌐 The path to your Remotion bundle directory, relative to the current working directory.
A bundle can be created using the npx remotion bundle command, or using the bundle() API.
返回值
🌐 Return value
Promise<void> — 当打包包已被复制到沙箱中时解决。
另请参阅
🌐 See also