Replace global caption with JF video caption
This commit is contained in:
parent
2fc121fc50
commit
0bee595dc3
|
@ -76,7 +76,8 @@ end function
|
|||
function setupSubtitle(video, subtitles, subtitle_idx = -1) as integer
|
||||
if subtitle_idx = -1
|
||||
' If we are not using text-based subtitles, turn them off
|
||||
video.globalCaptionMode = "Off"
|
||||
' Turn captions on by default
|
||||
video.captionVisible = True
|
||||
return -1
|
||||
end if
|
||||
|
||||
|
@ -87,10 +88,11 @@ function setupSubtitle(video, subtitles, subtitle_idx = -1) as integer
|
|||
|
||||
if selectedSubtitle.IsEncoded
|
||||
' With encoded subtitles, turn off captions
|
||||
video.globalCaptionMode = "Off"
|
||||
video.captionVisible = False
|
||||
else
|
||||
' If this is a text-based subtitle, set relevant settings for roku captions
|
||||
video.globalCaptionMode = "On"
|
||||
video.captionVisible = True
|
||||
|
||||
video.subtitleTrack = video.availableSubtitleTracks[availSubtitleTrackIdx(video, subtitleSelIdx)].TrackName
|
||||
end if
|
||||
|
||||
|
@ -165,8 +167,9 @@ sub changeSubtitleDuringPlayback(newid)
|
|||
video.control = "play"
|
||||
else
|
||||
' Switching from text to text (or none to text) does not require stopping playback
|
||||
video.globalCaptionMode = "On"
|
||||
video.subtitleTrack = video.availableSubtitleTracks[availSubtitleTrackIdx(video, newid)].TrackName
|
||||
video.captionVisible = True
|
||||
|
||||
end if
|
||||
|
||||
video.SelectedSubtitle = newid
|
||||
|
@ -177,7 +180,7 @@ sub turnoffSubtitles()
|
|||
video = m.scene.focusedChild.focusedChild
|
||||
current = video.SelectedSubtitle
|
||||
video.SelectedSubtitle = -1
|
||||
video.globalCaptionMode = "Off"
|
||||
video.captionVisible = False
|
||||
m.device.EnableAppFocusEvent(false)
|
||||
' Check if Enoded subtitles are being displayed, and turn off
|
||||
if current > -1 and video.Subtitles[current].IsEncoded
|
||||
|
|
Loading…
Reference in New Issue
Block a user