Skip to content

Commit

Permalink
address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Sep 25, 2023
1 parent e8c4aa7 commit d4d2486
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/utils/deviceCapabilities.brs
Original file line number Diff line number Diff line change
Expand Up @@ -798,27 +798,27 @@ function getDeviceProfile() as object
end if

' respect user policy in regards to transcoding permission
enableVideoTranscoding = m.global.session.user.policy.EnableVideoPlaybackTranscoding
enableAudioTranscoding = m.global.session.user.policy.EnableAudioPlaybackTranscoding
enableVideoTranscoding = Lcase(m.global.session.user.policy.EnableVideoPlaybackTranscoding)
enableAudioTranscoding = Lcase(m.global.session.user.policy.EnableAudioPlaybackTranscoding)

if enableVideoTranscoding <> invalid and enableAudioTranscoding <> invalid
if enableVideoTranscoding = false and enableAudioTranscoding = false
if isValid(enableVideoTranscoding) and isValid(enableAudioTranscoding)
if not enableVideoTranscoding and not enableAudioTranscoding
' no transcoding allowed
deviceProfile.TranscodingProfiles = []
else if enableVideoTranscoding = false and enableAudioTranscoding = true
else if not enableVideoTranscoding and enableAudioTranscoding
' no video transcoding allowed
newProfile = []
for i = 0 to deviceProfile.TranscodingProfiles.count() - 1
if deviceProfile.TranscodingProfiles[i].Type <> "Video"
if deviceProfile.TranscodingProfiles[i].Type <> "video"
newProfile.push(deviceProfile.TranscodingProfiles[i])
end if
end for
deviceProfile.TranscodingProfiles = newProfile
else if enableVideoTranscoding = true and enableAudioTranscoding = false
else if enableVideoTranscoding and not enableAudioTranscoding
' no audio transcoding allowed
newProfile = []
for i = 0 to deviceProfile.TranscodingProfiles.count() - 1
if deviceProfile.TranscodingProfiles[i].Type <> "Audio"
if deviceProfile.TranscodingProfiles[i].Type <> "audio"
newProfile.push(deviceProfile.TranscodingProfiles[i])
end if
end for
Expand Down

0 comments on commit d4d2486

Please sign in to comment.