add duration to onVideoChunkReady data

This commit is contained in:
Rui Rodrigues
2024-07-16 10:46:24 +01:00
parent 694d9cfa8c
commit b006b1e744
2 changed files with 16 additions and 7 deletions

View File

@@ -351,11 +351,15 @@ public final class CameraView: UIView, CameraSessionDelegate {
onInitReady([
"filepath": chunk.url.path,
])
case .data(index: let index):
onVideoChunkReady([
case let .data(index: index, duration: duration):
var data: [String: Any] = [
"filepath": chunk.url.path,
"index": index,
])
]
if let duration {
data["duration"] = duration.seconds
}
onVideoChunkReady(data)
}
}