Require modules.
This commit is contained in:
parent
b9a6da957d
commit
9db61a7190
32
app/main.js
32
app/main.js
|
@ -13,13 +13,14 @@ const uuid = require('uuid')
|
|||
const events = require('events')
|
||||
const async = require('async')
|
||||
const path = require('path')
|
||||
//const digital = require('./lib/digital')
|
||||
const ee = new events.EventEmitter()
|
||||
//const capture = require('./lib/capture')(ee)
|
||||
const settings = require('./lib/settings')
|
||||
|
||||
const Server = require('./lib/server')
|
||||
const Intval = require('./lib/intval')
|
||||
const ee = new events.EventEmitter()
|
||||
//const digital = require('./lib/digital')
|
||||
//const capture = require('./lib/capture')(ee)
|
||||
const settings = require('settings')
|
||||
|
||||
const Server = require('server')
|
||||
const Intval = require('intval')
|
||||
|
||||
const mcopy = {}
|
||||
const log = {}
|
||||
|
@ -37,6 +38,12 @@ let camera
|
|||
let server
|
||||
let menu
|
||||
|
||||
let SYSTEM
|
||||
let capture
|
||||
let display
|
||||
let ffmpeg
|
||||
let ffprobe
|
||||
|
||||
async function delay (ms) {
|
||||
return new Promise(resolve => {
|
||||
return setTimeout(resolve, ms)
|
||||
|
@ -654,8 +661,15 @@ transfer.listen = function () {
|
|||
*/
|
||||
var init = async function () {
|
||||
|
||||
try {
|
||||
SYSTEM = await system();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
createWindow()
|
||||
createMenu()
|
||||
|
||||
log.init()
|
||||
light.init()
|
||||
proj.init()
|
||||
|
@ -663,6 +677,12 @@ var init = async function () {
|
|||
dev.init()
|
||||
|
||||
|
||||
//capture = require('capture')(SYSTEM); //redundant
|
||||
display = require('display')(SYSTEM);
|
||||
ffmpeg = require('ffmpeg')(SYSTEM);
|
||||
ffprobe = require('ffprobe')(SYSTEM);
|
||||
|
||||
|
||||
//transfer.init()
|
||||
//capture.init()
|
||||
|
||||
|
|
Loading…
Reference in New Issue