Questions tagged [mediacontroller]

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.

303 questions
6
votes
2 answers

Android VideoView Playback Controls Show "Play" Initially Instead of "Pause" Even Though File is Already Playing

Good afternoon/morning! Hoping someone could help me out with a small problem I'm having. I'm playing a remote .mp3 file using a VideoView and a custom MediaController. My MediaController looks like this: public class MyMediaController extends…
Mr. Spock
  • 645
  • 1
  • 9
  • 21
6
votes
2 answers

Android remove Fastforward and rewind buttons from mediaplayer

I would Like to remove the fastforward and rewind buttons from mediacontroller in Android. Can anyone help me with this? I want to do it inside my main activity.
user1479307
  • 83
  • 2
  • 5
5
votes
3 answers

Extending MediaController for android

I am using a VideoView and the MediaController for an app I am working on. I simply wanted to have the MediaController appear on top of my VideoView but apparently you can't do that very easily. I attempted to use the setAnchorView method to my…
Ronnie
  • 11,138
  • 21
  • 78
  • 140
5
votes
1 answer

Android : What use is MediaController's AnchorView?

I would like my MediaController to hide only when the user touches only the bottom half part of the screen, because i have some buttons on the top part that need to be accessible with one click. That is, without the first click being intercepted by…
Julie
  • 51
  • 3
5
votes
3 answers

Exoplayer hide PlaybackControlView onClick (not onTouch)

I am developing a custom UI on top of ExoPlayer, and I noticed that the controls (PlaybackControlView) hide when I touch the screen, not when I click. I wanted to change to a click and checked how I can change the event listener, but so far could…
AMD
  • 1,278
  • 4
  • 15
  • 33
5
votes
1 answer

Android: How to call MediaController fast forward and rewind using KeyEvents

Hi I am using mediacontroller to control my mediaplayer, I want to control using keyEvents rather than touchevents, I am using the code below to do that, but only Play/Pause is working, where as KEYCODE_MEDIA_FAST_FORWARD and KEYCODE_MEDIA_REWIND…
bala
  • 168
  • 1
  • 8
5
votes
1 answer

Android - MediaController leaking on activity

I am using MediaPlayer and MediaController objects to stream audio. When closing the activity I am getting a window leaked exception. I have the following in my activity which doesn't help at all. @Override protected void onStop() { …
5
votes
1 answer

How to set Media Controller over the video?

I created simple video view application it's working fine. I have added layoutparams to video view and added videoview into one layout position, that time my media controller showing out of the region but i wish to show media controller over the…
balaji
  • 1,555
  • 5
  • 26
  • 49
5
votes
1 answer

mediacontroller does not work on nexus 7 tab

I have an android code for playing a video using videoview and control buttons such as pause,rewind and forward using mediacontroller. It works on nexus S as well as many samsung phones, but the mediacontroller buttons dont seem to work on nexus 7!…
kriswiz
  • 141
  • 1
  • 13
5
votes
5 answers

MediaController - Error when Show() called

I have this code for show the MediaController, but it give me a fatal error when I'm calling to Show() method. The MediaPlayer itself working on Service and get Intent from the MediaPlayerControl interface. My code: @Override protected void…
m-schwob
  • 81
  • 1
  • 6
4
votes
2 answers

Make MediaController show without hide

I try to use MediaController to play music. I want the MediaController appear until the "back" button is pressed. Now I have try below code: MediaController mediaController = new MediaController(this){ @Override public void…
brian
  • 6,802
  • 29
  • 83
  • 124
4
votes
1 answer

How to catch event when click pause/play button on MediaController

How to catch event when click pause/play button on MediaController. i try onKey,onTouch - and then i click on pause/play button on MediaController did nothing happened.
Dmitry Nelepov
  • 7,246
  • 8
  • 53
  • 74
4
votes
0 answers

Media Session connector #onCommand not getting called

I am building a simple media app following the android official app. But in my case, I need to fetch URL of each clip from remote and then create a mediaId out of it and then play an audio clip. This means that I need to update my media data very…
4
votes
0 answers

remove active song from media session in android

I have an app that is using the Android MediaSession and MediaBrowserConnection to play songs and have a playlist. I am a bit stuck on how to remove the current playing song when someone wants to clear the entire playlist. I can easily remove all of…
Neglected Sanity
  • 1,770
  • 6
  • 23
  • 46
4
votes
1 answer

How to customize YouTube Player style MINIMAL to hide seek bar and enable play/pause control in android

I am using YouTube API in my android application. I need to disable some controls of the YouTube player. So that i used YouTubePlayer.PlayerStyle enum class. youTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL); But in this case, A…
Manikandan.S
  • 41
  • 1
  • 5
1 2
3
20 21