-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera.js
94 lines (94 loc) · 3.96 KB
/
camera.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// Shinobi - Open Source Video Management System
// Copyright (C) 2020 Moe Alam, moeiscool
//
// # Supporting Shinobi Development
//
// If you would like to support Shinobi please consider subscribing to a Mobile License :)
// Subscribe : https://licenses.shinobi.video/subscribe?planSubscribe=plan_G31AZ9mknNCa6z
// PayPal : [email protected]
//
const io = new (require('socket.io'))()
//process handlers
const s = require('./libs/process.js')(process,__dirname)
//load extender functions
require('./libs/extenders.js')(s)
//configuration loader
var config = require('./libs/config.js')(s)
//basic functions
require('./libs/basic.js')(s,config)
//language loader
var lang = require('./libs/language.js')(s,config)
//working directories : videos, streams, fileBin..
require('./libs/folders.js')(s,config,lang)
//code test module
// require('./libs/codeTester.js')(s,config,lang)
//get version
require('./libs/version.js')(s,config,lang)
//video processing engine
require('./libs/ffmpeg.js')(s,config,lang, async () => {
//database connection : mysql, sqlite3..
require('./libs/sql.js')(s,config)
//authenticator functions : API, dashboard login..
require('./libs/auth.js')(s,config,lang)
//express web server with ejs
const app = require('./libs/webServer.js')(s,config,lang,io)
//web server routes : page handling..
require('./libs/webServerPaths.js')(s,config,lang,app,io)
//web server routes for streams : streams..
require('./libs/webServerStreamPaths.js')(s,config,lang,app,io)
//web server admin routes : create sub accounts, share monitors, share videos
require('./libs/webServerAdminPaths.js')(s,config,lang,app,io)
//web server superuser routes : create admin accounts and manage system functions
require('./libs/webServerSuperPaths.js')(s,config,lang,app,io)
//websocket connection handlers : login and streams..
require('./libs/socketio.js')(s,config,lang,io)
//user and group functions
require('./libs/user.js')(s,config,lang)
//timelapse functions
require('./libs/timelapse.js')(s,config,lang,app,io)
//fileBin functions
require('./libs/fileBin.js')(s,config,lang,app,io)
//monitor/camera handlers
require('./libs/monitor.js')(s,config,lang)
//event functions : motion, object matrix handler
require('./libs/events.js')(s,config,lang)
//recording functions
require('./libs/videos.js')(s,config,lang)
//plugins : websocket connected services..
require('./libs/plugins.js')(s,config,lang,app,io)
//health : cpu and ram trackers..
require('./libs/health.js')(s,config,lang,io)
//cluster module
require('./libs/childNode.js')(s,config,lang,app,io)
//cloud uploaders : amazon s3, webdav, backblaze b2..
require('./libs/uploaders.js')(s,config,lang,app,io)
//notifiers : discord..
require('./libs/rtmpserver.js')(s,config,lang)
//dropInEvents server (file manipulation to create event trigger)
require('./libs/dropInEvents.js')(s,config,lang,app,io)
//form fields to drive the internals
require('./libs/definitions.js')(s,config,lang,app,io)
//notifiers : discord..
require('./libs/notification.js')(s,config,lang)
//branding functions and config defaults
require('./libs/branding.js')(s,config,lang,app,io)
//custom module loader
require('./libs/customAutoLoad.js')(s,config,lang,app,io)
//scheduling engine
require('./libs/shinobiHub.js')(s,config,lang,app,io)
//onvif, ptz engine
require('./libs/control.js')(s,config,lang,app,io)
//ffprobe, onvif engine
require('./libs/scanners.js')(s,config,lang,app,io)
//scheduling engine
require('./libs/scheduler.js')(s,config,lang,app,io)
//onvif device manager
require('./libs/onvifDeviceManager.js')(s,config,lang,app,io)
//alternate logins
require('./libs/auth/logins.js')(s,config,lang,app)
//on-start actions, daemon(s) starter
await require('./libs/startup.js')(s,config,lang)
//p2p, commander
require('./libs/commander.js')(s,config,lang,app)
})