@apocaliss92/scrypted-reolink-native 0.2.11 → 0.2.12
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/main.nodejs.js +1 -1
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/camera.ts +4 -4
- package/src/utils.ts +6 -6
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/camera.ts
CHANGED
|
@@ -1162,17 +1162,17 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
1162
1162
|
const useNvr = clipsSource === "NVR" && this.nvrDevice && fileId.includes('/');
|
|
1163
1163
|
|
|
1164
1164
|
if (useNvr) {
|
|
1165
|
-
logger.debug(`[getVideoClipRtmpUrl] Using NVR API for fileId="${fileId}", forThumbnail=${forThumbnail}`);
|
|
1165
|
+
// logger.debug(`[getVideoClipRtmpUrl] Using NVR API for fileId="${fileId}", forThumbnail=${forThumbnail}`);
|
|
1166
1166
|
const api = await this.ensureClient();
|
|
1167
1167
|
const channel = this.storageSettings.values.rtspChannel ?? 0;
|
|
1168
1168
|
|
|
1169
1169
|
try {
|
|
1170
|
-
logger.debug(`[getVideoClipRtmpUrl] Trying getVodUrl with Download requestType...`);
|
|
1170
|
+
// logger.debug(`[getVideoClipRtmpUrl] Trying getVodUrl with Download requestType...`);
|
|
1171
1171
|
const url = await api.getVodUrl(fileId, channel, {
|
|
1172
1172
|
requestType: "Download",
|
|
1173
1173
|
streamType: "main",
|
|
1174
1174
|
});
|
|
1175
|
-
logger.debug(`[getVideoClipRtmpUrl] NVR getVodUrl Download URL received: url="${url || 'none'}"`);
|
|
1175
|
+
// logger.debug(`[getVideoClipRtmpUrl] NVR getVodUrl Download URL received: url="${url || 'none'}"`);
|
|
1176
1176
|
if (url) return url;
|
|
1177
1177
|
} catch (e: any) {
|
|
1178
1178
|
logger.error(`[getVideoClipRtmpUrl] getVodUrl Download failed: ${e?.message || String(e)}`);
|
|
@@ -1181,7 +1181,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
1181
1181
|
throw new Error(`No streaming URL found from NVR for file ${fileId} after trying Playback and Download methods`);
|
|
1182
1182
|
} else {
|
|
1183
1183
|
// Camera standalone: DEVE usare RTMP da Baichuan API
|
|
1184
|
-
logger.debug(`[getVideoClipRtmpUrl] Getting RTMP URL from Baichuan API for fileId="${fileId}" (camera standalone)`);
|
|
1184
|
+
// logger.debug(`[getVideoClipRtmpUrl] Getting RTMP URL from Baichuan API for fileId="${fileId}" (camera standalone)`);
|
|
1185
1185
|
const api = await this.ensureClient();
|
|
1186
1186
|
const result = await api.getRecordingPlaybackUrls({
|
|
1187
1187
|
fileName: fileId,
|
package/src/utils.ts
CHANGED
|
@@ -198,11 +198,11 @@ export async function recordingFileToVideoClip(
|
|
|
198
198
|
let videoHref: string | undefined = providedVideoHref;
|
|
199
199
|
let thumbnailHref: string | undefined;
|
|
200
200
|
|
|
201
|
-
logger?.debug(`[recordingFileToVideoClip] URL generation: useWebhook=${useWebhook}, hasPlugin=${!!plugin}, deviceId=${deviceId}, providedVideoHref=${providedVideoHref || 'none'}, hasApi=${!!api}`);
|
|
201
|
+
// logger?.debug(`[recordingFileToVideoClip] URL generation: useWebhook=${useWebhook}, hasPlugin=${!!plugin}, deviceId=${deviceId}, providedVideoHref=${providedVideoHref || 'none'}, hasApi=${!!api}`);
|
|
202
202
|
|
|
203
203
|
// If webhook is enabled, generate webhook URLs
|
|
204
204
|
if (useWebhook && plugin && deviceId) {
|
|
205
|
-
logger?.debug(`[recordingFileToVideoClip] Generating webhook URLs for fileId=${id}`);
|
|
205
|
+
// logger?.debug(`[recordingFileToVideoClip] Generating webhook URLs for fileId=${id}`);
|
|
206
206
|
try {
|
|
207
207
|
const { videoUrl, thumbnailUrl } = await getVideoClipWebhookUrls({
|
|
208
208
|
deviceId,
|
|
@@ -212,24 +212,24 @@ export async function recordingFileToVideoClip(
|
|
|
212
212
|
});
|
|
213
213
|
videoHref = videoUrl;
|
|
214
214
|
thumbnailHref = thumbnailUrl;
|
|
215
|
-
logger?.debug(`[recordingFileToVideoClip] Webhook URLs generated successfully: videoHref="${videoHref}", thumbnailHref="${thumbnailHref}"`);
|
|
215
|
+
// logger?.debug(`[recordingFileToVideoClip] Webhook URLs generated successfully: videoHref="${videoHref}", thumbnailHref="${thumbnailHref}"`);
|
|
216
216
|
} catch (e) {
|
|
217
217
|
logger?.error(`[recordingFileToVideoClip] Failed to generate webhook URLs for fileId=${id}:`, e?.message || String(e));
|
|
218
218
|
}
|
|
219
219
|
} else if (!videoHref && api) {
|
|
220
220
|
// Fallback to direct RTMP URL if webhook is not used
|
|
221
|
-
logger?.debug(`[recordingFileToVideoClip] Fetching RTMP playback URL for fileName=${rec.fileName}`);
|
|
221
|
+
// logger?.debug(`[recordingFileToVideoClip] Fetching RTMP playback URL for fileName=${rec.fileName}`);
|
|
222
222
|
try {
|
|
223
223
|
const { rtmpVodUrl } = await api.getRecordingPlaybackUrls({
|
|
224
224
|
fileName: rec.fileName,
|
|
225
225
|
});
|
|
226
226
|
videoHref = rtmpVodUrl;
|
|
227
|
-
logger?.debug(`[recordingFileToVideoClip] RTMP URL fetched successfully: videoHref="${videoHref}"`);
|
|
227
|
+
// logger?.debug(`[recordingFileToVideoClip] RTMP URL fetched successfully: videoHref="${videoHref}"`);
|
|
228
228
|
} catch (e) {
|
|
229
229
|
logger?.debug(`[recordingFileToVideoClip] Failed to build playback URL for recording fileName=${rec.fileName}:`, e?.message || String(e));
|
|
230
230
|
}
|
|
231
231
|
} else {
|
|
232
|
-
logger?.debug(`[recordingFileToVideoClip] No URL generation: useWebhook=${useWebhook}, hasPlugin=${!!plugin}, deviceId=${deviceId}, providedVideoHref=${providedVideoHref || 'none'}, hasApi=${!!api}`);
|
|
232
|
+
// logger?.debug(`[recordingFileToVideoClip] No URL generation: useWebhook=${useWebhook}, hasPlugin=${!!plugin}, deviceId=${deviceId}, providedVideoHref=${providedVideoHref || 'none'}, hasApi=${!!api}`);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
const description = ('name' in rec && typeof rec.name === 'string' && rec.name) ? rec.name : (rec.fileName ?? rec.id ?? '');
|