I want to customize the controls in the MediaController for my video player. I want to swap out the image for the play button, change the skin, change the color, ect.
Is there a known way of doing this?
Thanks
I want to customize the controls in the MediaController for my video player. I want to swap out the image for the play button, change the skin, change the color, ect.
Is there a known way of doing this?
Thanks
I had the same problem on a recent project and ended up creating a custom implementation based on the stock MediaController. It adds a fullscreen button at the far right, but even if that's not what you want this class should be a good starting point.
Code:
Image resources:
Gotchas:
UPDATE (2013): See this tutorial for more details: http://www.brightec.co.uk/blog/custom-android-media-controller
UPDATE (2018): You can now use the wonderful ExoPlayer and fully customize your player UI simply by overriding a layout file.
I tested it and it works great on 4.4 kitkat, but like KAPLANDROID said blackscreen appeared on android 2.3.6 but the music and videocontroller works fine,
Have found a solution, just put this code
videoHolder.setType( SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS );
after this
videoHolder.addCallback( this );
and you are ready to go
© 2022 - 2024 — McMap. All rights reserved.