Skip to content

feat: add duration property to VideoPlayerState#192

Merged
kdroidFilter merged 1 commit into
masterfrom
feat/expose-duration-property
Apr 11, 2026
Merged

feat: add duration property to VideoPlayerState#192
kdroidFilter merged 1 commit into
masterfrom
feat/expose-duration-property

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

Summary

  • Add duration: Double property to VideoPlayerState interface, exposing the total media duration in seconds
  • Implement across all platforms: Android, iOS, Web, JVM (Linux, Mac, Windows)
  • Follows the same pattern as the existing currentTime property
  • Keep positionText and durationText as-is for convenience

Closes #94

Test plan

  • Verify duration returns correct value in seconds on Android
  • Verify duration returns correct value on JVM (Linux/Mac/Windows)
  • Verify duration returns correct value on iOS
  • Verify duration returns correct value on Web
  • Verify duration is 0.0 when no media is loaded
  • Verify positionText and durationText still work as before

Expose the total media duration in seconds via a new `duration` property
on VideoPlayerState, complementing the existing `currentTime` property.

Closes #94
@kdroidFilter kdroidFilter merged commit 4aa0dd9 into master Apr 11, 2026
10 checks passed
@kdroidFilter kdroidFilter deleted the feat/expose-duration-property 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.

Add duration property to VideoPlayerState

1 participant