Skip to content

Commit

Permalink
remove "then" from if statements
Browse files Browse the repository at this point in the history
The project should validate now
  • Loading branch information
jkim2492 committed Jan 30, 2023
1 parent ec1bc7e commit 2b56ed5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/captionTask.brs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end sub
sub fetchCaption()
re = CreateObject("roRegex", "(http.*?\.vtt)", "s")
url = re.match(m.top.url)[0]
if url <> invalid then
if url <> invalid
m.reader.setUrl(url)
text = m.reader.GetToString()
m.captionList = parseVTT(text)
Expand All @@ -30,11 +30,11 @@ end sub

sub updateCaption ()
' Stop updating captions if the video isn't playing
if m.top.playerState = "playing" then
if m.top.playerState = "playing"
m.top.currentPos = m.top.currentPos + 100
tmp = []
for each entry in m.captionList
if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"] then
if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"]
label = CreateObject("roSGNode", "Label")
label.text = entry["text"]
label.font = m.font
Expand Down Expand Up @@ -80,4 +80,4 @@ function parseVTT(text)
end for
end for
return captionList
end function
end function

0 comments on commit 2b56ed5

Please sign in to comment.