]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/video-transcoding.ts
Fix build
[github/Chocobozzz/PeerTube.git] / server / lib / video-transcoding.ts
index 44ecf4cc9b5bdc608147c70955d488ca58f51a30..078e85acf236a964c7b7b86b9eb4548f09a3a063 100644 (file)
@@ -59,6 +59,8 @@ async function optimizeOriginalVideofile (video: MVideoWithFile, inputVideoFileA
     const videoOutputPath = getVideoFilePath(video, inputVideoFile)
 
     await onVideoFileTranscoding(video, inputVideoFile, videoTranscodedPath, videoOutputPath)
+
+    return transcodeType
   } catch (err) {
     // Auto destruction...
     video.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', { err }))
@@ -169,13 +171,15 @@ async function generateHlsPlaylistFromTS (options: {
   concatenatedTsFilePath: string
   resolution: VideoResolution
   isPortraitMode: boolean
+  isAAC: boolean
 }) {
   return generateHlsPlaylistCommon({
     video: options.video,
     resolution: options.resolution,
     isPortraitMode: options.isPortraitMode,
     inputPath: options.concatenatedTsFilePath,
-    type: 'hls-from-ts' as 'hls-from-ts'
+    type: 'hls-from-ts' as 'hls-from-ts',
+    isAAC: options.isAAC
   })
 }
 
@@ -234,9 +238,10 @@ async function generateHlsPlaylistCommon (options: {
   inputPath: string
   resolution: VideoResolution
   copyCodecs?: boolean
+  isAAC?: boolean
   isPortraitMode: boolean
 }) {
-  const { type, video, inputPath, resolution, copyCodecs, isPortraitMode } = options
+  const { type, video, inputPath, resolution, copyCodecs, isPortraitMode, isAAC } = options
 
   const baseHlsDirectory = join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid)
   await ensureDir(join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid))
@@ -257,6 +262,8 @@ async function generateHlsPlaylistCommon (options: {
     copyCodecs,
     isPortraitMode,
 
+    isAAC,
+
     hlsPlaylist: {
       videoFilename
     }