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
1 answer
Cannot play music using MusicService in Fragment
I have a fragment that gives me the listView of all songs that that I have stored on my phone. When I click on a particular song in my list, I should be able to play it using a MusicService.
This fragment (menu2_Fragment) is initialized in an…

Valera Perminov
- 11
- 2
1
vote
5 answers
How to get the Height of the VideoView included in the Activity
I need to get the Height of the VideoView of my activity in android, I am using the following commands, but it gives me the Height as 0.
VideoView vv = (VideoView)findViewById(R.id.video1);
String surl="SOME_LINK.mp4";
Uri…

Pravinsingh Waghela
- 2,516
- 4
- 32
- 50
1
vote
1 answer
How to update progressbar of media controller android?
I'm trying to create a custom video playback, which has a video view and media controller:
VideoView mVideoView =(VideoView) findViewById(R.id.videoView);
mVideoView.setVideoURI(uri);
MediaController mMediaController = new…

TOP
- 2,574
- 5
- 35
- 60
1
vote
1 answer
Cannot cast MediaPlayerController to music player - getting exception
Hello I've tried to use media player controller in my music player app, but when I use musicplayer.setMediaPlayer I got an exception. Here is my snippet of the code and logcat error.
musicPlayer = MediaPlayer.create(MusicPlayer.this, uri);
…

Lukáš Anda
- 560
- 1
- 5
- 23
1
vote
3 answers
Android: MediaController is not showing while playing the Audio.
I am making a MusicPlayer app which play the songs available on the device.My problem is when i am playing a song MediaController is not showing. I have tried all the possible ways but MediaController not showing the control with play,next, previous…

Developer
- 1,435
- 2
- 23
- 48
1
vote
1 answer
The play/pause buttons on MediaController doesn't refresh alone for audio player
I followed this tutorial http://code.tutsplus.com/tutorials/create-a-music-player-on-android-user-controls--mobile-22787 to build an audio player.
All works fine, but my MediaController behave oddly. In fact the controller's seekbar does not update…

johnnyBeGood
- 69
- 1
- 8
1
vote
0 answers
Android fullscreen activity with videoview
I am to build an activity to play video in full screen mode by using the auto generated full screen activity. Now when the screen been touched only the status bar and the nav buttons show. The media controller only show on second screen touch while…

zhumingvictor
- 109
- 2
- 6
1
vote
2 answers
How to play 3 videos from raw folder in same Activity on different Button clicks in Android?
I have to play three videos on 3 different Buttons in same Activity.
My first video gets played and if I play another video the last screenshot like image comes in foreground and the current video is playing behind the screenshot like image of…

Abhi
- 433
- 2
- 7
- 17
1
vote
0 answers
I have a window leak error whenever the screen rotates and a mediaController is displayed
I can not put android:configChanges="orientation" in the manifest as it prevents me from changing the layouts when the screen rotates. This is the most common solution to the problem I've found but I think what I'm looking for might be more…

user3754218
- 36
- 4
1
vote
2 answers
How to display progress bar while MediaController loads video (live streaming) and not playing it?
Here's my activity code:
public class VideoActivity extends FragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video);
…

Lingviston
- 5,479
- 5
- 35
- 67
1
vote
2 answers
Android media controller in a dialog
I am displaying a VideoView in a Dialog and i am attaching a media control to it.
But when i try to tap on the media controls(play, seekbar etc) the dialog gets dismissed.
The media control buttons don't get tapped, instead the tap registers as an…

Kiran
- 191
- 2
- 10
1
vote
1 answer
Adding textView in Mediacontroller
I need to add a textview in MediaController which shows the name of the song playing. Currently , I am overriding setAnchorView method of MediaController class . But I dont know how should I get the song name populated there . I have the value of…

Siju
- 2,585
- 4
- 29
- 53
1
vote
1 answer
Media Controller hides but media player continues playing
I have a media player and associated with it a media controller.The controls are working fine.
I'm getting two issues with it:
When the media controller gets focus, i.e. the user touches it and then touches another part of the screen, the media…

Noor
- 19,638
- 38
- 136
- 254
1
vote
1 answer
Android MediaPlayer with MediaController: LogCat error "Activity has leaked window that was originally added here"
In my Android app I'm using the standard Android MediaPlayer and MediaController classes to let the user play and pause an audio file.
Everything works fine until the Activity stops (i.e. when I call the onBackPressed() method by clicking the home…

Kirby
- 86
- 1
- 8
1
vote
2 answers
Video playing in gallery but not app
I'm using this piece of code to try and open a .mp4 video:
VideoView videoView=(VideoView)findViewById(R.id.videoView1);
MediaController mediaController=new MediaController(this);
mediaController.setAnchorView(videoView)…

Miyagi's Car Wash
- 11
- 2