1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-04-25 12:14:46 +02:00

27 lines
450 B
JavaScript
Raw Normal View History

2022-08-04 12:16:52 +08:00
#!/usr/bin/env node
2021-10-22 11:30:20 +08:00
const NodeMediaServer = require('node-media-server');
const config = {
rtmp: {
port: 1935,
chunk_size: 60000,
gop_cache: true,
ping: 30,
2022-08-04 12:16:52 +08:00
ping_timeout: 60,
2021-10-22 11:30:20 +08:00
},
http: {
port: 8000,
2022-08-04 12:16:52 +08:00
allow_origin: '*',
api: true,
2021-10-22 11:30:20 +08:00
},
auth: {
2022-08-04 12:16:52 +08:00
api: true,
api_user: process.env.USERNAME || 'admin',
api_pass: process.env.PASSWORD || 'admin',
2021-10-22 11:30:20 +08:00
},
};
var nms = new NodeMediaServer(config)
nms.run();