feat: enrich Miruro URL playback metadata and timeline

This commit is contained in:
2026-10-22 11:39:56 +02:00
parent b9c7d7f73a
commit a1c8314391
7 changed files with 798 additions and 37 deletions
+18
View File
@@ -22,6 +22,11 @@ struct ResolvedPlaybackCheck {
}
static func run() async throws {
PlayerModel.metadataLifecycleCheck()
if CommandLine.arguments[1] == "--metadata-lifecycle" {
print("PASS: metadata lifecycle replacement, A-B-A stale results, and actual-duration changes")
return
}
_ = NSApplication.shared
NSApp.setActivationPolicy(.prohibited)
let input = CommandLine.arguments[1]
@@ -47,6 +52,19 @@ struct ResolvedPlaybackCheck {
}
print("PASS: resolved HLS decodes video/audio and advances")
fflush(stdout)
if input.hasPrefix("https://") {
try await until("descriptive title and measured-duration metadata bands", model: model) {
model.fileName != source.title && !model.visibleIntervals.isEmpty
}
let intervals = model.visibleIntervals
require(intervals.allSatisfy {
$0.start.isFinite && $0.end.isFinite && $0.start >= 0 &&
$0.end > $0.start && $0.end <= model.state.duration
}, "bands use finite in-bounds actual media duration")
require(intervals.filter { $0.kind == .intro }.count <= 1 &&
intervals.filter { $0.kind == .outro }.count <= 1, "at most one band of each kind")
print("PASS: Miruro title '\(model.fileName!)' and \(intervals.count) measured-duration bands")
}
require(model.setPlayback(playing: false), "pause accepted")
try await until("pause acknowledged", model: model) { model.state.status == PLAYER_PAUSED }
require(model.state.can_seek && model.state.duration > 0, "seekable measured duration")