Skip to content

Commit d5a941b

Browse files
committed
refactor: 편집 영상 return 방식 수정
1 parent 3d00bfc commit d5a941b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/services/trimVideo.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ const trimVideo = async ({ videoId, trimStart, trimEnd }) => {
1010

1111
try {
1212
const stream = bucket.file(originalVideo).createReadStream();
13-
const trimedStream = ffmpeg(stream)
13+
return ffmpeg(stream)
1414
.setStartTime(trimStart)
1515
.duration(trimEnd - trimStart)
1616
.format("webm")
1717
.on("error", () => {
1818
throw createError.InternalServerError(MESSAGES.ERROR.FAILED_EDIT_VIDEO);
19-
});
20-
21-
return trimedStream;
19+
})
20+
.pipe();
2221
} catch (err) {
2322
throw err;
2423
}

0 commit comments

Comments
 (0)