Issue
the video is playing normally, but if you open another application and go back, vlc will show a black screen with a only sound. (Android 8.0.0, last version of nuget package)
LibVLC libVLC = new LibVLC("--preferred-resolution=-1", " --log-verbose=3", "--no-gnutls-system-trust");
MediaPlayer mediaPlayer;
Media media = new Media(libVLC, playerUrl, FromType.FromLocation);
VideoView1.MediaPlayer = mediaPlayer;
mediaPlayer.Play();
Solution
On Android, background support needs a bit of ceremony due to how the OS works. Simply, it means you need to recreate a VideoView
and set your existing MediaPlayer
on it to have video working when coming back from the background.
Sample demonstrating this is available https://code.videolan.org/mfkl/libvlcsharp-samples/-/tree/master/ForegroundBackground
Answered By - mfkl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.