Skip to main content

restartStudio()v4.0.162

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:

You need to be inside the Remotion Studio.


The Studio must be running (no static deployment)



Otherwise, the function will throw.

See also