Add more playback rates for MPV

This commit is contained in:
Arkadiusz Fal
2022-11-10 23:19:34 +01:00
parent a44cce462a
commit 01d8e28d7c
6 changed files with 25 additions and 5 deletions

View File

@@ -92,6 +92,14 @@ final class MPVBackend: PlayerBackend {
internal var controlsUpdates = false
private var timeObserverThrottle = Throttle(interval: 2)
var suggestedPlaybackRates: [Double] {
[0.1, 0.25, 0.3, 0.33, 0.5, 0.67, 0.8, 1, 1.25, 1.5, 1.75, 2, 3, 4]
}
func canPlayAtRate(_ rate: Double) -> Bool {
rate > 0 && rate <= 100
}
var tracks: Int {
client?.tracksCount ?? -1
}