diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.brs index 1403f91d..462231de 100644 --- a/source/VideoPlayer.brs +++ b/source/VideoPlayer.brs @@ -196,10 +196,12 @@ function sortSubtitles(id as string, MediaStreams) prefered_lang = m.user.Configuration.SubtitleLanguagePreference for each stream in MediaStreams if stream.type = "Subtitle" then - 'Documentation lists that srt, ttml, and dfxp can be sideloaded but only srt was working in my testing, - 'forcing srt for all text subtitles - url = Substitute("{0}/Videos/{1}/{2}/Subtitles/{3}/0/", get_url(), dashedid, id, stream.index.tostr()) - url = url + Substitute("Stream.srt?api_key={0}", get_setting("active_user")) + + url = "" + if(stream.DeliveryUrl <> invalid) then + url = buildURL(stream.DeliveryUrl) + end if + stream = { "Track": { "Language" : stream.language, "Description": stream.displaytitle , "TrackName": url }, "IsTextSubtitleStream": stream.IsTextSubtitleStream,