mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
feat(extraction): add audio_ready event emission
- Add EventEmitter to emit audio_ready when extraction completes - Pass sessionId and audioPath in event data - Export audioEvents for Main process orchestrator Refs: S3-06 AC1,AC3,AC7
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const EventEmitter = require('events');
|
||||
const audioEvents = new EventEmitter();
|
||||
|
||||
// Ensure ffmpeg binary is available
|
||||
if (!ffmpegPath) {
|
||||
@@ -75,6 +77,12 @@ module.exports = {
|
||||
progressBar.update(100, { timemark: 'done' });
|
||||
progressBar.stop();
|
||||
console.log(`Extraction completed: ${outputAudioPath}`);
|
||||
|
||||
audioEvents.emit('audio_ready', {
|
||||
sessionId: inputVideoName,
|
||||
audioPath: outputAudioPath
|
||||
});
|
||||
|
||||
resolve();
|
||||
})
|
||||
.on('error', (err) => {
|
||||
@@ -88,6 +96,6 @@ module.exports = {
|
||||
console.log();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
audioEvents: audioEvents
|
||||
}
|
||||
Reference in New Issue
Block a user