Skip to content

libVLCSharp always opens new window under Xamarin.Forms.GTK

Hi, I am creating a true cross-platform signage player so I don't want it to open a new window. On Android the video is rendered in the VideoView, but on my Linux Raspberry a new window is created. So the behaviour is not consistent across platforms.

When setting the Hwnd on the MediaPlayer to the app window it does not create a window, but video is not visible. I also tried executing Play() later as in the WPF issue (on buttonclick f.e.), but has no effect, still a new window is created.

Please help

Sources: https://code.videolan.org/videolan/LibVLCSharp/-/tree/master/samples LibVLCSharp-master\src\LibVLCSharp.GTK\README "You can also create a true cross-platform application with Xamarin.Forms, and use the GTK# backend to target linux and windows. In that case, you would need the LibVLCSharp.Forms.Platforms.GTK package instead, which internally references this one."

#18 (closed) Same issue on WPF

https://github.com/mfkl/libvlcsharp-samples Tried binding MediaPlayer like the MediaElement sample but to no avail

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information