package eu.friedcutlet.yokan.services.media /** Decodes one representative frame (about 10% into the video) of a local file into a JPEG. */ fun interface VideoFrameExtractor { /** * [url] is the address the player opens ([eu.friedcutlet.yokan.services.files.LocalFileService.readableUrl]). * The image fits within [maxDimension] pixels on both axes. Null (or a failure) means no frame on this platform. */ suspend fun extractJpeg(url: String, maxDimension: Int): ByteArray? } expect fun createPlatformVideoFrameExtractor(): VideoFrameExtractor