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
0 answers

Managing Music(Song) Queue using Android Media Framework

How to manage song queue(add song, remove song and rearrange) in offline media player application. Is it possible to manage queue using methods provided by 'MediaSessionCompat' such as mediasession.addqueue() mediasession.addQueueItem() etc. or we…
3
votes
1 answer

Android - How to get changes is MediaSession of other applications?

I am trying to develop an application that gets metadata of other applications that are playing music / video. Right now, I am focusing on the Youtube Android app. I figured that MusixMatch does it, so it must be possible. From what I can gather,…
3
votes
1 answer

Intercepting keyevents to MediaController?

Basically, I'm trying to recreate the functionality of the MediaController in the native Music app (that I see on 2.2), where the back button immediately backs out of screen, instead of hiding the MediaController. There doesn't seem to be any good…
David Liu
  • 9,426
  • 5
  • 40
  • 63
3
votes
1 answer

Android ExoPlayer , Play/Pause button in the middle of VideoPlayer

Im using Exoplayer for playing the videos in my Android App. I want to place the play/pause button in the middle of the video player view(Like the one in the image below). How to achieve this Im just inflating a new layout in place of Android…
Sasank Sunkavalli
  • 3,864
  • 5
  • 31
  • 55
3
votes
2 answers

Hide and Show Toolbar on MediaController show() and hide()

I'm using a MediaController to control video play back for my VideoView. I've overriden VideoView.setOnPreparedListener so that the ActionBar/Toolbar is hidden (hide()) after the video first finishes buffering. And I'd like the toolbar to comeback…
Nevermore
  • 7,141
  • 5
  • 42
  • 64
3
votes
2 answers

How can I set transparency of MediaController background in android

I want to set the transparency of MediaController background and not controls. I tried using mediaController.setAlpha(0.6f), but it is applying transparency to controls as well like this
Ritesh
  • 1,030
  • 2
  • 12
  • 28
3
votes
1 answer

I want to get the video size in MB from videoview from internet path

I'm trying to get the video file size and display it in the layout before starting the video. I have tried many thing but it wont work video_player_view = (VideoView) findViewById(R.id.videoView2); media_Controller = new MediaController(this); …
3
votes
0 answers

Mediacontroller is not shown in the custom alert dialog of videoview

I am using the below code to display the video in the custom alert dialog but the Media controller is not showing inside the custom alert dialog video view. private void playvideo() { final Dialog dialog = new Dialog(this); …
Sunil Pal
  • 91
  • 1
  • 6
3
votes
1 answer

VideoView MediaController style problems

I have a situation where I am streaming a video using a standard VideoView in combination with a MediaController object. Everything works as far as playback is concerned, however the appearance of the ProgressBars for when the video is loading have…
3
votes
0 answers

How to toggle between Full screen and small Screen in custom media controller android

i am using the following code for custom media controller. the code is working fine but if i try to toggle full screen in portrait mode the video is stretched. if i give the fixed height and width the video is not stretched what is the proper way…
3
votes
0 answers

Android : Positionning the MediaController with setAnchorView

Since 24 hours I'm trying to set the Anchor view of my MediaControler without success. My VideoView is embedded in a bigger application but even with a very simple testing app I don't understand the problem. Here is the code of the onCreate of my…
JL Tresset
  • 55
  • 6
3
votes
2 answers

Android MediaController position

So I have the following code which works ok: VideoView videoView = (VideoView)findViewById(R.id.videoView1); videoView.setVideoPath("android.resource://" + getPackageName() + "/raw/"+R.raw.intro); MediaController controller = new…
KKO
  • 1,913
  • 3
  • 27
  • 35
3
votes
1 answer

Video not playing from sd card in motorola 2.3.3

i am developing an application in that i need to play video from sd card. i am using the following code and its working fine in all devices except motorola 2.3.3 device. some times its playing 10-15 seconds video then black screen came , but some…
koti
  • 1,071
  • 3
  • 15
  • 35
3
votes
0 answers

MediaController on top of VideoView

I need to display a video with an action bar on the top bottom of it. I'm currently using a VideoView together with MediaController but I can't find a way to put the MediaController on the top bottom of the VideoView. Actually, I cannot even achieve…
thomaus
  • 6,170
  • 8
  • 45
  • 63
3
votes
0 answers

Customizing MediaController

I'm looking for a simple and stable way to change the images of the MediaController control. My research is so far that I looked at the source codes of the MediaController and its layout file and also a copy of com.android.internal.R for figgering…
rekire
  • 47,260
  • 30
  • 167
  • 264