Browse Source

test NMS server?

master
Rich Brown 2 months ago
parent
commit
ebde97f811
3 changed files with 59 additions and 0 deletions
  1. +31
    -0
      package-lock.json
  2. +1
    -0
      package.json
  3. +27
    -0
      src/index.js

+ 31
- 0
package-lock.json View File

@@ -1451,6 +1451,11 @@
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
},
"basic-auth-connect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz",
"integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -2275,6 +2280,11 @@
}
}
},
"dateformat": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
"integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q=="
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@@ -5584,6 +5594,27 @@
}
}
},
"node-media-server": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/node-media-server/-/node-media-server-2.1.6.tgz",
"integrity": "sha512-hnmQI7nJmtO4iO41RrcZ1mZhkqSmo96lkYLPpMtWaWZ0zKsGd4SXTzV9ukStOW6/52v4XHvqxYRqQKxf9+O2vg==",
"requires": {
"basic-auth-connect": "^1.0.0",
"chalk": "^2.4.2",
"dateformat": "^3.0.3",
"express": "^4.16.4",
"lodash": ">=4.17.13",
"mkdirp": "1.0.3",
"ws": "^5.2.2"
},
"dependencies": {
"mkdirp": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz",
"integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g=="
}
}
},
"node-releases": {
"version": "1.1.50",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.50.tgz",


+ 1
- 0
package.json View File

@@ -32,6 +32,7 @@
"micropub-helper": "^1.6.1",
"multer": "^1.4.2",
"node-fetch": "^2.6.0",
"node-media-server": "^2.1.6",
"nunjucks": "^3.2.1",
"slugify": "^1.4.0"
},


+ 27
- 0
src/index.js View File

@@ -144,3 +144,30 @@ app.listen(PORT, () => console.log(`node-agrregate app listening on ${PORT}.`));
*/
postTemp(); // this is the whitman-weather account on colorshare.club
setInterval(postTemp, 60000 * 60); // then, every hour

/*
* no idea if this will work
*/
const NodeMediaServer = require("node-media-server");

const config = {
rtmp: {
port: 1935,
chunk_size: 60000, // def 60000
gop_cache: false,
ping: 60,
ping_timeout: 30,
},
http: {
port: 5678,
allow_origin: "*",
},
// https: {
// port: 3369,
// key:'./privatekey.pem',
// cert:'./certificate.pem'
// }
};

const nms = new NodeMediaServer(config);
nms.run();

Loading…
Cancel
Save