VideoView
VideoView allows you to play a video from a url or a local file with caching functionality.
Usage
VideoView is included in its own module which is included by platform module. If you need to include this module, add it to your build.gradle
:
implementation ("com.poqstudio:catalogue.video:$VERSION_NAME")
To use it:
- Add it to your layout:
<com.poqstudio.platform.view.video.ui.PoqVideoViewandroid:layout_width="match_parent"android:layout_height="wrap_content" />
- Send the
VideoData
object through the setUp method:videoView.setUp(VideoData(...)))
Customization
If you need to further customize VideoView you can override:
SimpleExoPlayerFactory for adjusting the video scaling, autoplay behavior, and other commonly used methods, for a list of the most commonly used methods please refer to the ExoPlayer docs.
VideoCacheFactory to customize the cache size and cache file path override.