aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers
diff options
context:
space:
mode:
authorgnattu <gnattuoc@me.com>2024-04-22 22:31:41 +0800
committergnattu <gnattuoc@me.com>2024-07-17 13:35:59 +0800
commita16d3d488704be5a2e8b528c446f06588831246d (patch)
treedc92c8a5956cc9273bdaaf7a67bb34ca2593bf3c /Jellyfin.Api/Controllers
parente4101128e011c089bad46a524856438154cfbd3d (diff)
Allow clients to send audio container override for HLS
This will improve flexibility due to overcome the complex compatibility situation of HLS Signed-off-by: gnattu <gnattuoc@me.com>
Diffstat (limited to 'Jellyfin.Api/Controllers')
-rw-r--r--Jellyfin.Api/Controllers/UniversalAudioController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/UniversalAudioController.cs b/Jellyfin.Api/Controllers/UniversalAudioController.cs
index 3115c4750..1305d1417 100644
--- a/Jellyfin.Api/Controllers/UniversalAudioController.cs
+++ b/Jellyfin.Api/Controllers/UniversalAudioController.cs
@@ -187,7 +187,8 @@ public class UniversalAudioController : BaseJellyfinApiController
var supportedHlsContainers = new[] { "ts", "mp4" };
// fallback to mpegts if device reports some weird value unsupported by hls
- var segmentContainer = Array.Exists(supportedHlsContainers, element => element == transcodingContainer) ? transcodingContainer : "ts";
+ var requestedSegmentContainer = Array.Exists(supportedHlsContainers, element => element == transcodingContainer) ? transcodingContainer : "ts";
+ var segmentContainer = Array.Exists(supportedHlsContainers, element => element == mediaSource.TranscodingContainer) ? mediaSource.TranscodingContainer : requestedSegmentContainer;
var dynamicHlsRequestDto = new HlsAudioRequestDto
{
Id = itemId,