Skip to content

Commit 0bee595

Browse files
committed
Replace global caption with JF video caption
1 parent 2fc121f commit 0bee595

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

source/utils/Subtitles.brs

+8-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ end function
7676
function setupSubtitle(video, subtitles, subtitle_idx = -1) as integer
7777
if subtitle_idx = -1
7878
' If we are not using text-based subtitles, turn them off
79-
video.globalCaptionMode = "Off"
79+
' Turn captions on by default
80+
video.captionVisible = True
8081
return -1
8182
end if
8283

@@ -87,10 +88,11 @@ function setupSubtitle(video, subtitles, subtitle_idx = -1) as integer
8788

8889
if selectedSubtitle.IsEncoded
8990
' With encoded subtitles, turn off captions
90-
video.globalCaptionMode = "Off"
91+
video.captionVisible = False
9192
else
9293
' If this is a text-based subtitle, set relevant settings for roku captions
93-
video.globalCaptionMode = "On"
94+
video.captionVisible = True
95+
9496
video.subtitleTrack = video.availableSubtitleTracks[availSubtitleTrackIdx(video, subtitleSelIdx)].TrackName
9597
end if
9698

@@ -165,8 +167,9 @@ sub changeSubtitleDuringPlayback(newid)
165167
video.control = "play"
166168
else
167169
' Switching from text to text (or none to text) does not require stopping playback
168-
video.globalCaptionMode = "On"
169170
video.subtitleTrack = video.availableSubtitleTracks[availSubtitleTrackIdx(video, newid)].TrackName
171+
video.captionVisible = True
172+
170173
end if
171174

172175
video.SelectedSubtitle = newid
@@ -177,7 +180,7 @@ sub turnoffSubtitles()
177180
video = m.scene.focusedChild.focusedChild
178181
current = video.SelectedSubtitle
179182
video.SelectedSubtitle = -1
180-
video.globalCaptionMode = "Off"
183+
video.captionVisible = False
181184
m.device.EnableAppFocusEvent(false)
182185
' Check if Enoded subtitles are being displayed, and turn off
183186
if current > -1 and video.Subtitles[current].IsEncoded

0 commit comments

Comments
 (0)