Fix mpv initialization on macOS

This commit is contained in:
Arkadiusz Fal 2022-06-07 23:38:09 +02:00
parent 92b420869d
commit 1855a57946

View File

@ -578,6 +578,12 @@ final class PlayerModel: ObservableObject {
avPlayerBackend.switchToMPVOnPipClose = false avPlayerBackend.switchToMPVOnPipClose = false
closePiP() closePiP()
} }
#if os(macOS)
// TODO: initialize mpv on startup on mac
if mpvBackend.client.isNil {
Windows.player.open()
}
#endif
changeActiveBackend(from: .appleAVPlayer, to: .mpv) changeActiveBackend(from: .appleAVPlayer, to: .mpv)
controls.presentingControls = true controls.presentingControls = true
controls.removeTimer() controls.removeTimer()