File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,22 @@ sub init()
32
32
33
33
'Captions
34
34
m .captionGroup = m .top .findNode ("captionGroup" )
35
- for i = 1 to 9
36
- m .captionGroup .appendChild (createObject ("roSGNode " , "LayoutGroup" ))
37
- end for
35
+ clearCaption ()
38
36
m .captionTask = createObject ("roSGNode " , "captionTask" )
39
37
m .captionTask .observeField ("currentCaption" , "updateCaption" )
40
38
m .top .observeField ("captionVisible" , "toggleCaption" )
41
39
m .top .observeField ("currentSubtitleTrack" , "loadCaption" )
42
40
end sub
43
41
42
+ sub clearCaption ()
43
+ for i = 1 to 9
44
+ m .captionGroup .appendChild (createObject ("roSGNode " , "LayoutGroup" ))
45
+ end for
46
+ end sub
47
+
44
48
sub loadCaption ()
49
+ m .top .globalCaptionMode = "Off"
50
+ clearCaption ()
45
51
m .captionTask .url = m .top .currentSubtitleTrack
46
52
end sub
47
53
You can’t perform that action at this time.
0 commit comments