Skip to content

Commit 2b56ed5

Browse files
committed
remove "then" from if statements
The project should validate now
1 parent ec1bc7e commit 2b56ed5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/captionTask.brs

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end sub
1818
sub fetchCaption()
1919
re = CreateObject("roRegex", "(http.*?\.vtt)", "s")
2020
url = re.match(m.top.url)[0]
21-
if url <> invalid then
21+
if url <> invalid
2222
m.reader.setUrl(url)
2323
text = m.reader.GetToString()
2424
m.captionList = parseVTT(text)
@@ -30,11 +30,11 @@ end sub
3030

3131
sub updateCaption ()
3232
' Stop updating captions if the video isn't playing
33-
if m.top.playerState = "playing" then
33+
if m.top.playerState = "playing"
3434
m.top.currentPos = m.top.currentPos + 100
3535
tmp = []
3636
for each entry in m.captionList
37-
if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"] then
37+
if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"]
3838
label = CreateObject("roSGNode", "Label")
3939
label.text = entry["text"]
4040
label.font = m.font
@@ -80,4 +80,4 @@ function parseVTT(text)
8080
end for
8181
end for
8282
return captionList
83-
end function
83+
end function

0 commit comments

Comments
 (0)