Here is another VideoView library....
This is a VideoView based on a TextureView instead of a SurfaceView (the standard VideoView in the Audio-library uses a SurfaceView).
B4ATextureVideoView offers the same capabilities as the standard VideoView but, unlike the standard VideoView, B4ATextureVideoView behaves as a regular view. This key difference allows it to be moved, transformed, animated, etc. You can even take screenshots. It is also better suited to be used in scrollable containers such as Scrollviews/listviews.
From an Android-blog:
You will find the same features as in the standard B4A-wrapper of VideoView although I have added a few more:
- a method for taking a screenshot
- some events missing in the B4A-wrapper of the standard VideoView (Error, Prepared, Info)
- you can get VideoWidth and VideoHeight of the running video
The video codecs supported are the same as the standard VideoView.
This means it should be very quick to port your current app to use B4ATextureVideoView instead of the standard one.
Note: minimum API level is 14
Version 0.30:
-added VideoWidth and VideoHeight
Version 0.50:
-should now be compatible with the the Sender Object
I attach a sample-project and library.
This is a VideoView based on a TextureView instead of a SurfaceView (the standard VideoView in the Audio-library uses a SurfaceView).
B4ATextureVideoView offers the same capabilities as the standard VideoView but, unlike the standard VideoView, B4ATextureVideoView behaves as a regular view. This key difference allows it to be moved, transformed, animated, etc. You can even take screenshots. It is also better suited to be used in scrollable containers such as Scrollviews/listviews.
From an Android-blog:
Because a SurfaceView’s content does not live in the application’s window, it cannot be transformed (moved, scaled, rotated) efficiently. This makes it difficult to use a SurfaceView inside a ListView or a ScrollView. SurfaceView also cannot interact properly with some features of the UI toolkit such as fading edges or View.setAlpha(). SurfaceView has unpredictable behavior inside scrollable container, unpredictable behavior with animations, there is no way to crop content.
To solve these problems, Android 4.0 introduces a new widget called TextureView that relies on the hardware accelerated 2D rendering pipeline and SurfaceTexture. TextureView offers the same capabilities as SurfaceView but, unlike SurfaceView, behaves as a regular view. This key difference allows a texture view to be moved, transformed, animated, etc. You can even take screenshots.
You will find the same features as in the standard B4A-wrapper of VideoView although I have added a few more:
- a method for taking a screenshot
- some events missing in the B4A-wrapper of the standard VideoView (Error, Prepared, Info)
- you can get VideoWidth and VideoHeight of the running video
The video codecs supported are the same as the standard VideoView.
This means it should be very quick to port your current app to use B4ATextureVideoView instead of the standard one.
Note: minimum API level is 14
Version 0.30:
-added VideoWidth and VideoHeight
Version 0.50:
-should now be compatible with the the Sender Object
I attach a sample-project and library.
Attachments
Last edited: