switch mpv to mpvkit

This commit is contained in:
amaumene
2023-06-26 13:18:28 +09:00
parent e555b74396
commit e7c1f8116d
113 changed files with 30 additions and 4975 deletions

View File

@@ -6,6 +6,7 @@ import Logging
import MediaPlayer
import Repeat
import SwiftUI
import MPVKit
final class MPVBackend: PlayerBackend {
static var timeUpdateInterval = 0.5
@@ -467,17 +468,6 @@ final class MPVBackend: PlayerBackend {
startClientUpdates()
onFileLoaded = nil
case MPV_EVENT_PAUSE:
DispatchQueue.main.async { [weak self] in self?.handleEndOfFile() }
isPlaying = false
networkStateTimer.start()
case MPV_EVENT_UNPAUSE:
isPlaying = true
isLoadingVideo = false
isSeeking = false
networkStateTimer.start()
case MPV_EVENT_VIDEO_RECONFIG:
model.updateAspectRatio()