Add Safe Mode and Peer Connect Key auto check for subscription

- Safe Mode will prevent cameras from starting on app start. Will require user to hit save on the Settings once before they enable.
patrol-onvif-ptz-gamepad
Moe 2024-12-12 11:20:48 -08:00
parent f0b7c6f321
commit 479912357e
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ module.exports = function(s,config,lang,io){
});
const monObj = Object.assign({},monitor,{id : monitor.mid})
await s.camera('stop',monObj);
await s.camera(monitor.mode,monObj);
if(!config.safeMode)await s.camera(monitor.mode,monObj);
checkAnother()
},1000)
}else{
@ -420,7 +420,7 @@ module.exports = function(s,config,lang,io){
setTimeout(async () => {
await checkForStaticUsers()
//check for subscription
checkSubscription(config.subscriptionId,function(hasSubcribed){
checkSubscription(config.subscriptionId || config.peerConnectKey || config.p2pApiKey, function(hasSubcribed){
config.userHasSubscribed = hasSubcribed
//check terminal commander
checkForTerminalCommands(function(){