Merge pull request #1608 from 1hitsong/fixTextSubtitleChange
Fix subtitle selection for subtitles that are not encoded
This commit is contained in:
commit
f4a3c12cb8
|
@ -111,19 +111,20 @@ sub processSubtitleSelection()
|
|||
end if
|
||||
|
||||
if m.selectedSubtitle.IsEncoded
|
||||
' Roku can not natively display these subtitles, so turn off the caption mode on the device
|
||||
m.view.globalCaptionMode = "Off"
|
||||
else
|
||||
' Roku can natively display these subtitles, ensure the caption mode on the device is on
|
||||
m.view.globalCaptionMode = "On"
|
||||
end if
|
||||
|
||||
if m.selectedSubtitle.IsExternal
|
||||
' Roku may rearrange subtitle tracks. Look up track based on name to ensure we get the correct index
|
||||
availableSubtitleTrackIndex = availSubtitleTrackIdx(m.selectedSubtitle.Track.TrackName)
|
||||
if availableSubtitleTrackIndex = -1 then return
|
||||
|
||||
m.view.subtitleTrack = m.view.availableSubtitleTracks[availableSubtitleTrackIndex].TrackName
|
||||
else
|
||||
m.view.selectedSubtitle = m.selectedSubtitle.Index
|
||||
end if
|
||||
|
||||
m.view.selectedSubtitle = m.selectedSubtitle.Index
|
||||
end sub
|
||||
|
||||
' User requested playback info
|
||||
|
|
|
@ -256,6 +256,9 @@ end sub
|
|||
|
||||
' Event handler for when selectedSubtitle changes
|
||||
sub onSubtitleChange()
|
||||
' If the global caption mode is on, that means Roku can display the subtitles natively and doesn't need a video stop/start
|
||||
if LCase(m.top.globalCaptionMode) = "on" then return
|
||||
|
||||
' Save the current video position
|
||||
m.global.queueManager.callFunc("setTopStartingPoint", int(m.top.position) * 10000000&)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user