mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Minor UI changes
This commit is contained in:
@@ -589,5 +589,5 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
func stopControlsUpdates() {}
|
||||
func setNeedsDrawing(_: Bool) {}
|
||||
func setSize(_: Double, _: Double) {}
|
||||
func setNeedsNetworkStateUpdates() {}
|
||||
func setNeedsNetworkStateUpdates(_: Bool) {}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ final class MPVBackend: PlayerBackend {
|
||||
}
|
||||
|
||||
self.controls?.isLoadingVideo = self.isLoadingVideo
|
||||
self.setNeedsNetworkStateUpdates()
|
||||
self.setNeedsNetworkStateUpdates(true)
|
||||
|
||||
if !self.isLoadingVideo {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) { [weak self] in
|
||||
@@ -476,7 +476,11 @@ final class MPVBackend: PlayerBackend {
|
||||
}
|
||||
}
|
||||
|
||||
func setNeedsNetworkStateUpdates() {
|
||||
networkStateTimer.resume()
|
||||
func setNeedsNetworkStateUpdates(_ needsUpdates: Bool) {
|
||||
if needsUpdates {
|
||||
networkStateTimer.resume()
|
||||
} else {
|
||||
networkStateTimer.suspend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ protocol PlayerBackend {
|
||||
func startControlsUpdates()
|
||||
func stopControlsUpdates()
|
||||
|
||||
func setNeedsNetworkStateUpdates()
|
||||
func setNeedsNetworkStateUpdates(_ needsUpdates: Bool)
|
||||
|
||||
func setNeedsDrawing(_ needsDrawing: Bool)
|
||||
func setSize(_ width: Double, _ height: Double)
|
||||
|
Reference in New Issue
Block a user