remove "then" from if statements
The project should validate now
This commit is contained in:
parent
ec1bc7e0a0
commit
2b56ed5f8e
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -80,4 +80,4 @@ function parseVTT(text)
|
|||
end for
|
||||
end for
|
||||
return captionList
|
||||
end function
|
||||
end function
|
||||
|
|
Loading…
Reference in New Issue
Block a user