I try to modify google sample "samples-simplevideowidge", for see the video in full screen automatically. But I can't.
I need create a empty activity, only with a video 360.
You can use directly full screen mode with
vrVideoView.setDisplayMode(VrWidgetView.DisplayMode.FULLSCREEN_MONO);
in any initial or construction method
Related
I know there are ways using TextureViews and some other ways, but can we do a video flip in a VideoView, I tried using the method scaleType of X axis to -1, but just getting a black screen. Is there no way to do a simple video flip for a video being played in a videoview? Am I forced to use a TextureView or other methods?
As you said, the best option is to use TextureView... Android's VideoView can only play videos straight and not mirrored.
If you want your app to play a video mirrored (for instance if the video was recorded using a front camera), you will need to use a TextureView, which can be easily mirrored by specifying android:scaleX=-1 in the XML file, or textureView.setScaleX(-1) in the code. (source)
I am trying to create a custom camera application. I am using textureView with Camera2 api. But when I am opening the application, only black screen is shown. When I click on "click picture" button It captures proper image and screen again goes black. I need to get proper image preview in place of black screen.
You give very less information, but you can have a look at this example:
https://github.com/googlesamples/android-Camera2Basic
In the example there is also used a TextureView.
Which are the best ways to create a Camera Custom activity, using FRONT FACE CAMERA or BACK FACE, and choosing the best sizes of SurfaceView and Camera for each device?
I would want to create an activity like Instagram has, squared and with custom layouts above and below.
If there's any sample that's like this, please It would be very useful.
see https://thenewcircle.com/s/post/39/using__the_camera_api (small) or https://github.com/commonsguy/cwac-camera (with lots of enhancements)
you can try my simple library https://github.com/mistreckless/PortraitCameraSupport
but instagram developers did that by another way. They capture the entire screen image then programmatically cut the square preview you see
I have developed an application in android which contains videos. Now I want to take screen shots from that running video. Is anybody having any idea regarding this thing.
Pleas provide some example code or links.
What you need is using MediaPlayer. Put SurfaceView to your layout and provide it to the MediaPlayer. After the playback is begun you will be able to get snapshot from SurfaceView.
If you want to take the screenshot of your full screen (with status bar and all) you cannot do that programatically unless you have a rooted phone. If you want the screenshot of your app only, then you can.
If you don't want it programatically, then you can-
Go to "Devices" view in eclipse and you have a screenshot (camera like) button there. You can find it from from Window -> Show View.
Try android-screenshot-library
these links may help you
capture screenshot of playing video and mailing that screen shot
http://code.google.com/p/android-screenshot-library/w/list
it worked for me
Assume your video view is inside a linearlayout, you can try:
linearlayout.setDrawingCacheEnabled(true);
linearlayout.buildDrawingCache();
Bitmap bm = linearlayout.getDrawingCache();
I am using MediaRecorder and a SurfaceView to create a custom video camera app. After the user has clicked a stop button, I'd like to show the user a preview of the video (maybe the first or last frame). Is there an easy way to do this?
Thanks!
for future references. It's possible to use the
surfaceHolder.getSurface().freeze();
to hold the last frame.