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
2 answers
Why need to use Media controller and media session?
All most media app also need using Media COntroller and media session. I dont understand why need to use them? if i call direct to MediaPlayer, my apps will run, huh? thank you.

Jun Dong
- 13
- 3
1
vote
1 answer
Can't extend android.widget.MediaController to override setSystemUiVisibility
I'm working on my first Android app. It's designed to be immersive, and hides the NavigationBar on all activites, while providing its own internal navigation through the ActionBar.
I am committed to using the default MediaController view for this…

j.h.
- 11
- 2
1
vote
2 answers
Customize MediaController in Exoplayer 2
I'd like to customize entirely the ExoPlayer Media Controller, separating the Controller from the View itself.
I saw several posts about Exoplayer 1 version (this one is really useful: Custom UI on exoplayer sample)
but nothing about Exoplayer 2…

Manuela
- 462
- 6
- 18
1
vote
2 answers
How to show an Alert message to user when clicks or touches the seekbar of default Mediacontroller with videoview?
I am implemented VideoView with Mediacontroller like below.
MediaController mediacontroller = new MediaController(VideoViewActivity.this);
mediacontroller.setAnchorView(mVideoView);
mVideoView.setMediaController(mediacontroller);
Now I want to show…

Ganesh
- 924
- 2
- 12
- 34
1
vote
2 answers
Hide status bar while having Media controller on android
i am using this method to hide status bar :
public static void hideStatusBar(Activity activity) {
if (Build.VERSION.SDK_INT < 16) {
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,…

Jesus Dimrix
- 4,378
- 4
- 28
- 62
1
vote
1 answer
How to reverse Fragment Transaction with Back button on a Media Controller?
I am trying to reverse a fragment transaction to bring the user back to the previous fragment when the user hits the back button. Problem is, there is a media controller and so, the back button event will be handled by dispatchKeyEvent.I've tried to…

Lew Wei Hao
- 763
- 1
- 13
- 25
1
vote
0 answers
Android videoview black screen only no video output
I have a problem playing my video from my phone. Output is a black screen, nothing happens. What should I do?
public class Videoview extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
…

Al Kenon
- 11
- 3
1
vote
0 answers
Android getDuration for video gets different value on different versions
I'm trying to play the following video on all devices.
The problem is that with Android 4.1.2 the getDuration is 1476000 AKA 24:36 minutes.
With Android 5.0.2 the getDuration returns 1546347 AKA 25:46 minutes.
So on Android 4.1.2 the real problem is…

Tef
- 23
- 7
1
vote
0 answers
MediaController Layout height issues
I have a Relative layout at the bottom of the screen. In the mationed layout there is another RelativeLayout for containing a MediaController View.
But the MediaController view's height goes outside of it's parent layout height.
How should I solve…

Ali
- 508
- 1
- 5
- 16
1
vote
1 answer
MediaController Play Icon to change to Pause Icon programmatically
I am using exoPlayer to play music, I am controlling the music through mediaController that android provides. What I really want is that any external events such as phone call should not only pause playback but also change the icon to pause. I have…

Vis
- 109
- 7
1
vote
1 answer
Android MediaController sync with video state
I have a MediaController mc and VideoView videoView which are linked as follows:
videoView.setMediaController(mc);
But, I also want to play/pause the video by clicking the video. So, I add:
//Play/Pause the Video on Clicking Video
…

tika
- 7,135
- 3
- 51
- 82
1
vote
2 answers
Video loop autoplay won't work on Chrome/safari (webkit bug)
Hi guys I am trying to have my video autoplay and loop in a slider but some how it's not playing on chrome and safari. I find out webkit browsers have a bug that stops the video autoplay function when it's restyled...
Here's the video and the page.…

user2945861
- 25
- 2
- 7
1
vote
2 answers
How to play video in video view from url based on buffer %age in android?
I have a link of video from s3 server and i am playing this video on VideoView. Video is playing properly but the problem is that first it downloads the entire video then plays it.
I want it play like buffer. I mean if 20 % video downloaded it…

Vid
- 1,012
- 1
- 14
- 29
1
vote
1 answer
Create lock screen media control buttons
I am developing a media player for android. As from API 21 Google has deprecated the use of RemoteControlClient in favor of MediaStyle notifications and MediaController. But the new functionality hasn't been added to the support library. So if I…

Kiril Aleksandrov
- 2,601
- 20
- 27
1
vote
2 answers
Change MediaController icons programmatically
How do I change MediaController icons programmatically? I mean play/pause/forward and rew.
You see I have added fullscreen button but can't realize how to change those three.
Custom MediaController class:
public class CustomVideoController…

AnZ
- 1,040
- 24
- 54