Shinobi/camera.js

103 lines
4.2 KiB
JavaScript
Raw Normal View History

2018-06-09 23:34:06 +00:00
//
2020-11-17 02:08:24 +00:00
// Shinobi - Open Source Video Management System
2020-08-27 05:18:42 +00:00
// Copyright (C) 2020 Moe Alam, moeiscool
2018-06-09 23:34:06 +00:00
//
2020-11-17 02:08:24 +00:00
// # Supporting Shinobi Development
2018-06-09 23:34:06 +00:00
//
2020-11-17 02:08:24 +00:00
// If you would like to support Shinobi please consider subscribing to a Mobile License :)
// Subscribe : https://licenses.shinobi.video/subscribe?planSubscribe=plan_G31AZ9mknNCa6z
2018-06-09 23:34:06 +00:00
// PayPal : paypal@m03.ca
//
const io = new (require('socket.io').Server)()
2018-09-29 04:04:50 +00:00
//process handlers
2020-11-17 02:08:24 +00:00
const s = require('./libs/process.js')(process,__dirname)
//load extender functions
2020-05-10 00:27:44 +00:00
require('./libs/extenders.js')(s)
2018-09-29 04:04:50 +00:00
//configuration loader
2020-05-10 00:27:44 +00:00
var config = require('./libs/config.js')(s)
//basic functions
2020-05-10 00:27:44 +00:00
require('./libs/basic.js')(s,config)
2018-09-29 04:04:50 +00:00
//language loader
2020-05-10 00:27:44 +00:00
var lang = require('./libs/language.js')(s,config)
2019-08-13 08:07:28 +00:00
//working directories : videos, streams, fileBin..
2020-05-10 00:27:44 +00:00
require('./libs/folders.js')(s,config,lang)
//code test module
2020-11-17 02:08:24 +00:00
// require('./libs/codeTester.js')(s,config,lang)
//get version
2020-05-10 00:27:44 +00:00
require('./libs/version.js')(s,config,lang)
2018-09-29 04:04:50 +00:00
//video processing engine
2020-11-17 02:08:24 +00:00
require('./libs/ffmpeg.js')(s,config,lang, async () => {
//database connection : mysql, sqlite3..
2020-05-10 00:27:44 +00:00
require('./libs/sql.js')(s,config)
//authenticator functions : API, dashboard login..
2020-05-10 00:27:44 +00:00
require('./libs/auth.js')(s,config,lang)
//express web server with ejs
2020-11-17 02:08:24 +00:00
const app = require('./libs/webServer.js')(s,config,lang,io)
2021-11-17 20:10:25 +00:00
//data port
require('./libs/dataPort.js')(s,config,lang,app,io)
2021-11-14 16:38:22 +00:00
//page layout load
require('./libs/definitions.js')(s,config,lang,app,io)
//web server routes : page handling..
2020-05-10 00:27:44 +00:00
require('./libs/webServerPaths.js')(s,config,lang,app,io)
//web server routes for streams : streams..
2020-05-10 00:27:44 +00:00
require('./libs/webServerStreamPaths.js')(s,config,lang,app,io)
2018-10-05 21:19:29 +00:00
//web server admin routes : create sub accounts, share monitors, share videos
2020-05-10 00:27:44 +00:00
require('./libs/webServerAdminPaths.js')(s,config,lang,app,io)
2018-10-05 21:19:29 +00:00
//web server superuser routes : create admin accounts and manage system functions
2020-05-10 00:27:44 +00:00
require('./libs/webServerSuperPaths.js')(s,config,lang,app,io)
//websocket connection handlers : login and streams..
2020-05-10 00:27:44 +00:00
require('./libs/socketio.js')(s,config,lang,io)
//user and group functions
2020-05-10 00:27:44 +00:00
require('./libs/user.js')(s,config,lang)
//timelapse functions
2020-05-10 00:27:44 +00:00
require('./libs/timelapse.js')(s,config,lang,app,io)
//fileBin functions
2020-05-10 00:27:44 +00:00
require('./libs/fileBin.js')(s,config,lang,app,io)
//monitor/camera handlers
2020-05-10 00:27:44 +00:00
require('./libs/monitor.js')(s,config,lang)
//event functions : motion, object matrix handler
2020-05-10 00:27:44 +00:00
require('./libs/events.js')(s,config,lang)
//recording functions
2020-05-10 00:27:44 +00:00
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..
2020-05-10 00:27:44 +00:00
require('./libs/health.js')(s,config,lang,io)
//cluster module
2020-05-10 00:27:44 +00:00
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)
2018-10-02 00:21:48 +00:00
//notifiers : discord..
2020-05-10 00:27:44 +00:00
require('./libs/rtmpserver.js')(s,config,lang)
//dropInEvents server (file manipulation to create event trigger)
2020-05-10 00:27:44 +00:00
require('./libs/dropInEvents.js')(s,config,lang,app,io)
2021-04-27 06:02:26 +00:00
//notifiers : discord..
require('./libs/notification.js')(s,config,lang)
//branding functions and config defaults
2020-05-10 00:27:44 +00:00
require('./libs/branding.js')(s,config,lang,app,io)
//custom module loader
2020-05-10 00:27:44 +00:00
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
2020-05-10 00:27:44 +00:00
require('./libs/scheduler.js')(s,config,lang,app,io)
2020-12-04 04:38:37 +00:00
//onvif device manager
require('./libs/onvifDeviceManager.js')(s,config,lang,app,io)
//alternate logins
require('./libs/auth/logins.js')(s,config,lang,app)
2024-10-06 00:15:22 +00:00
//rally other Shinobi
require('./libs/rally.js')(s,config,lang,app,io)
//on-start actions, daemon(s) starter
await require('./libs/startup.js')(s,config,lang)
//p2p, commander
require('./libs/commander.js')(s,config,lang,app)
2022-08-21 18:16:16 +00:00
//cron
require('./libs/cron.js')(s,config,lang)
2022-11-24 15:59:14 +00:00
//video browser functions
2022-11-24 18:40:43 +00:00
require('./libs/videoBrowser.js')(s,config,lang,app,io)
})