A MediaController is a view containing controls for a MediaPlayer. Typically contains the buttons like "Play/Pause", "Rewind", "Fast Forward" and a progress slider. It takes care of synchronizing the controls with the state of the MediaPlayer.
Questions tagged [mediacontroller]
303 questions
9
votes
4 answers
Android MediaController intercepts all other touch events
The top half of my app has a VideoView with a MediaController under it. The bottom half is an image with some buttons. While the MediaController is visible, the buttons below are not clickable. It's like while the MediaController is visible, it…

Ronnie
- 11,138
- 21
- 78
- 140
9
votes
2 answers
VideoView - MediaController not showing up
I can't get it working... Whenever I touch my video, nothing is happing... Although, I think, the MediaController should be visible...
I currently use following function to play my video:
private void playCachedVideo(final VideoView videoView, final…

prom85
- 16,896
- 17
- 122
- 242
9
votes
1 answer
User touch quickly on MediaController. Bug only happens on Nexus 4.
In my activity I have got a VideoView which should show a MediaController on touch. If the user touches quickly on Controller while VideoView is not following, after that user presses back button, then my app will be…

Luc Le
- 379
- 1
- 5
- 13
8
votes
3 answers
VideoView: how to always show MediaController while playing video
I have a very simple task - just to show playback controls while playing video on VideoView. But I can't solve it.
Here is the piece of code that I use for initializing VideoView and setting…

Ruslan
- 1,039
- 1
- 9
- 16
8
votes
2 answers
How do you use MediaControllerCompat to control the current player?
My app is not the media player. I just want to be able to control the current media player using the new MediaControllerCompat class. Currently I am using MediaSessionManager but want to upgrade to the new compat classes.
How do I instantiate the…

timothyjc
- 2,188
- 3
- 29
- 54
8
votes
2 answers
Android mediacontroller Play Pause controls not refresh properly
I have used MediaController in my activity its working fine but when I play video for first time then there should b pause button visible but instead there is play and when I press that button then the video is paused correctly and state remains the…

ZeeShaN AbbAs
- 1,365
- 2
- 15
- 31
7
votes
5 answers
Video not playing in Android
Video not working properly in the below mentioned code. What could be the problem for this?
MediaController mediaController = new MediaController(getBaseContext());
mediaController.setAnchorView(videoweb);
Uri video =…

Jack Dsilva
- 1,504
- 3
- 24
- 44
7
votes
3 answers
Media player using YouTube?
I am developing a sample application using MediaPlayer.By using the raw resources folder,the video can be played.But I want to play through URL.How can I achieve this?
My code is:
VideoView videoView = (VideoView) findViewById(R.id.VideoView);
…

NikhilReddy
- 6,904
- 11
- 38
- 58
7
votes
4 answers
Keeping MediaController on the screen in a VideoView
I have trouble finding a way to keep the MediaController on the screen when using it with a VideoView. I want to play an Audio file which is located in res/raw in my app. The file is playing but I would like to keep the controller on the screen for…

joachim
- 113
- 1
- 2
- 6
7
votes
2 answers
onSkipToNext() and onSkipToPrevious() of MediaSessionCompat.Callback does not get triggered
I'm trying to implement a notification player in Android. I followed this guide to achieve this. However as my requirement I need to implement "skip to next" and "skip to previous" in the background notification player.
So far onPlay() and onPause()…

channae
- 951
- 1
- 12
- 28
7
votes
2 answers
Adding a button to MediaController
I want to add a button to MediaController. So I extended MediaController class, created a button and added it into the frame layout. But the newly added button is not reflecting while running.
Please find the code below
public class VideoController…

user977816
- 81
- 1
- 3
6
votes
4 answers
Android media controller shows display for a short time
This below activity works fine but the mediaController display only if I click on the screen. And the second problem is the media controller display only for 3 sec. what should I do to remove this problem?
public class PlayingActivity extends…

Android
- 8,995
- 9
- 67
- 108
6
votes
4 answers
How to make the MediaController visible throughout my video play
I am using MediaController in my app. But unfortunately the MediaController disappears after a time period of 3 secs. But I want my MediaController to be visible until my video plays fully.
How to achieve this.

Andro Selva
- 53,910
- 52
- 193
- 240
6
votes
2 answers
FragmentActivity.getSupportMediaController() is deprecated
For getting a MediaControllerCompat instance I'm using getSupportMediaController() in FragmentActivity. But this method is deprecated. Which method do I have to use instead of this method?

Yeahia2508
- 7,526
- 14
- 42
- 71
6
votes
4 answers
(Context, Token) in instantiating MediaController
I am trying to add a mediaController in my VideoView. I am trying to follow the tutorial in this site.
However, I am having an error in my class in this line.
MediaController mediaController = new MediaController(this);
The error says,…

Jeongbebs
- 4,100
- 7
- 34
- 60