mime-chat/src/background/run.ts
2021-02-16 17:08:25 -06:00

28 lines
544 B
TypeScript

"use strict";
import { createWindow } from './window';
import { initSession } from './session';
import { initRecorder } from './audio';
let socket = false;
/*
* The main function will be run after electron app is ready.
*/
export async function main() {
// create main window.
await createWindow({
width: 350,
height: 525,
resizable: true
});
// Instantiate socket session with crimata-platorm.
if (!socket) initSession();
socket = true;
// Begin audio stream.
initRecorder();
}