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
3
votes
1 answer

Positioning the MediaController over the VideoView

I'm having a lot of trouble trying to position the MediaController right where I want it. What I really want to do is always show the MediaController above the VideoView, aligned with the bottom. I've been trying to do this for the last three days…
Henrique Rocha
  • 1,737
  • 1
  • 19
  • 29
3
votes
0 answers

How to play audio with MediaPlayer and use the MediaController

I use below code to play audio: try { MediaController mc = new MediaController(this); MediaPlayer mMediaPlayer = new MediaPlayer(); mMediaPlayer.prepare(); mMediaPlayer.start(); mMediaPlayer.seekTo(0); …
brian
  • 6,802
  • 29
  • 83
  • 124
2
votes
2 answers

Android - How to determine which music app is currently playing?

I want to know what song is currently played on my Android phone. In the past, the solution would be to add an IntentFilter but now the solution should be based on MediaSession. Each media app posts its MediaSession. I have a the following…
Ziad Halabi
  • 964
  • 11
  • 31
2
votes
0 answers

My app is crashed whenever I am using MediaControllers of a VideoView in android (on pausing video)

I am playing a video in my app through videoview. When I am clicking on pause button of MediaController, my app is crashing. Here is my code: Uri uri = Uri.parse(videoUrl); chatVideoView.setVideoURI(uri); MediaController…
2
votes
1 answer

MediaController causes java.lang.SecurityException: Permission Denial

I received the following error report from a couple of different users running Android 2.2. I cannot reproduce it locally. java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri…
2
votes
3 answers

Customize Media Controller

I m using VideoView to display video. My Requirement is a MediaController wid play/Pause, Stop, & Volume Contoller.. i tried MediaController mc = new MediaController(this); View mMediaControllerView =…
Nital
  • 975
  • 3
  • 9
  • 15
2
votes
3 answers

android: hiding media controller functions

I have a videoview and when the video starts, the media controller is shown for 3 seconds. I want to hide the media controller unless i tap on the screen. I tried MediaController mc= new…
Farhan
  • 3,206
  • 14
  • 49
  • 62
2
votes
0 answers

Null Pointer Exception thrown when calling .show() on MediaController

I found this question was marked as duplicate for one about how to prevent Null Pointer Exceptions. For clarification, the problem is that the library is throwing it. My variable isn't null. More specific help about the library is more helpful. I am…
mega12345mega
  • 503
  • 1
  • 6
  • 17
2
votes
2 answers

Rotating video messes up MediaControls, android

When I rotate my device, the video controls dont resize properly. I made a video of what I am talking about here: http://www.youtube.com/watch?v=FgRythmUo3A Is there a way to "redraw" the controls? I made this change to my manifest so I could…
Ronnie
  • 11,138
  • 21
  • 78
  • 140
2
votes
1 answer

MediaController doesn't respect view's animation

The Question says it all, MediaController doesn't follow the animation applied to the view. I've a RelativeLayout inside which I've a VideoView. MediaController is anchored to this VideoView. Now, in the activity, I bring the relative layout on the…
2
votes
1 answer

Removing gradient from video

I'd like to get rid of the color gradient at the bottom of a video file (media controller gradient). Applying transparent background does not help. Thanks!
2
votes
2 answers

How to get the Youtube video info on our application?

I saw on many applications that they can get the info of current playing youtube video's title, duration etc on there application. See this response title: Desiigner- Panda (OFFICIAL SONG) Prod. By: Menace album: null artist: Desiigner…
mob_web_dev
  • 2,342
  • 1
  • 20
  • 42
2
votes
1 answer

MediaController/VideoView causes android.view.WindowLeaked

I have the following code which uses a VideoView and MediaController: FrameLayout frameLayout = findViewById(R.id.frameLayout); VideoView videoView = findViewById(R.id.videoView); mediaController = new MediaController(this) { …
kjdion84
  • 9,552
  • 8
  • 60
  • 87
2
votes
2 answers

Can't add MediaController to VLC Android SDK

I tried creating an app that allow users watch live stream videos on their android device. From my lil research I found out VLC Sdk is cool because it support more protocols. From the code gotten from Tutorial on using vlc sdk I was able to make the…
Prodigy
  • 2,094
  • 24
  • 30
2
votes
0 answers

Android E/Mediaplayer error: (1,-38)

Not sure what to do from here. My mp4.video works on most devices but the emulator I gives me this error msg from logcat: 03-28 09:42:36.745 21332-21332/com.m D/MediaPlayer: getMetadata 03-28 09:42:36.766 21332-21346/com.m E/MediaPlayer: error (1,…