feat: animate hovered chapter titles and active seek segments
This commit is contained in:
@@ -193,6 +193,15 @@ struct YouTubeResolverChecks {
|
||||
"missing, null and malformed optional titles do not discard chapters")
|
||||
try require(decoded.chapterBoundaries(duration: 12) == [2.25, 8.75],
|
||||
"chapter edges are sorted, deduplicated and strictly interior")
|
||||
try require(decoded.chapterTitle(at: 0, duration: 12) == "Opening" &&
|
||||
decoded.chapterTitle(at: 2.249, duration: 12) == "Opening" &&
|
||||
decoded.chapterTitle(at: 2.25, duration: 12) == nil &&
|
||||
decoded.chapterTitle(at: 12, duration: 12) == nil,
|
||||
"hover titles include chapter start, exclude its end and never invent missing titles")
|
||||
for duration in [0, -1, 1, Double.nan, .infinity] {
|
||||
try require(decoded.chapterTitle(at: 0.5, duration: duration) == nil,
|
||||
"unknown durations and chapters extending beyond media have no hover title")
|
||||
}
|
||||
|
||||
object["duration"] = 0
|
||||
object["chapters"] = [["start_time": 0, "end_time": 2.25],
|
||||
|
||||
Reference in New Issue
Block a user