X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fhls.ts;h=05be403f33a1dffba37248228a3d3a8143bc0a5e;hb=1f256e7d3cf056c2d999260155cdba58ae1b878b;hp=84539e2c1f5cd00fc7a9bf3e5649b153994e31f6;hpb=903353d67a8d0fdda8465ed6c57b77a9a5afbe92;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 84539e2c1..05be403f3 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts @@ -50,13 +50,12 @@ async function updateMasterHLSPlaylist (video: MVideoWithFile) { let line = `#EXT-X-STREAM-INF:${bandwidth},${resolution}` if (file.fps) line += ',FRAME-RATE=' + file.fps - const videoCodec = await getVideoStreamCodec(videoFilePath) - line += `,CODECS="${videoCodec}` + const codecs = await Promise.all([ + getVideoStreamCodec(videoFilePath), + getAudioStreamCodec(videoFilePath) + ]) - const audioCodec = await getAudioStreamCodec(videoFilePath) - if (audioCodec) line += `,${audioCodec}` - - line += '"' + line += `,CODECS="${codecs.filter(c => !!c).join(',')}"` masterPlaylists.push(line) masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution))