android-videoview

BebopVideoView to Mat

守給你的承諾、 提交于 2019-12-22 14:17:13
问题 I come up against the great problem. I`m try to BebopVideoView to Mat. (BebopVideoView is parrot drone source code) But I was failed for several days. Here is the code. package com.hyeonjung.dronecontroll.view; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import android.media.MediaCodec; import android.media.MediaFormat; import android.os.Environment; import android.util.AttributeSet; import android.util.Log;

BebopVideoView to Mat

你。 提交于 2019-12-22 14:17:08
问题 I come up against the great problem. I`m try to BebopVideoView to Mat. (BebopVideoView is parrot drone source code) But I was failed for several days. Here is the code. package com.hyeonjung.dronecontroll.view; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import android.media.MediaCodec; import android.media.MediaFormat; import android.os.Environment; import android.util.AttributeSet; import android.util.Log;

How can we play/buffer only few minutes of a video in Android?

Deadly 提交于 2019-12-22 12:08:28
问题 I need to play first 2 mins of a video. Using onBufferingUpdate() i get the percentage that is buffered. But by the time onPrepared is called i get buffered % as 40. Which is more than 2 mins of a video. (Considering i have a video of 30 mins) Is there any way i can play/buffer video for only 2 mins ? Thanks. 回答1: The buffer size is pre-set into the firmware. All you can do is keep tabs on how much the buffer is filled, and even that is just on a percentage basis. The size is set in

How to perform zoom in/out on VideoView in android?

蹲街弑〆低调 提交于 2019-12-22 05:27:04
问题 I am using VideoView & running videos from resources. I want to know, is there any way by which I can perform zoom in/out functionality on running video? 回答1: OK I had this issue and solved it by removing the VideoView and replaced it with a TextureView. You can then apply a Matrix transformation which includes lots of options including zooming. The method for the Matrix I would use is the postScale() method. You can apply multiple effects pre and post, which you can view in the documentation

Android portrait video orientation wrong in VideoView

孤街醉人 提交于 2019-12-22 03:48:07
问题 I capture a new video in PORTRAIT orientation on an Android device like this: Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(intent, 1886); and it gives me this file: "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4" Then I play it like this: private VideoView videoView = (VideoView) findViewById(R.id.videoView); String videoUrl = "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4"; videoView.setMediaController(new

Android portrait video orientation wrong in VideoView

萝らか妹 提交于 2019-12-22 03:46:28
问题 I capture a new video in PORTRAIT orientation on an Android device like this: Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(intent, 1886); and it gives me this file: "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4" Then I play it like this: private VideoView videoView = (VideoView) findViewById(R.id.videoView); String videoUrl = "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4"; videoView.setMediaController(new

Draw overlay (HUD) on Android VideoView?

孤者浪人 提交于 2019-12-21 12:00:15
问题 I have a custom view that draws HUD : Here is my layout: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <VideoView android:id="@+id/videoView1" android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content" /> <com.widgets.HUD android:id="@+id/hud" android:layout_width="fill_parent"

Get the mediaPlayer of the videoView in Android

*爱你&永不变心* 提交于 2019-12-21 06:58:36
问题 Is it possible to get a reference to the mediaPlayer instance that the videoView is using, preferably right inside its ctor? If so, how? Since the videoView doesn't have as much listeners as the mediaPlayer, I would like to have the ability to reach the mediaPlayer for extra control and better events handling. 回答1: you can listener from VideoView. VideoView mVideoView=new VideoView(); mVideoView.setOnPreparedListener( new MediaPlayer.OnPreparedListener() { @Override public void onPrepared

Android WebView html5 video force fullscreen

只愿长相守 提交于 2019-12-21 06:36:15
问题 I have been working on this issue for at least one week. I have read all the post about it in StackOverflow but I still not founding the solution and I am starting to think that this is impossible. I want to display an HTML in a webview embebbed in a layout like this: The problem is that if that HTML code has an HTML5 video inside it will be cropped due to a bug in Android OS: Link to bug. I have tried many workarounds but none of them seems to be working. My last attempt is to show the video

How to play video in VideoView?

和自甴很熟 提交于 2019-12-21 05:19:06
问题 I want to play video in VideoView . When I try to do that I got the following error: Here is my source code: package com.video.listitem; import android.app.Activity; import android.content.pm.ActivityInfo; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; import android.widget.MediaController; import android.widget.VideoView; public class PlayVideo extends Activity { VideoView mVideoView;