How to tint the video, but still display the MediaController progress bar? - android

In my application I am using VideoView to play a video. Through this forum I have learnt to show the progress bar (MediaController) persistently (without hiding).
My requirement is to tint the video on some action (lets say pause on MediaController), but still be able to use the MediaController. i.e., once the video is tinted, I could move the progress-bar on MediaController and could also play the video again (after un-tinting it).

Related

android videoview black background

After looking around in order to avoid the black background before videoview is prepared, i've decided to post here a fix / trick.
Well, if you have no views on top of the videoview, use the "ZOrder" method:
videoView.setZOrderOnTop(true); //to "hide" before setting up your video
videoView.setZOrderOnTop(false); //after, in your videoView.setOnPreparedListener
BUT if you have some views on top of your videoview, this method will hide everything that has meant to be on top of your videoview, so just go with the "background" method, setting it before and after video is prepared:
video.setBackgroundColor( some color, maybe your app background ); //before
video.setBackgroundColor(Color.TRANSPARENT); //after, on prepare

How to put a layout over a YouTube player while it is in fullscreen mode?

I’m trying to put a layer over a YouTube player in fullscreen mode. I’ve tried putting a layout over YouTube through the xml but it isn’t visible when YouTube is in fullsreen mode. Is there a way I can put a custom button or layout over the YouTube player in fullscreen mode?
You cannot put a layer on top of Youtube Player. Whenever an overlay is detected, the youtube playback stops playing. For more info
Note that while videos are playing, this View has a minimum size of 200x110 dp. If you make the view any smaller, videos will automatically stop playing. Also, it is not permitted to overlay the view with other views while a video is playing.
You can put a layout outside the player or use Overlay ActionBar

Show video in dialog

I want to display video in dialog box
before the video was play in activity and it worked correctly,
but when I try to show video in dialog everything is broken.
It looks like video view becomes transparent, but clicks on video handled correctly.
Whether is a solution of this problem?

Audio progress bar for Android

I have an audio program that I would like to add an audio progress bar with some kind of button, so that a user can grab the button to navigate through the audio forward or backward.
Is there any kind of standard component that does that? Or how can I make a custom one?
You can use SeekBar.
To position and seek the audio, use MediaPlayer's getCurrentPosition(), getDuration() and seekTo(int).

Disable user controls in an Android VideoView object

I'm working on an app that plays a video. I cannot find a way to disable the user video controls (Play, pause, go to 1:23, etc...)
How do I remove the user controls from that object? Ideally the bottom bar of controls will not even show up.
VideoView doesn't have controls built in so I'm assuming you have a MediaController set up in your code, which has the controls that appear when tapping the screen and then go away. If that's the case you can remove it and your problem should be solved.

Categories

Resources