Skip to content

Commit

Permalink
google-device-access: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 7, 2024
1 parent b320fd4 commit 958442b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/google-device-access/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

{
"scrypted.debugHost": "koushik-ubuntu",
"scrypted.debugHost": "scrypted-server",
}
13 changes: 9 additions & 4 deletions plugins/google-device-access/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,15 @@ class NestCamera extends ScryptedDeviceBase implements Readme, Camera, VideoCame
let streamExtensionToken: string;
let _answerSdp: string;

const options = {
requiresOffer: true,
disableTrickle: true,
};
const answerSession: RTCSignalingSession = {
__proxy_props: {
options,
},
options,
createLocalDescription: async (type: "offer" | "answer", setup: RTCAVSignalingSetup, sendIceCandidate: RTCSignalingSendIceCandidate): Promise<RTCSessionDescriptionInit> => {
if (type !== 'answer')
throw new Error('Google Camera only supports RTC answer');
Expand Down Expand Up @@ -187,10 +195,7 @@ class NestCamera extends ScryptedDeviceBase implements Readme, Camera, VideoCame
},

getOptions: async () => {
return {
requiresOffer: true,
disableTrickle: true,
}
return options;
}
}

Expand Down

0 comments on commit 958442b

Please sign in to comment.