mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Override mp3 remux container (#5914)
* Override mp3 remux container The server generally filters out invalid containers for HLS in most cases. However, MP3 is a special case because, while it is technically possible and allowed as a codec for fMP4 on the server side, most browsers do not support it. Override the remux container to force MPEG-TS for MP3. The server will still direct play MP3 in an MP3 container. This is useful for supporting universal containers like MKA. * Fix lint Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
45d72f16cc
commit
6e0ad2ed1b
1 changed files with 11 additions and 0 deletions
|
@ -715,6 +715,17 @@ export default function (options) {
|
|||
});
|
||||
|
||||
['opus', 'mp3', 'mp2', 'aac', 'flac', 'alac', 'webma', 'wma', 'wav', 'ogg', 'oga'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||
// Place container overrides before direct profile for remux container override
|
||||
if (audioFormat == 'mp3' && !canPlayMp3VideoAudioInHls) {
|
||||
// mp3 is a special case because it is allowed in hls-fmp4 on the server-side
|
||||
// but not really supported in most browsers
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: 'ts',
|
||||
AudioCodec: 'mp3',
|
||||
Type: 'Audio'
|
||||
});
|
||||
}
|
||||
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue