From: Andrew Gundersen Date: Fri, 5 Feb 2021 15:36:57 +0000 (-0600) Subject: login svg X-Git-Tag: v0.9~100^2~2 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=d8805b127ee2bd0a170b202e190913e6ea937c00;p=mime-chat login svg --- diff --git a/src/background.ts b/src/background.ts index b374d27..cf052e0 100644 --- a/src/background.ts +++ b/src/background.ts @@ -1,7 +1,7 @@ "use strict"; import {initApp} from './background/initApp'; import {Recorder} from './background/recorder'; -// const portAudio = require('naudiodon'); +const portAudio = require('naudiodon'); // NOTE Program Begins Here @@ -9,13 +9,13 @@ import {Recorder} from './background/recorder'; const isDevelopment = process.env.NODE_ENV !== "production"; - // const recorder = new Recorder({ - // channelCount: 1, - // sampleFormat: portAudio.SampleFormat16Bit, - // sampleRate: 16000, - // deviceId: -1, // Use -1 or omit the deviceId to select the default device - // closeOnError: true - // }, 'binary'); + const recorder = new Recorder({ + channelCount: 1, + sampleFormat: portAudio.SampleFormat16Bit, + sampleRate: 16000, + deviceId: -1, // Use -1 or omit the deviceId to select the default device + closeOnError: true + }, 'binary'); try { // await authenticate method diff --git a/src/background/initApp.ts b/src/background/initApp.ts index 89fc68d..4006055 100644 --- a/src/background/initApp.ts +++ b/src/background/initApp.ts @@ -11,10 +11,15 @@ let win: BrowserWindow | null; function createWindow() { // Create the browser window. win = new BrowserWindow({ - width: 450, - height: 1025, + width: 350, + height: 500, resizable: true, + + x: 10, + y: 10, + webPreferences: { + devTools: false, // Use pluginOptions.nodeIntegration, leave this alone // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info nodeIntegration: (process.env diff --git a/src/background/recorder.ts b/src/background/recorder.ts index 2897d69..88a38db 100644 --- a/src/background/recorder.ts +++ b/src/background/recorder.ts @@ -48,7 +48,7 @@ type inputOptions = {clear; export class Recorder implements RecorderI { - private ia: boolean; + private ia: any; private micWritable: StringWritable; private recorderOptions: inputOptions; @@ -91,7 +91,7 @@ export class Recorder implements RecorderI { this.pause(); } - private _update = (Event: boolean, record: boolean) => { + private _update = (Event: any, record: boolean) => { if (record) { console.log('recording'); this.micWritable.data = ''; diff --git a/src/components/login/index.vue b/src/components/login/index.vue index e63c46d..43287ec 100644 --- a/src/components/login/index.vue +++ b/src/components/login/index.vue @@ -1,5 +1,49 @@