@@ -76,7 +76,8 @@ end function
76
76
function setupSubtitle (video , subtitles , subtitle_idx = - 1 ) as integer
77
77
if subtitle_idx = - 1
78
78
' 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
80
81
return - 1
81
82
end if
82
83
@@ -87,10 +88,11 @@ function setupSubtitle(video, subtitles, subtitle_idx = -1) as integer
87
88
88
89
if selectedSubtitle .IsEncoded
89
90
' With encoded subtitles, turn off captions
90
- video .globalCaptionMode = "Off"
91
+ video .captionVisible = False
91
92
else
92
93
' If this is a text-based subtitle, set relevant settings for roku captions
93
- video .globalCaptionMode = "On"
94
+ video .captionVisible = True
95
+
94
96
video .subtitleTrack = video .availableSubtitleTracks [availSubtitleTrackIdx (video , subtitleSelIdx )].TrackName
95
97
end if
96
98
@@ -165,8 +167,9 @@ sub changeSubtitleDuringPlayback(newid)
165
167
video .control = "play"
166
168
else
167
169
' Switching from text to text (or none to text) does not require stopping playback
168
- video .globalCaptionMode = "On"
169
170
video .subtitleTrack = video .availableSubtitleTracks [availSubtitleTrackIdx (video , newid )].TrackName
171
+ video .captionVisible = True
172
+
170
173
end if
171
174
172
175
video .SelectedSubtitle = newid
@@ -177,7 +180,7 @@ sub turnoffSubtitles()
177
180
video = m .scene .focusedChild .focusedChild
178
181
current = video .SelectedSubtitle
179
182
video .SelectedSubtitle = - 1
180
- video .globalCaptionMode = "Off"
183
+ video .captionVisible = False
181
184
m .device .EnableAppFocusEvent (false )
182
185
' Check if Enoded subtitles are being displayed, and turn off
183
186
if current > - 1 and video .Subtitles [current ].IsEncoded
0 commit comments