dashcam 1.3.3-beta → 1.3.4-beta
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/bin/dashcam.js +5 -4
- package/lib/recorder.js +5 -3
- package/package.json +1 -1
package/bin/dashcam.js
CHANGED
|
@@ -117,6 +117,11 @@ async function recordingAction(options, command) {
|
|
|
117
117
|
log('Starting recording in background...');
|
|
118
118
|
|
|
119
119
|
try {
|
|
120
|
+
|
|
121
|
+
const timeoutPromise = new Promise((_, reject) =>
|
|
122
|
+
setTimeout(() => reject(new Error('Recording start timed out after 10 seconds')), 10000)
|
|
123
|
+
);
|
|
124
|
+
|
|
120
125
|
// Add timeout to prevent hanging
|
|
121
126
|
const startRecordingPromise = processManager.startRecording({
|
|
122
127
|
fps: parseInt(options.fps) || 30,
|
|
@@ -127,10 +132,6 @@ async function recordingAction(options, command) {
|
|
|
127
132
|
project: options.project || options.k // Support both -p and -k for project
|
|
128
133
|
});
|
|
129
134
|
|
|
130
|
-
const timeoutPromise = new Promise((_, reject) =>
|
|
131
|
-
setTimeout(() => reject(new Error('Recording start timed out after 10 seconds')), 10000)
|
|
132
|
-
);
|
|
133
|
-
|
|
134
135
|
const result = await Promise.race([startRecordingPromise, timeoutPromise]);
|
|
135
136
|
|
|
136
137
|
log(`✅ Recording started successfully (PID: ${result.pid})`);
|
package/lib/recorder.js
CHANGED
|
@@ -430,16 +430,18 @@ export async function startRecording({
|
|
|
430
430
|
logger.debug('Starting application tracking...');
|
|
431
431
|
applicationTracker.start();
|
|
432
432
|
|
|
433
|
-
// Start log tracking for this recording
|
|
433
|
+
// Start log tracking for this recording (don't await to avoid blocking)
|
|
434
434
|
const recorderId = path.basename(outputPath).replace('.webm', '');
|
|
435
435
|
logger.debug('Starting log tracking...', { recorderId });
|
|
436
|
-
|
|
436
|
+
logsTrackerManager.startNew({
|
|
437
437
|
recorderId,
|
|
438
438
|
screenId: '1', // Default screen ID for CLI
|
|
439
439
|
directory: path.dirname(outputPath)
|
|
440
|
+
}).catch(error => {
|
|
441
|
+
logger.warn('Failed to start log tracking', { error: error.message });
|
|
440
442
|
});
|
|
441
443
|
|
|
442
|
-
// Set recording start time
|
|
444
|
+
// Set recording start time immediately
|
|
443
445
|
// This ensures the timeline starts when the tracker is ready to capture events
|
|
444
446
|
recordingStartTime = Date.now();
|
|
445
447
|
logger.info('Recording timeline started', {
|