From 1855a5794665c4a9e78433e6f5b44749b9566d69 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Tue, 7 Jun 2022 23:38:09 +0200 Subject: [PATCH] Fix mpv initialization on macOS --- Model/Player/PlayerModel.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Model/Player/PlayerModel.swift b/Model/Player/PlayerModel.swift index 69f2cd06..5513fdf4 100644 --- a/Model/Player/PlayerModel.swift +++ b/Model/Player/PlayerModel.swift @@ -578,6 +578,12 @@ final class PlayerModel: ObservableObject { avPlayerBackend.switchToMPVOnPipClose = false closePiP() } + #if os(macOS) + // TODO: initialize mpv on startup on mac + if mpvBackend.client.isNil { + Windows.player.open() + } + #endif changeActiveBackend(from: .appleAVPlayer, to: .mpv) controls.presentingControls = true controls.removeTimer()