@apocaliss92/scrypted-reolink-native 0.3.13 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/scrypted-reolink-native",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
5
  "author": "@apocaliss92",
6
6
  "license": "Apache",
package/src/camera.ts CHANGED
@@ -2444,13 +2444,16 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2444
2444
 
2445
2445
  // Order streams based on preferredStreams setting
2446
2446
  const preferredOrder = this.storageSettings.values.preferredStreams || 'Default';
2447
- let supportedStreams: any[] = [];
2447
+ let supportedStreams: ReolinkSupportedStream[] = [];
2448
2448
 
2449
2449
  if (preferredOrder === 'Default') {
2450
2450
  // Default: Native -> RTSP -> RTMP
2451
- supportedStreams = [...nativeStreams, ...rtspStreams, ...rtmpStreams];
2452
- // // Default: RTSP -> RTMP -> Native
2453
- // supportedStreams = [...rtspStreams, ...rtmpStreams, ...nativeStreams];
2451
+ // BUT for multifocal cameras without NVR, prefer RTSP -> RTMP -> Native
2452
+ if (this.multiFocalDevice && !this.nvrDevice) {
2453
+ supportedStreams = [...rtspStreams, ...rtmpStreams, ...nativeStreams];
2454
+ } else {
2455
+ supportedStreams = [...nativeStreams, ...rtspStreams, ...rtmpStreams];
2456
+ }
2454
2457
  } else if (preferredOrder === 'Native') {
2455
2458
  supportedStreams = [...nativeStreams, ...rtspStreams, ...rtmpStreams];
2456
2459
  } else if (preferredOrder === 'RTSP') {
@@ -2791,11 +2794,22 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2791
2794
  this.storageSettings.settings.username.defaultValue = parentDevice.storageSettings.values.username;
2792
2795
  this.storageSettings.settings.password.defaultValue = parentDevice.storageSettings.values.password;
2793
2796
  this.storageSettings.settings.ipAddress.defaultValue = parentDevice.storageSettings.values.ipAddress;
2797
+ } else {
2798
+ this.storageSettings.settings.username.hide = false;
2799
+ this.storageSettings.settings.password.hide = false;
2800
+ this.storageSettings.settings.ipAddress.hide = false;
2801
+ this.storageSettings.settings.uid.hide = false;
2794
2802
  }
2795
2803
 
2796
2804
  this.updateVideoClipsAutoLoad();
2797
2805
 
2798
2806
  this.onDeviceEvent(ScryptedInterface.Settings, '');
2807
+
2808
+ try {
2809
+ await this.getVideoStreamOptions();
2810
+ } catch (e) {
2811
+ logger.error('Failed to get video stream options in init', e?.message || String(e));
2812
+ }
2799
2813
  }
2800
2814
 
2801
2815
  async updateSleepingState(sleepStatus: SleepStatus): Promise<void> {