android-videoview

move videoView…using translation animation

陌路散爱 提交于 2019-12-19 08:12:46
问题 I am basically trying to move the VideoView I have by using an animator on the layout that contains in. However, the video view never moves. Its layout moves, but not the video itself? How can I make the video move? here is what i have so far. the slideleft.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="0%" android:toXDelta="-50%" android:duration="200" android:fillAfter ="true" android:fillEnabled=

Playing a video with JavaCV and FFmpeg

只谈情不闲聊 提交于 2019-12-18 15:49:42
问题 So, I'm developing a custom video player for Android but I need to play more than the android supported video files (mp4, 3gp...), like wmv, avi, flv. At this time I do already convert any video type to .mp4 and I'm able to play them after recoding, but I have no idea how can I play those wmv , avi files without recoding them to mp4 video formats. Is there any way I can play any video on Android without recoding them? JavaCV + FFmpeg library already working, just don't know how to do that. By

Resize/Scaling down a YouTubePlayerFragment while video is playing

北慕城南 提交于 2019-12-18 13:38:29
问题 I am trying to replicate the video minimization in the Youtube app as shown here. In order to achieve this, I've tried using the Draggable Panel library. When I ran the sample, I noticed that the video does not scale but rather crops when minimized during playback. When the video is stopped (not paused) and displaying a thumbnail, the view scales as its supposed to. I read on another question that YouTubePlayerView is implemented with a SurfaceView. I also read in the docs that SurfaceView

Resume playing VideoView from onResume

回眸只為那壹抹淺笑 提交于 2019-12-18 11:17:20
问题 I have a VideoView and it is pause when I start an Email intent. When the email intent is done, I want the videoView to continue playing, however, it restarts from the beginning. @Override public void onPause() { Log.d(TAG, "onPause called"); super.onPause(); videoView.pause(); } @Override public void onResume() { super.onResume(); Log.d(TAG, "onResume called"); videoView.start();//resume() doesnt work } How can I get the videoView to resume from where it left off. 回答1: What about this:

Center VideoView in landscape mode

徘徊边缘 提交于 2019-12-18 09:25:18
问题 How can I center a VideoView in landscape mode? I tried this: on Manifest file I have : android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" and on my Activity I have this code: RelativeLayout.LayoutParams lv= new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); lv.addRule(RelativeLayout.CENTER_HORIZONTAL); myVideoView = new VideoView(this); myVideoView.setLayoutParams(lv); myVideoView.setVideoPath(Environment .getExternalStorageDirectory() + "

Playing video from Sd card

六月ゝ 毕业季﹏ 提交于 2019-12-18 07:17:08
问题 I have build an app that has videos in it that stream from the Internet and I'm not very impressed with the performance of them. Would anyone like to share the code for loading videos from the SD card. Thanks 回答1: I hope this code help u public class video extends Activity{ VideoView video_view; String ex_name; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.eccryption); video_view = (VideoView) findViewById(R.id

Play video from url in VideoView [Android]

最后都变了- 提交于 2019-12-18 06:13:10
问题 I found a similar questions but nothing work for me. I try play video from this url: http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4 My java code: VideoView videoView= (VideoView)findViewById(R.id.exerciseVideo); Uri uri = Uri.parse(TEST_URL); videoView.setVideoURI(uri); videoView.requestFocus(); videoView.start(); When I run app nothing is displayed in activity and IDE does not show any errors. ANy idea, please? EDIT: My activity where I want to show video: <ScrollView xmlns

Android VideoView Proportional Scaling

本秂侑毒 提交于 2019-12-18 04:34:17
问题 In Android's VideoView, is there any way to achieve the same effect as ImageView.ScaleType.CENTER_CROP? That is, I want my VideoView to play the video such that it fills the entire screen without distortion. If the video aspect ratio does not exactly fit the screen's, then it should be cropped rather than distorted. The following solution will fill the screen, but does not maintain the video's aspect ratio: https://stackoverflow.com/a/6927300/1068656 And this solution maintains the video's

How should I override VideoView's onDraw in order for it to have transparent rounded corners?

两盒软妹~` 提交于 2019-12-17 22:03:05
问题 Clearly using a background shape doesnt work in the case of VideoView Also, there are lots of articles how to override onDraw for ImageView and make its corners round. But how do I do it for a VideoView? 回答1: Transparent rounded corners cannot be done with a VideoView or any SurfaceView , as according to the documentation: The surface is Z ordered so that it is behind the window holding its SurfaceView; the SurfaceView punches a hole in its window to allow its surface to be displayed. With a

Android VideoView crop_center

末鹿安然 提交于 2019-12-17 19:21:41
问题 I have a RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:foregroundGravity="center" android:gravity="center" android:orientation="horizontal" > <VideoView android:id="@+id/videoViewPanel" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:layout_centerInParent="true"/> <