Is there anyway to manage FullScreen in MediaPlayerElement(From Libvlcsharp) with ContentPage?
Summary
I am using MediaPlayerElement to play remote video in my Xamarin.Forms project. In that case, i have implemented MediaPlayerElement control in ContentPage and for that my xaml code is like this,
<vlc:MediaPlayerElement EnableRendererDiscovery="True"
x:Name="myvideo"/>
my c# code like this.
using (var _libVLC = new LibVLC())
{
var media = new Media(_libVLC, _link, FromType.FromLocation);
myvideo.MediaPlayer = new MediaPlayer(media)
{
EnableHardwareDecoding = true
};
myvideo.MediaPlayer.Play();
};
Here, video plays fine as expected. But while video is being played, after some moments of playing it automatically went off to full screen. So depending on that my first query is,
1. Is there any way to manage that video automatically gets to play in full-screen after some seconds while playing?(here i am not talking about aspect ratio management, but after some moments while video is being played status-bar automatically gets hide, which i dont want to.)
Another thing is, whenever i navigate back from that contentpage(videoplayer page) => This happens with other pages. Status-bar gets overlapped, After playing video once and navigate get back to other pages/features in my application. My Android device is with Notch.
Needs Info for these two points:
2. How can i customize text shown in error label as mentioned here? Thing is, I don't want to display video link in error message. I searched for this but the property ErrorMessage is available only as read-only.
3. Is there any property to maintain Video orientation in ContentPage or any other way? (i.e. like on tap of button orientations of video can be toggled)
Minimal project and steps to reproduce
- Implement MediaPlayerElement normally in content page.
- Play Video in full screen.
- Navigate back to previous page while video is being playing. by clicking hardware-back-button.
- As shown in above image status-bar gets overlapped. For sample project to reproduce, can check with the official sample provided by library.
What is the current bug behavior?
- StatusBar gets overlapped. while navigate back to previous page.
- Customize texts of default shown error message.
What is the expected correct behavior?
- Statusbar should not be overlapped after navigating back to previous page.
Does it work on other plaforms? Does it work with the official VLC apps?
I am yet to check. Don't Know.
Relevant logs and/or screenshots
Please refer image provided as here.
Environment
My Xamarin.Forms version is upto latest to v4.8.1364, and LibVlcSharp version is also upto latest to v3.4.7.
Here i am facing this with Android v10.0. I haven't checked this in other versions of Android or iOS.
- OS: Android
- Version: 10.0
- Device: Motorola One Power
- Xamarin.Forms: 4.8.1364
- LibVLC: 3.4.7
- LibVLCSharp.Forms: 3.4.7
Possible fixes
- OnDisappearing of page needed to manage SystemUiFlags in Android to overcome the issue as explained above and shown in image.
- Allow customizing error message.
- Needs information regarding Video Orientation/Rotation toggling.(vertically and horizontally)