Skip to content

Commit 2576162

Browse files
committed
Disable Roku subtitles on subtitle load
Disable Roku subtitles on subtitle load Subtitles are cleared as soon as subtitle track changes
1 parent 0bcb779 commit 2576162

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

components/JFVideo.brs

+9-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,22 @@ sub init()
3232

3333
'Captions
3434
m.captionGroup = m.top.findNode("captionGroup")
35-
for i = 1 to 9
36-
m.captionGroup.appendChild(createObject("roSGNode", "LayoutGroup"))
37-
end for
35+
clearCaption()
3836
m.captionTask = createObject("roSGNode", "captionTask")
3937
m.captionTask.observeField("currentCaption", "updateCaption")
4038
m.top.observeField("captionVisible", "toggleCaption")
4139
m.top.observeField("currentSubtitleTrack", "loadCaption")
4240
end sub
4341

42+
sub clearCaption()
43+
for i = 1 to 9
44+
m.captionGroup.appendChild(createObject("roSGNode", "LayoutGroup"))
45+
end for
46+
end sub
47+
4448
sub loadCaption()
49+
m.top.globalCaptionMode = "Off"
50+
clearCaption()
4551
m.captionTask.url = m.top.currentSubtitleTrack
4652
end sub
4753

0 commit comments

Comments
 (0)