From 2576162ca079dbb5198f51d35beacb317bea4c12 Mon Sep 17 00:00:00 2001 From: Jinho Kim <54465744+jkim2492@users.noreply.github.com> Date: Wed, 1 Feb 2023 22:16:25 -0500 Subject: [PATCH] Disable Roku subtitles on subtitle load Disable Roku subtitles on subtitle load Subtitles are cleared as soon as subtitle track changes --- components/JFVideo.brs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/JFVideo.brs b/components/JFVideo.brs index c652d18d..69270493 100644 --- a/components/JFVideo.brs +++ b/components/JFVideo.brs @@ -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