mediacontroller

Mediacontrol seekbar issue android

北战南征 提交于 2019-12-11 18:55:17
问题 In my Android application I am facing issue with seekbar of MediaController that I am using for Videoview . I would like to know if the user seeks to a position greater than the buffered position,I need to show a dialog and then dismiss the dialogue on seek completed. Please let me know if I can have this solved. 回答1: mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar arg0) { // you can check for the current buffer state and

Android getDuration for video gets different value on different versions

别说谁变了你拦得住时间么 提交于 2019-12-11 14:49:45
问题 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 that the video continues to play after "being finished". But the reality is that the video should have a getDuration like on Android 5.0.2. Does anyone here have any clue? To see the UI problem: http://i.stack.imgur.com/tRAg5.jpg Code below:

DLNA renderer throwing COMException (0x80040501)

走远了吗. 提交于 2019-12-11 14:02:20
问题 I am trying to set up a DLNA Controller to Control an iPush Renderer device. The iPush Renderer device is becoming very popular as many iphone DLNA controllers and even the native Airplay works perfectly well with it. It supports almost all video file formats. My DLNA controller Works with all the devices I have tested it on so far(WDTV, Intels Media Renderer, XBox360, and many other iphone Renderers) except this The iPush Renderer device. When I use UPNPLid.dll [UPnP 1.0 Type Library

Unable to pause/forward/backward video using mediacontroller in android

无人久伴 提交于 2019-12-11 12:19:34
问题 Iam unable to pause / forward / backward the video using MediaController and it is happening only in the LG devices. Below is the code which am using and it is working in the rest of all the devices : VideoView video=(VideoView)findViewById(R.id.video); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(video); video.setMediaController(mediaController); video.setVideoURI(uri); video.start(); Please help me on this. 回答1: Finally I found a solution... In

Android MediaController seekbar not refreshing

我怕爱的太早我们不能终老 提交于 2019-12-11 06:58:58
问题 I'm using a MediaController and MediaPlayer together, to create a simple audio player in Android, taken from an example I found here on this site. However, after much search I could not find the solution to my problem: the progress/seek bar doesn't refresh while the music is playing. It just updates itself when something on the MediaController is pressed (Play/Pause, forward, etc). Any easy fix for this that I'm not getting ? NOTE: My MediaController is declared in XML , and my

How i Can Enable Next And Prev Button in Media Controller in Android

谁都会走 提交于 2019-12-11 04:38:21
问题 ****I am developing Video Player and i am using Media_controller here is the link below**** https://github.com/brightec/ExampleMediaController/blob/master/src/uk/co/brightec/example/mediacontroller/VideoControllerView.java But in this I visible next and prev button and when I call to set Prev Next Listeners Method then its still not working both next and prev button code is here below mNextButton = (ImageView) v.findViewById(R.id.next); if (mNextButton != null && !mFromXml && !mListenersSet)

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

♀尐吖头ヾ 提交于 2019-12-10 17:37:23
问题 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. 回答1: A bit of a late answer, but I posted a solution to an identical question overhere, in case you're still looking (or others that perhaps bump into this...) //Edit: ups, didn't notice someone already posted a link as comment... 来源: https://stackoverflow.com/questions/7868191/how-to-catch-event-when-click-pause-play-button

Android : What use is MediaController's AnchorView?

邮差的信 提交于 2019-12-10 14:18:17
问题 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 the MediaController. From what i read on the developers doc : ...Specifically, the controls will float above the view specified with setAnchorView(). The window will disappear if left idle for three seconds and reappear when the user touches the

Android back button not working while playing video in VideoView

自闭症网瘾萝莉.ら 提交于 2019-12-10 12:39:09
问题 Android back button is not working while playing the video in VideoView. But it works before playing the video. I am using a custom MediaController for VideoView. I tried using dispatchKeyEvent , its not working. Code of Activity that am using VideoView: mc = new CustomMediaController(mVideo.getContext(), screenIcon) { @Override public void hide(){ } @Override public boolean dispatchKeyEvent(KeyEvent event){ if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { super.hide(); ((Activity)

Android remove Fastforward and rewind buttons from mediaplayer

陌路散爱 提交于 2019-12-09 17:53:59
问题 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. 回答1: When creating a MediaController, make sure to set the boolean to false in the constructor: MediaController mediaController = new MediaController(this, false); From the documentation: The "rewind" and "fastforward" buttons are shown unless requested otherwise by using the MediaController(Context, boolean) constructor with the