28 lines
743 B
TypeScript
28 lines
743 B
TypeScript
/**
|
|
* Where the background logic really begins, gets called by app.onReady().
|
|
*
|
|
* Handles authentication. If profile is set, we launch a session, which consis
|
|
* of opening a connection with the platform, initializing the audio streams.
|
|
*
|
|
* The session is primarily an interface between the frontend and the platform,
|
|
* relaying messages from one to the other.
|
|
*
|
|
*/
|
|
|
|
import initIpcMain from "@/ipc/index";
|
|
import { accountAuth } from "./account";
|
|
import createWindow from "./window";
|
|
|
|
|
|
export default async function main() {
|
|
|
|
/* initiate controls for frontend to use when needed */
|
|
initIpcMain();
|
|
|
|
/* launch browser window */
|
|
await createWindow();
|
|
|
|
/* try to authenticate with token */
|
|
await accountAuth();
|
|
|
|
}
|