Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
subtitiles for in
Browse files Browse the repository at this point in the history
  • Loading branch information
VeinGuo committed Jun 17, 2017
1 parent 13a7e3a commit 4c9af72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions VGPlayer/Classes/VGSubtitles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ open class VGSubtitles {
}

public func search(for time: TimeInterval) -> subtitles? {
let result = subtitlesGroups.first(where: { group -> Bool in
var result : subtitles?
for group in self.subtitlesGroups {
if group.start <= time && group.end >= time {
return true
result = group
return result
}
return false
})
}
return result
}

Expand Down

0 comments on commit 4c9af72

Please sign in to comment.