Skip to main content

restartStudio()v4.0.162

MyComp.tsx
import { restartStudio } from "@remotion/studio"; import { useCallback } from "react"; const MyComp: React.FC = () => { const onClick = useCallback(async () => { try { await restartStudio(); console.log("Studio will restart now"); } catch (err) { console.error(err); } }, []); return ( <button type="button" onClick={onClick}> Hello World </button> ); };

要求

🌐 Requirements

为了使用此功能:

🌐 In order to use this function:

你需要在 Remotion Studio 内部。


Studio 必须正在运行(不支持静态部署)



否则,该函数将抛出异常。

🌐 Otherwise, the function will throw.

另请参阅

🌐 See also