LibVLCSharp Media Player stops when app is minimized

27 views Asked by At

I have a UWP Application. I am using a LibVLCSharp.Uno.VideoView and LibVLCSharp.Shared.MediaPlayer. I have a problem, when the app is minimized the player stops. I added a Background Media Playback Capability Capabilities

The code, how I initialize a LibVlc, MediaPlayer, and Media Initialization

The MainPage.xaml codeMainPage.xaml

Logs When I start playing, minimized application and unminimized.

03.01.2024 I resolved my problem by adding the below code to initialization MediaPlayer

var backgroundSystemMediaTransportControls = BackgroundMediaPlayer.Current.SystemMediaTransportControls;
backgroundSystemMediaTransportControls.IsPauseEnabled = true;
backgroundSystemMediaTransportControls.IsPlayEnabled = true;
0

There are 0 answers