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
1
vote
0 answers
How to fix 'The specified child already has a parent. You must call removeView() on the child's parent first' error in Customize MediaController?
It's almost 4rth day i'm trying to make my own customize mediacontroller. But fail. What i did is Create MyMediaController class and extend MediaController and override all of it's method.
Original MediaController setAnchorView code.
public void…

Abdullah Khan
- 249
- 2
- 8
1
vote
0 answers
Music controller is located in the middle of the screen instead of bottom
I faced with the following problem: when I run the app on my device media controller is located in the bottom of the screen. But when I run the app on emulator, I see media controller in the middle of the screen:
As I think, it happens because I…

Sergei Mikhailovskii
- 2,100
- 2
- 21
- 43
1
vote
1 answer
portrait to landscape Video viewand controller restart problam in android studio
I have a videoView that i control it by MediaController
it work well but when user change there phone position rotate in portrait to landscope mode or (upside down in landscope to portrait)
it will restart in first of video again
for more…

Sirwan Rahimi
- 121
- 9
1
vote
1 answer
Why isn't mediacontroller shown?
I need to make a Controller for my player app. With the help of it user would play, pause, choose next or previous song. But this controller isn't shown and I don't know why?
I have already done method for setting data for controller and class for…

Sergei Mikhailovskii
- 2,100
- 2
- 21
- 43
1
vote
1 answer
Hide NavigationBar when MediaController is shown
I am using MediaController with VideoView. I am using the following solution to keep the app in immersive mode and it works.
activity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
…

BST Kaal
- 2,993
- 6
- 34
- 52
1
vote
0 answers
MediaController controls stuck while playing video in Dialog Activity or Alert Dialog
I tried to play video in dialog activity, where MediaController is displayed at the bottom of the dialog activity screen properly and when the video starts playing for the first time progress bar moves and time seconds count, but the play button…

shehzy
- 2,215
- 3
- 25
- 45
1
vote
1 answer
Mute button for a video on android
I want to implement a mute button for a video view. I have written the code below but it looks like the code inside onPrepared() doesn't get executed. The listener seems to be working though.
I am not sure what the issue with this code is.
Also, if…

hirani89
- 156
- 1
- 2
- 13
1
vote
0 answers
How to link my existing MediaPlayer with lockscreen notification
Maybe the title isn't explicit enough, let me explain.
I am working on an already existing code, Java for Android app. The actual app have a mediaplayer playing audio stream, with only a play/pause button in the layout.
The played is initialized and…

Grounch
- 375
- 2
- 14
1
vote
1 answer
cannot find symbol method setMediaController(MediaController)
I don't know what's wrong. But I get an error saying
"Error:(62, 29) error: cannot find symbol method
setMediaController(MediaController)"
I'm trying to use videoview in recyclerview to play all the videos.
Instead of videoview I have used…

Lavanya Manoj
- 45
- 6
1
vote
1 answer
How to send media action button to current player?
Is there any way to send a media action button to current media player (like Walkman or google play music) to play and pause or next and previous song.
actually i want to create a simple remote control

mhmdbsh
- 71
- 5
1
vote
2 answers
Fix media controller position on video view
I have videoview in a popup page in my apps, the problem is media controllers position is not properly like below, I want the media controller located inside video view, how I can fix that?
Here is my code for displaying video view and media…

asqa
- 199
- 3
- 17
1
vote
1 answer
MediaControllerCompat get state doesn't return the current position
In my code
MediaControllerCompat.setMediaController(MainActivity.this, mediaController);
mediaController.registerCallback(mCallback);
PlaybackStateCompat state = mediaController.getPlaybackState();
The getPosition() in state is always the one I set…

Ashesh Bharadwaj
- 183
- 2
- 12
1
vote
3 answers
Set thumbnail to an Intent for VideoView
I have to play a video in one of my screens of Android and I am using Video View intent for the same. The video gets played but there is no thumbnail appearing on the launch of the screen.
My code is like this
@OnClick(R.id.icon_play)
protected…

Aayushi
- 1,736
- 1
- 26
- 48
1
vote
1 answer
How i Can Enable Next And Prev Button in Media Controller in Android
****I am developing Video Player and i am using Media_controller here is the link below****
https://github.com/brightec/ExampleMediaController/blob/master/src/uk/co/brightec/example/mediacontroller/VideoControllerView.java
But in this I visible…

Sahar Khan
- 11
- 4
1
vote
1 answer
MediaController not working
My VideoView works but my MediaController doesn't work. I'm pretty sure I'm doing the positions wrong or probably not...
Here's my code:
public class Main2Activity extends Activity {
VideoView resultvideo;
MediaController…

Renzo
- 87
- 1
- 8