restartStudio()v4.0.162
Restarts the Remotion Studio server.
MyComp.tsximport {restartStudio } from "@remotion/studio"; import {useCallback } from "react"; constMyComp :React .FC = () => { constonClick =useCallback (async () => { try { awaitrestartStudio ();console .log ("Studio will restart now"); } catch (err ) {console .error (err ); } }, []); return ( <button type ="button"onClick ={onClick }> Hello World </button > ); };
Requirements
This function is only available in a writable Studio with a running server. It throws outside Studio, in remotion.new, or in a read-only Studio.
Return value
Returns a promise that resolves to an empty object when the server acknowledges the restart request. Studio launches a fresh CLI process on the same port, so package upgrades take effect after restarting. The browser temporarily disconnects while Studio restarts.
Compatibility
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||
Local Studio | ||||||