mirror of
https://github.com/koush/scrypted.git
synced 2026-05-04 21:30:30 +01:00
ring: adts headers, session cleanup
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -25,3 +25,6 @@
|
||||
[submodule "external/scrypted-private"]
|
||||
path = external/private
|
||||
url = ../../koush/scrypted-private
|
||||
[submodule "external/ring-client-api"]
|
||||
path = external/ring-client-api
|
||||
url = https://github.com/dgreif/ring.git
|
||||
|
||||
1
external/ring-client-api
vendored
Submodule
1
external/ring-client-api
vendored
Submodule
Submodule external/ring-client-api added at 8ef25acca6
4
plugins/ring/package-lock.json
generated
4
plugins/ring/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/ring",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/ring",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.7",
|
||||
"dependencies": {
|
||||
"@homebridge/camera-utils": "^2.0.4",
|
||||
"@types/node": "^16.6.1",
|
||||
|
||||
@@ -36,5 +36,5 @@
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.5"
|
||||
"version": "0.0.7"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ class RingCameraDevice extends ScryptedDeviceBase implements Intercom, Camera, V
|
||||
})
|
||||
this.rtpDescription = await sip.start({
|
||||
output: [
|
||||
'-bsf:a', 'aac_adtstoasc',
|
||||
'-flags', '+global_header',
|
||||
'-f', 'mpegts',
|
||||
`tcp://127.0.0.1:${port}`,
|
||||
],
|
||||
@@ -55,7 +57,10 @@ class RingCameraDevice extends ScryptedDeviceBase implements Intercom, Camera, V
|
||||
|
||||
// this is from the consumer
|
||||
const passthrough = await listenZeroSingleClient();
|
||||
passthrough.clientPromise.then(pt => client.pipe(pt));
|
||||
passthrough.clientPromise.then(pt => {
|
||||
client.on('close', () => sip.stop());
|
||||
client.pipe(pt);
|
||||
});
|
||||
|
||||
this.console.log(`sip output port: ${port}, consumer input port ${passthrough.port}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user