mpvnet-player / mpv.net

🎞 mpv.net is a media player for Windows with a modern GUI.
GNU General Public License v2.0
3.58k stars 164 forks source link

How to Send Command #248

Closed subh-kundu closed 3 years ago

subh-kundu commented 3 years ago

Hello sir I can't send any command throw and how to inside the mpv window on my panel please help me out

public void SendCommand(string cmd)
        {
            try
            {
                if (ps != null && ps.HasExited == false)
                {
                    ps.StandardInput.Write(cmd + "\n");
                }
            }
            catch
            {
            }
        }

mympv.zip

stax76 commented 3 years ago

Looking at your code, it seems you want to control a running mpv instance, for that you need to use the JSON IPC, see here:

https://github.com/stax76/wox-mpv-plugin