This repository has been archived on 2021-01-16. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-09-20 11:09:15 -05:00
|
|
|
import * as mediaserver from "./server";
|
2019-09-20 13:02:29 -05:00
|
|
|
import * as ircd from "./ircd";
|
2019-09-22 16:33:18 -05:00
|
|
|
import * as db from "./database";
|
|
|
|
|
|
|
|
const mediaconfig: any = {
|
|
|
|
rtmp: {
|
|
|
|
port: 1935,
|
|
|
|
chunk_size: 60000,
|
|
|
|
gop_cache: true,
|
|
|
|
ping: 30,
|
|
|
|
ping_timeout: 60
|
|
|
|
},
|
|
|
|
http: {
|
|
|
|
port:8000,
|
|
|
|
allow_origin: '*',
|
|
|
|
mediaroot: './site'
|
|
|
|
},
|
|
|
|
trans: {
|
|
|
|
ffmpeg: '/usr/bin/ffmpeg',
|
|
|
|
tasks: [
|
|
|
|
{
|
|
|
|
app: 'live',
|
|
|
|
hls: 'true',
|
|
|
|
hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const dbconfig: any = {
|
|
|
|
connectionLimit: 50,
|
|
|
|
host : 'localhost',
|
|
|
|
user : 'satyr',
|
|
|
|
password : 'password',
|
|
|
|
database : 'satyr_db'
|
|
|
|
};
|
2019-09-20 13:02:29 -05:00
|
|
|
|
2019-09-20 11:09:15 -05:00
|
|
|
function boot(): void{
|
2019-09-22 16:33:18 -05:00
|
|
|
db.run(dbconfig);
|
2019-09-20 11:09:15 -05:00
|
|
|
mediaserver.boot(mediaconfig);
|
2019-09-20 13:02:29 -05:00
|
|
|
ircd.boot();
|
2019-09-20 11:09:15 -05:00
|
|
|
}
|
2019-09-22 17:12:49 -05:00
|
|
|
boot();
|
2019-09-20 11:09:15 -05:00
|
|
|
export { boot };
|