import { PluginFactory } from "./type";

export const StopPlugin: PluginFactory = () => ({
  onBeforeStop(context) {
    const { recorder, connection } = context;
    recorder.stop();
    connection.close();
  },
});
