mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Minor performance improvement
This commit is contained in:
@@ -342,6 +342,13 @@ final class MPVBackend: PlayerBackend {
|
||||
return
|
||||
}
|
||||
|
||||
#if !os(macOS)
|
||||
guard UIApplication.shared.applicationState != .background else {
|
||||
self.logger.info("not performing controls updates in background")
|
||||
return
|
||||
}
|
||||
#endif
|
||||
|
||||
self.playerTime.currentTime = self.currentTime ?? .zero
|
||||
self.playerTime.duration = self.playerItemDuration ?? .zero
|
||||
}
|
||||
|
Reference in New Issue
Block a user