diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-31 13:49:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-07-31 13:49:36 +0200 |
commit | d7b1c7b4f1a9099eac61f944249f2cdb4f94415e (patch) | |
tree | 9acec4a197d5aee0ff6b0b9cf59ac15f13a8c800 /server/lib/hls.ts | |
parent | 805d6a354bd51fccd434c0c1b1df69c81bb90dd4 (diff) | |
download | PeerTube-d7b1c7b4f1a9099eac61f944249f2cdb4f94415e.tar.gz PeerTube-d7b1c7b4f1a9099eac61f944249f2cdb4f94415e.tar.zst PeerTube-d7b1c7b4f1a9099eac61f944249f2cdb4f94415e.zip |
Fix video only HLS on ios
Diffstat (limited to 'server/lib/hls.ts')
-rw-r--r-- | server/lib/hls.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 60bb3ab7e..76380b1f2 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts | |||
@@ -50,9 +50,13 @@ async function updateMasterHLSPlaylist (video: MVideoWithFile) { | |||
50 | let line = `#EXT-X-STREAM-INF:${bandwidth},${resolution}` | 50 | let line = `#EXT-X-STREAM-INF:${bandwidth},${resolution}` |
51 | if (file.fps) line += ',FRAME-RATE=' + file.fps | 51 | if (file.fps) line += ',FRAME-RATE=' + file.fps |
52 | 52 | ||
53 | const audioCodec = await getAudioStreamCodec(videoFilePath) | ||
54 | const videoCodec = await getVideoStreamCodec(videoFilePath) | 53 | const videoCodec = await getVideoStreamCodec(videoFilePath) |
55 | line += `,CODECS="${videoCodec},${audioCodec}"` | 54 | line += `,CODECS="${videoCodec}` |
55 | |||
56 | const audioCodec = await getAudioStreamCodec(videoFilePath) | ||
57 | if (audioCodec) line += `,${audioCodec}` | ||
58 | |||
59 | line += '"' | ||
56 | 60 | ||
57 | masterPlaylists.push(line) | 61 | masterPlaylists.push(line) |
58 | masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) | 62 | masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) |