I'm using coil 2.2.0 with compose 1.2.1. I've tried below code to load video thumbnail from remote url but it's not working. Any solution?
I've tried below code but it's not working. Any solution?
val painter = rememberAsyncImagePainter(
model = ImageRequest.Builder(LocalContext.current)
.data(url)
.fetcherFactory<Any> { data, options, imageLoader ->
imageLoader.components.newBuilder()
.add(VideoFrameDecoder.Factory())
.build()
.newFetcher(data, options, imageLoader)?.first
}
.videoFrameMillis(1000)
.build(),
)
Image(painter = painter, contentDescription = null)