Skip to content

Commit

Permalink
Merge pull request #780 from default-anton/improve-media-start-and-en…
Browse files Browse the repository at this point in the history
…d-precision

Add support for milliseconds in `start` and `end` for `Media`
  • Loading branch information
alexmercerind committed Apr 30, 2024
2 parents 96c6617 + 0de01fc commit 488d188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions media_kit/lib/src/player/native/player/real.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2326,7 +2326,7 @@ class NativePlayer extends PlatformPlayer {
if (start != null) {
try {
final property = 'start'.toNativeUtf8();
final value = start.inSeconds.toString().toNativeUtf8();
final value = (start.inMilliseconds / 1000).toStringAsFixed(3).toNativeUtf8();
mpv.mpv_set_property_string(
ctx,
property.cast(),
Expand All @@ -2343,7 +2343,7 @@ class NativePlayer extends PlatformPlayer {
if (end != null) {
try {
final property = 'end'.toNativeUtf8();
final value = end.inSeconds.toString().toNativeUtf8();
final value = (end.inMilliseconds / 1000).toStringAsFixed(3).toNativeUtf8();
mpv.mpv_set_property_string(
ctx,
property.cast(),
Expand Down

0 comments on commit 488d188

Please sign in to comment.