Skip to content

iOS & Android: Thumbnail is always generated from a single frame – timestamp option is ignored #389

@matesbridgeapi

Description

@matesbridgeapi

Problem

On both iOS and Android, the thumbnail generation API always returns
a frame from a single fixed timestamp (usually the first frame),
even when different timestamps are requested from JS.

This makes it impossible to generate multiple thumbnails across a video timeline.

Current behavior

  • JS allows passing a timeStamp / timeSec parameter
  • Native code executes successfully
  • BUT the generated thumbnail is always from the same frame
  • Calling the method multiple times with different timestamps returns identical images

This happens on:

  • iOS (AVAssetImageGenerator)
  • Android (MediaMetadataRetriever / equivalent)

Expected behavior

  • Native implementation should respect the requested timestamp
  • Each call with a different timestamp should generate a thumbnail from that exact time
  • The API should support generating multiple thumbnails for:
    • video timelines
    • trim range previews
    • cover frame selection

Why this matters

This blocks all professional video editing use cases:

  • Timeline preview strips
  • Video trimming UI
  • Selecting a cover frame from arbitrary positions

At the moment, the library can only generate one static thumbnail per video, which severely limits usability.

Suggested fix (platform-agnostic)

  • Read timeStamp (milliseconds) from JS options
  • Pass it directly to the native frame extraction logic
  • Do NOT hardcode or ignore the timestamp internally
  • Default to 0 only if no timestamp is provided

iOS example

let timeStamp = options["timeStamp"] as? Int ?? 0
let time = CMTimeMake(value: Int64(timeStamp), timescale: 1000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions