Skip to content

fix(mac,linux): convert VideoMetadata.duration to milliseconds#190

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/metadata-duration-milliseconds
Apr 11, 2026
Merged

fix(mac,linux): convert VideoMetadata.duration to milliseconds#190
kdroidFilter merged 1 commit into
masterfrom
fix/metadata-duration-milliseconds

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

@kdroidFilter kdroidFilter commented Apr 11, 2026

Summary

  • nGetVideoDuration() returns seconds on macOS (CMTimeGetSeconds) and Linux (gst_duration / GST_SECOND)
  • metadata.duration was assigned directly without converting to milliseconds, causing a unit mismatch with the documented API contract
  • Multiply by 1000 before assigning to align with iOS, Android, Windows, and Web platforms

Fixes #153

Test plan

  • Verify VideoMetadata.duration returns milliseconds on macOS
  • Verify VideoMetadata.duration returns milliseconds on Linux
  • Confirm seek and progress bar behavior is correct on both platforms
  • Verify no regression on other platforms (iOS, Android, Windows, Web)

nGetVideoDuration() returns seconds on macOS (CMTimeGetSeconds) and
Linux (GStreamer duration / GST_SECOND). Multiply by 1000 before
assigning to metadata.duration so the value matches the documented
millisecond contract and aligns with iOS, Android, Windows, and Web.

Fixes #153
@kdroidFilter kdroidFilter merged commit a1ae997 into master Apr 11, 2026
10 checks passed
@kdroidFilter kdroidFilter deleted the fix/metadata-duration-milliseconds branch April 11, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VideoMetadata.duration returns seconds instead of milliseconds on MacOS

1 participant