diff --git a/docs/manual.md b/docs/manual.md index b5186434..797cb413 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -1093,11 +1093,11 @@ Cycles the deinterlace property using the following command: Cycles the aspect ratio using the following command: -`cycle-values video-aspect 16:9 4:3 2.35:1 -1` +`cycle-values video-aspect-override 16:9 4:3 2.35:1 0 -1` [cycle-values command](https://mpv.io/manual/master/#command-interface-cycle-values) -[video-aspect property](https://mpv.io/manual/master/#command-interface-video-aspect) +[video-aspect property](https://mpv.io/manual/master/#options-video-aspect-override) ### Audio > Next diff --git a/src/MpvNet.Windows/WinForms/MainForm.cs b/src/MpvNet.Windows/WinForms/MainForm.cs index 4ae34d33..86ac38f2 100644 --- a/src/MpvNet.Windows/WinForms/MainForm.cs +++ b/src/MpvNet.Windows/WinForms/MainForm.cs @@ -1046,11 +1046,12 @@ protected override void WndProc(ref Message m) break; case 0x319: // WM_APPCOMMAND { - string? value = MpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000)); + string? key = MpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000)); + bool inputMediaKeys = Player.GetPropertyBool("input-media-keys"); - if (value != null) + if (key != null && inputMediaKeys) { - Player.Command("keypress " + value); + Player.Command("keypress " + key); m.Result = new IntPtr(1); return; } diff --git a/src/MpvNet/InputHelp.cs b/src/MpvNet/InputHelp.cs index 3d68ab8c..4c75a9b4 100644 --- a/src/MpvNet/InputHelp.cs +++ b/src/MpvNet/InputHelp.cs @@ -79,7 +79,7 @@ public static List GetDefaults() new (_("Video"), _("Take Screenshot"), "async screenshot", "s"), new (_("Video"), _("Take Screenshot without subtitles"), "async screenshot video", "S"), new (_("Video"), _("Toggle Deinterlace"), "cycle deinterlace", "d"), - new (_("Video"), _("Change Aspect Ratio"), "cycle-values video-aspect-override 16:9 4:3 2.35:1 -1", "a"), + new (_("Video"), _("Change Aspect Ratio"), "cycle-values video-aspect-override 16:9 4:3 2.35:1 0 -1", "a"), new (_("Video"), _("Rotate Video"), "cycle-values video-rotate 90 180 270 0", "Ctrl+r"), new (_("Audio"), _("Audio Device")), diff --git a/src/MpvNet/Player.cs b/src/MpvNet/Player.cs index c9ccbce1..e97b8b3e 100644 --- a/src/MpvNet/Player.cs +++ b/src/MpvNet/Player.cs @@ -102,6 +102,7 @@ public void Init(IntPtr formHandle, bool processCommandLine) SetPropertyBool("input-default-bindings", true); SetPropertyBool("input-builtin-bindings", false); + SetPropertyBool("input-media-keys", true); SetPropertyString("media-controls", "yes"); SetPropertyString("idle", "yes");