mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: use correct hls containers for audio
The current container setting was set 4 years ago and does not reflect current browsers. We should prioritize using fmp4 when possible and fallback to mpegts if necessary.
This commit is contained in:
parent
4deaf8411a
commit
be3b321ffb
1 changed files with 5 additions and 1 deletions
|
@ -718,9 +718,13 @@ export default function (options) {
|
|||
const hlsBreakOnNonKeyFrames = browser.iOS || browser.osx || browser.edge || !canPlayNativeHls();
|
||||
|
||||
if (canPlayHls() && browser.enableHlsAudio !== false) {
|
||||
let enableFmp4Hls = userSettings.preferFmp4HlsContainer();
|
||||
if ((browser.safari || browser.tizen || browser.web0s) && !canPlayNativeHlsInFmp4()) {
|
||||
enableFmp4Hls = false;
|
||||
}
|
||||
profile.TranscodingProfiles.push({
|
||||
// hlsjs, edge, and android all seem to require ts container
|
||||
Container: !canPlayNativeHls() || browser.edge || browser.android ? 'ts' : 'aac',
|
||||
Container: enableFmp4Hls ? 'mp4' : 'ts',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'aac',
|
||||
Context: 'Streaming',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue