hudec117 / Mpv.NET-lib-

.NET embeddable video/media player based on mpv for WinForms and WPF
MIT License
138 stars 36 forks source link

How can I use config file with MpvPlayer #17

Closed Fantoom closed 5 years ago

Fantoom commented 5 years ago

I have added

        public void LoadConfig(string absolutePath) 
    {
        mpv.LoadConfigFile(absolutePath);
    }

to Mpv.NET.Player.MpvPlayer and it worked.

hudec117 commented 5 years ago

Hello @Fantoom,

I will include this feature in the next release of Mpv.NET. In the meantime, a workaround that does not require re-compilation of the latest release is:

player.API.LoadConfigFile("my/absolute/path/to/config");

The "API" property on the player is a reference to an instance of the "Mpv" class that is being used by the player.