mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
yeah ong idk
This commit is contained in:
parent
7f000a0eca
commit
fcd99e4018
3 changed files with 1 additions and 12 deletions
|
|
@ -15,7 +15,6 @@ class NormalPlayer: AVPlayerViewController {
|
|||
super.viewDidLoad()
|
||||
setupHoldGesture()
|
||||
setupAudioSession()
|
||||
setInitialPlayerRate()
|
||||
}
|
||||
|
||||
private func setupHoldGesture() {
|
||||
|
|
@ -59,11 +58,4 @@ class NormalPlayer: AVPlayerViewController {
|
|||
Logger.shared.log("Failed to set up AVAudioSession: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
private func setInitialPlayerRate() {
|
||||
if UserDefaults.standard.bool(forKey: "rememberPlaySpeed") {
|
||||
let lastPlayedSpeed = UserDefaults.standard.float(forKey: "lastPlayedSpeed")
|
||||
player?.rate = lastPlayedSpeed > 0 ? lastPlayedSpeed : 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,9 +76,6 @@ class VideoPlayerViewController: UIViewController {
|
|||
player?.removeTimeObserver(timeObserverToken)
|
||||
self.timeObserverToken = nil
|
||||
}
|
||||
if let player = player {
|
||||
UserDefaults.standard.set(player.rate, forKey: "lastPlayedSpeed")
|
||||
}
|
||||
}
|
||||
|
||||
func addPeriodicTimeObserver(fullURL: String) {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ struct ModuleAdditionSettingsView: View {
|
|||
let _ = try await moduleManager.addModule(metadataUrl: moduleUrl)
|
||||
DispatchQueue.main.async {
|
||||
isLoading = false
|
||||
DropManager.shared.showDrop(title: "Module Added", subtitle: "clicking it to select it", duration: 2.0, icon: UIImage(systemName:"app.badge.checkmark"))
|
||||
DropManager.shared.showDrop(title: "Module Added", subtitle: "click it to select it", duration: 2.0, icon: UIImage(systemName:"app.badge.checkmark"))
|
||||
self.presentationMode.wrappedValue.dismiss()
|
||||
}
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Reference in a new issue