Comments (4)
By default, an Android MediaController
hides itself after 3 seconds. In order to make it visible throughout video playback you'll have to override the MediaController.Hide
method:
public class MyMediaController : MediaController
{
public MyMediaController(Context context) : base(context)
{
}
public override void Hide()
{
}
public void HideController()
{
base.Hide();
}
}
Having an empty Hide
method ensures that the transport controls never fade out. Then, instead of creating a new MediaController
, create a new MyMediaController
:
_mediaController = new MyMediaController(_context);
The problem this creates is that in some scenarios the transport controls will still be showing even when you navigate away from the page. That's the purpose of the HideController
method - it forces the transport controls to disappear. You just need to call this method at an appropriate point in the page lifecycle.
from dotnet-maui-videoplayer.
Hi @davidbritch
Thank you so much for the response and I'll give it a try and see if it won't be ideal for my scenario or perhaps at least look for ways of having the thumbnails for Android.
😀
from dotnet-maui-videoplayer.
You tricked me with the bottom image, I tried to click the play button.
from dotnet-maui-videoplayer.
@99067718 I'm sorry 😂 for the trick...
from dotnet-maui-videoplayer.
Related Issues (13)
- iOS Safe Area for Controls
- How to play selected video from a library (folder)?
- How to show loader untill video is loaded HOT 3
- Cannot use custom slider on Android
- Android - "Can't play this video" error with Videos on Azure Blob Storage HOT 14
- Excpetion running on Windows 11 HOT 6
- Chromecast?
- The type or namespace name 'MediaPlayerElement' could not be found (are you missing a using directive or an assembly reference?) HOT 2
- The type or namespace name 'MauiVideoPlayer' could not be found (are you missing a using directive or an assembly reference?) HOT 1
- "Can't play this video" error HOT 17
- Why not on NuGet? HOT 3
- Video fullscreen on landscape orientation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-maui-videoplayer.