Merge pull request #247 from neilsb/no-audio-videos
Handle videos with no audio track
This commit is contained in:
commit
14fcee4a0b
|
@ -130,7 +130,7 @@ function VideoContent(video) as object
|
|||
end function
|
||||
|
||||
function getTranscodeParameters(meta as object)
|
||||
if decodeAudioSupported(meta) then
|
||||
if decodeAudioSupported(meta) and meta.json.MediaStreams[1] <> invalid and meta.json.MediaStreams[1].Type = "Audio" then
|
||||
audioCodec = meta.json.MediaStreams[1].codec
|
||||
audioChannels = meta.json.MediaStreams[1].channels
|
||||
else
|
||||
|
@ -221,6 +221,10 @@ function directPlaySupported(meta as object) as boolean
|
|||
end function
|
||||
|
||||
function decodeAudioSupported(meta as object) as boolean
|
||||
|
||||
'Check for missing audio and allow playing
|
||||
if meta.json.MediaStreams[1] = invalid or meta.json.MediaStreams[1].Type <> "Audio" then return true
|
||||
|
||||
devinfo = CreateObject("roDeviceInfo")
|
||||
codec = meta.json.MediaStreams[1].codec
|
||||
streamInfo = { Codec: codec, ChCnt: meta.json.MediaStreams[1].channels }
|
||||
|
|
Loading…
Reference in New Issue
Block a user