Search code examples
xamarin.formsmediaelement

Xamarin Forms: MediaElement: How to stick the control bar always on top of the screen?


I am using MediaElement for playing audio. My problem is the controls(Play, pause, and duration bar) are not showing always. If I tap on the MediaElement the controls are showing else only a black screen. I need to keep the controls always there at the whole time of audio play.

Currently audios are playing like below:

enter image description here

I tried true value for KeepScreenOn and ShowsPlaybackControls properties, but no luck.

I need output like below screenshot:

enter image description here

I can't use webview here because I need to perform some operations when the audio play end.


Solution

  • MediaElement is still in preview . In your case you could implement the VideoPlayer by using Custom Renderer .Check create the platform video players .

    In addition , you could also use the plugin MediaPlayer from nuget .

    If you do want to implement it by using MediaElement . You could post the feature request to github and we will follow up it .