Unable to receive mouse events using LibVlcSharp.WPF
Summary
Unable to receive mouse events using LibVlcSharp.WPF.
Minimal project and steps to reproduce
While using code from the provided samples, I am unable to receive mouse events using the LibVlcSharp.WPF library. I am able to acknowledge the control is receiving the mouse double click event by calling _mediaPlayer.EnableMouseInput = true in the code then monitoring the log file using:
_libVLC = new LibVLC("--verbose=2"); libVLC.Log += (, args) => { string message = $"libVlc : {args.Level} {args.Message} @ {args.Module}"; System.Diagnostics.Debug.WriteLine(message); };
Which results in the following VLC output acknowledging the mouse double click event:
libVlc : Debug VoutDisplayEvent 'mouse button' 0 t=8 @ main libVlc : Debug VoutDisplayEvent 'mouse button' 0 t=9 @ main libVlc : Debug VoutDisplayEvent 'double click' @ main libVlc : Debug VoutDisplayEvent 'fullscreen' 1 @ main libVlc : Warning unsupported control query 2 @ drawable libVlc : Error Failed to set fullscreen @ main
Since VLC is unable to provide fullscreen support, which is my ultimate goal, I change the call to _mediaPlayer.EnableMouseInput = false and and a mouse double click event handler using videoView.MouseDoubleClick += videoView_MouseDoubleClick.
Double clicking the VLC control during playback no longer shows the error message regarding fullscreen, but the mouse double click event is not fired and the handler is not invoked.
The result is no way to invoke fullscreen playback automatically or by manually handling the mouse double click event.
Sample WPF vlcTestApp.zip application based on .NET 4.7.2 and LibVlcSharp attached.
Any help is greatly appreciated.
What is the current bug behavior?
No mouse double click event invoked.
What is the expected correct behavior?
Mouse double click event to be invoked when _mediaPlayer.EnableMouseInput = false is called.
Does it work on other plaforms? Does it work with the official VLC apps?
Only tested on an x86 build using Windows 10.
Relevant logs and/or screenshots
Sample project attached.
Environment
- OS: Windows 10
- Version VideoLAN.LibVLC.Windows version 3.0.11, LibVLCSharp.WPF and LibVLCSharp version 3.4.6.
- Device: PC
- LibVLC version and architecture VideoLAN.LibVLC.Windows version 3.0.11, x86
- LibVLCSharp version LibVLCSharp.WPF and LibVLCSharp version 3.4.6
Possible fixes
No know possible fixes