From 10d0e9edcd0f3143f44ebcfbf0327c9edd7911b9 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Tue, 22 Sep 2020 15:33:53 +0100 Subject: [PATCH] Ensure MaxAudioChannels is set to a string for updated API --- source/VideoPlayer.brs | 2 +- source/utils/deviceCapabilities.brs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.brs index 74221806..90fd427d 100644 --- a/source/VideoPlayer.brs +++ b/source/VideoPlayer.brs @@ -146,7 +146,7 @@ function getTranscodeParameters(meta as object) return { "VideoCodec": "h264", "AudioCodec": audioCodec, - "MaxAudioChannels": audioChannels, + "MaxAudioChannels": StrI(audioChannels), ' Currently Jellyfin server expects this as a string "MediaSourceId": meta.id, "SegmentContainer": "ts", "MinSegments": 1, diff --git a/source/utils/deviceCapabilities.brs b/source/utils/deviceCapabilities.brs index a167a09a..058d9b57 100644 --- a/source/utils/deviceCapabilities.brs +++ b/source/utils/deviceCapabilities.brs @@ -37,7 +37,7 @@ function getDeviceProfile() as object "AudioCodec": "aac", "Context": "Streaming", "Protocol": "http", - "MaxAudioChannels": maxAudioChannels + "MaxAudioChannels": StrI(maxAudioChannels) ' Currently Jellyfin server expects this as a string }, { "Container": "mp3", @@ -45,7 +45,7 @@ function getDeviceProfile() as object "AudioCodec": "mp3", "Context": "Streaming", "Protocol": "http", - "MaxAudioChannels": 2 + "MaxAudioChannels": "2" }, { "Container": "mp3", @@ -53,7 +53,7 @@ function getDeviceProfile() as object "AudioCodec": "mp3", "Context": "Static", "Protocol": "http", - "MaxAudioChannels": 2 + "MaxAudioChannels": "2" }, { "Container": "aac", @@ -61,7 +61,7 @@ function getDeviceProfile() as object "AudioCodec": "aac", "Context": "Static", "Protocol": "http", - "MaxAudioChannels": maxAudioChannels + "MaxAudioChannels": StrI(maxAudioChannels) ' Currently Jellyfin server expects this as a string }, { "Container": "ts", @@ -70,7 +70,7 @@ function getDeviceProfile() as object "VideoCodec": "h264", "Context": "Streaming", "Protocol": "hls", - "MaxAudioChannels": maxAudioChannels, + "MaxAudioChannels": StrI(maxAudioChannels) ' Currently Jellyfin server expects this as a string "MinSegments": "1", "BreakOnNonKeyFrames": true },