android-videoview

How to capture screenshot of VideoView when streaming video in Android [duplicate]

别来无恙 提交于 2019-12-13 07:13:50
问题 This question already has an answer here : How to capture screenshot or video frame of VideoView in Android (1 answer) Closed 4 years ago . I was able to figure out how to capture a video frame from a VideoView that is playing a video stored locally on the phone. However , when the video is being streamed over IP in the VideoView, it appears very difficult to capture a screenshot/image/video frame. I would appreciate a solution to this problem. Here is a similar question which has not

How to play video in android after Button click

夙愿已清 提交于 2019-12-13 06:38:55
问题 I am trying to design simple code in android for play video after a button click but i am getting unknown problem. My present project files below. I am clueless right now. Please point out a thing or solve this problem. Thanks again! public class VideoActivity extends Activity { VideoView video; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); play = (Button)findViewById(R.id.button1); play.setOnClickListener(new View

How to play a video using videoview controlled by a seekBar or Progress bar?

安稳与你 提交于 2019-12-13 05:29:48
问题 After searching for many hours , i am asking this, any related answers are welcomed . . I'm having a video in my R.raw folder and i am playing it in two videoview of same duration simultaneously , here is my code , sb = (SeekBar)findViewById(R.id.control_seekbar); mVideoView1 = (VideoView) findViewById(R.id.surface_view1); mVideoView1.setVideoPath("android.resource://" + getPackageName() +"/"+R.raw.play1); mVideoView1.start(); mVideoView2 = (VideoView) findViewById(R.id.surface_view2);

Control buffering in VideoView

有些话、适合烂在心里 提交于 2019-12-13 02:25:50
问题 I'm trying to use a VideoView to display a mp4 video from Vimeo. Everything works fine but is there a way that I can control the buffering of the video? My problem is that I have 6 VideoView's in one view and as soon as the view loads all of them starts buffering right away. I would like them to only start buffering when i press play on one of them to lower internet usage. Is there a way to start/stop the buffering? 回答1: For your case: The VideoView wraps the MediaPlayer, making it unable to

Is it possible to embed Android.VideoView in Xamarin Forms ContentView

烈酒焚心 提交于 2019-12-13 01:54:06
问题 I need to create a mobile app that have to run on android 7.0 - 9.0 and the latest iOS So in my VS 2017 15.9.6 on Windows 10 I try to use Xamarin.Forms 3.4 in a shared project as a container for a native Android.VideoView. I try to figure out how to do that, since the Mono.Android examples don't use Xamarin.Forms. So, do I need a kind of #ifdef in the xaml file, to embedd ths Android VideoView? Or am I completely wrong with that approach? 回答1: Using a Shared Projects, you can define the

Play the video from assests in VideoView not in Full screen mode in tablet

假装没事ソ 提交于 2019-12-13 01:17:47
问题 I am playing the video from the Assets in my application. I am developing the application for the tablet. I am having mp4 videos. my videoview in xml is below. MY PROBLEM IS THAT I AM GETTING THE CENTER ALIGN VIDEO and GAP in TWOSIDE RIGHT AS WELL AS IN LEFT. Th video needs to be played in full screen. <VideoView android:id="@+id/videoview1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true"

VideoView Disappears for a second when video is changed

自作多情 提交于 2019-12-12 19:35:58
问题 In my application there are some buttons on top of the screen and a video view under that. In the oncreate event I start playing a mainvideo.mp4 in the VideoView and set it for looping. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); VideoView videoView = (VideoView)this.findViewById(R.id.videoView); videoView.setVideoURI("android.resource://"+getPackageName() + "/"+R.raw.mainvideo); videoView.requestFocus(

detect double tap (Double click) or long click in a videoview

*爱你&永不变心* 提交于 2019-12-12 19:19:17
问题 I am working on an Android application. In my app I have to show the video in the corner of the screen.Then If the user double clicked or longclicked I have to expand the video in to full screen. So i used the following code. vd.setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { // TODO Auto-generated method stub if (!flag) { DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); android.widget

Android VideoView plays 2 videos at the same time

99封情书 提交于 2019-12-12 17:31:32
问题 I am trying to play a videoview on top of another video view. The first video view is paused, while the second is playing. It appears to work but no second video appears on the screen (though I hear the audio and see the controls that would normally appear on top). I am assuming this is some sort of order issue. Any thoughts. By the way, I have no problem displaying other views on top of the main video view and having the video fill the background. 回答1: That won't work - the VideoView is

Is there a way to get a Url to a specific file in Android expansion file?

ぐ巨炮叔叔 提交于 2019-12-12 17:19:46
问题 I am building a PhoneGap application, which contains large audio and video files. In Android the media files should be in an expansion file to keep the application size under the Google Play 50 MB limit. I'm currently considering two ways to play the video files: Unpack (maybe temporarily) the desired video file from expansion file to sdcard, get its URL and start the media player application. Unpacking takes some time so the user would have to wait for a few seconds depending on the size of