fix(ios): currentTime scale

This commit is contained in:
Krzysztof Moch
2024-12-09 13:26:08 +01:00
parent fa4098ae53
commit 237cc6e157

View File

@@ -25,10 +25,14 @@ class HybridVideoPlayer: HybridVideoPlayerSpec {
var currentTime: Double {
set {
player.currentItem?.seek(to: CMTime(seconds: newValue, preferredTimescale: 1000))
player.seek(
to: CMTime(seconds: newValue, preferredTimescale: 1000),
toleranceBefore: .zero,
toleranceAfter: .zero
)
}
get {
Double(player.currentItem?.currentTime().seconds ?? 0)
player.currentTime().seconds
}
}