This PlayKit sample shows how to show a media preview when seekbar is being scrubbed.
- Open
MediaPreviewSample
project in Android Studio. - Compile.
- This sample has an option to change media and ads are enabled.
- For sample purpose, we are keeping two sample Image Sprites (https://www.w3schools.com/css/css_image_sprites.asp). Application needs to pass, height of image slice, width of image slice, number of slices and media entryId. We will download the image from our backend.
- We are currently supporting the (1 row x n columns or no of slices) image sprite.
- In
PlaybackControlsView.kt
, there is an inner classComponentListener
where inonScrubMove
interface method has the logic showing the preview image while scrubbing. com.kaltura.playkit.samples.mediapreviewsample.preview
package has the class to download and extract images from image sprite.