Disable Roku subtitles on subtitle load

Disable Roku subtitles on subtitle load

Subtitles are cleared as soon as subtitle track changes
This commit is contained in:
Jinho Kim 2023-02-01 22:16:25 -05:00
parent 0bcb779507
commit 2576162ca0

View File

@ -32,16 +32,22 @@ sub init()
'Captions
m.captionGroup = m.top.findNode("captionGroup")
for i = 1 to 9
m.captionGroup.appendChild(createObject("roSGNode", "LayoutGroup"))
end for
clearCaption()
m.captionTask = createObject("roSGNode", "captionTask")
m.captionTask.observeField("currentCaption", "updateCaption")
m.top.observeField("captionVisible", "toggleCaption")
m.top.observeField("currentSubtitleTrack", "loadCaption")
end sub
sub clearCaption()
for i = 1 to 9
m.captionGroup.appendChild(createObject("roSGNode", "LayoutGroup"))
end for
end sub
sub loadCaption()
m.top.globalCaptionMode = "Off"
clearCaption()
m.captionTask.url = m.top.currentSubtitleTrack
end sub