mediacontroller

Android videoview mediacontroller pause or play button

馋奶兔 提交于 2019-12-23 03:49:14
问题 My video works fine but i cant controll it. I cant see play or pause button.i need play or pause button .mediaController not working fine. i using this codes import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.view.Display; import android.view.WindowManager; import android.widget.MediaController; import android.widget.VideoView; public class avid extends Activity { private String path = "http://techslides.com/demos/sample-videos/small.mp4"; private

How do you use MediaControllerCompat to control the current player?

混江龙づ霸主 提交于 2019-12-22 04:32:23
问题 My app is not the media player. I just want to be able to control the current media player using the new MediaControllerCompat class. Currently I am using MediaSessionManager but want to upgrade to the new compat classes. How do I instantiate the MediaControllerCompat class when I don't have a token or MediaSessionCompat to instantiate it with? I am hoping to get some example code. 回答1: I asked Ian Lake, the Google dev who did the video on MediaSessionCompat, who said it is not possible

Android MediaController Play/Pause button and Seekbar doesn't Refresh

泪湿孤枕 提交于 2019-12-20 10:14:11
问题 I am using MediaController.MediaPlayerControl in order to display a MediaController at the bottom of my Custom View but I can't get it to work properly. When I play music for first time then there should be pause button visible but instead there is play and when I press that button then the music is paused correctly and state remains the same and after that its working properly. Also when I play next song, the old MediaController widget gets overlapped with the new one. And sometimes the

Custom UI on exoplayer sample

让人想犯罪 __ 提交于 2019-12-18 03:39:13
问题 ** I really need help if you don't know anything don't give me a negative point :| if something bother you comment** I want to write custom UI for my player in Exoplayer(change button of pause play or add new buttons like player speed next and etc) . I use Exoplayer sample from github and before add code to my original project, I want to test the custom UI on official sample. I read pages in Stackoverflow and tuts+ about custom UI but I really confused! why change some buttons image or change

Extending MediaController for android

泄露秘密 提交于 2019-12-17 16:29:49
问题 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 VideoView id, but that didn't work. No matter what I do, the MediaController is always at the bottom of my screen. With that said, I did some research and it looks as if I go about extending MediaController , I can change position and other properties.

Add view on top of MediaController

北城以北 提交于 2019-12-12 12:24:58
问题 MediaController always shown on top of all views in the screen and do not pass clicks to below views until it is hidden, my issue is: How to add button view on top of MediaController so it handle click events ? OR How to pass click events to below view? 回答1: Try overriding MediaController.dispatchTouchEvent() It suits your task better, see my answer here for a detailed explanation why. The code will go something like this: public class MyMediaController extends MediaController { ... private

How can I set transparency of MediaController background in android

核能气质少年 提交于 2019-12-12 09:59:29
问题 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 回答1: try setting the background color with a transparent color instead of alpha. For example, with color hex #99CC00: In your colors.xml : <resources> <color name="NoTransparent">#FF99CC00</color> <color name="AlmostTransparent">#4499CC00</color> <color name="FullTransparent">#0099CC00</color> </resources>

Video Not Seeking properly with libmedia Android

与世无争的帅哥 提交于 2019-12-12 04:44:11
问题 I am using libmedia to play encrypted video files. The video Plays successfully and there is no video distortion or any type of pause during video playtime and also it pause and play with mediacontroller very well. The problem is when i try to forward or rewind video it stops and buffering for long time like for 1 minute. I tried to use both Encryption methods BUT NO LUCK with the seek video issue. AES/CBC/PKCS5Padding AES/CFB/NoPadding Please help me out. I am in very tight deadline. Thanks

Compilation errors with android.widget.MediaController

╄→гoц情女王★ 提交于 2019-12-12 03:44:58
问题 I'm trying to customize the MediaController. While doing so, I've stumbled upon a problem. Both my slightly modified version and the unmodified source of MediaController won't compile with intelliJ IDEA. When compiling the unmodified source code I get these errors: mWindow = PolicyManager.makeNewWindow(mContext); Gives the error: cannot find symbol symbol : variable PolicyManager location: class android.widget.MediaController Next error: if (event.getRepeatCount() == 0 && event.isDown() && (

DialogFragment issues with screen orientation and MediaController

蓝咒 提交于 2019-12-11 19:19:24
问题 I have an app which plays videos in a DialogFragment . I have added MediaController to the VideoView however there are two issues: MediaController is hidden behind the DialogFragment . Change in screen orientation when the DialogFragment is visible results in an exception that the activity has a leaked window For the first one, I tried using linearLayoutParent.bringChildToFront(mediaControls) which did not work. And I do not know how to deal with the second one. Help me out. :) 回答1: Although