diff --git a/android/src/main/kotlin/com/example/flutter_video_compress/FFmpegCommander.kt b/android/src/main/kotlin/com/example/flutter_video_compress/FFmpegCommander.kt index 75d5986..138e98b 100644 --- a/android/src/main/kotlin/com/example/flutter_video_compress/FFmpegCommander.kt +++ b/android/src/main/kotlin/com/example/flutter_video_compress/FFmpegCommander.kt @@ -150,7 +150,7 @@ class FFmpegCommander(private val context: Context, private val channelName: Str val totalTimeStr = message.replace(reg, "$1") val time = utility.timeStrToTimestamp(totalTimeStr.trim()) MethodChannel(messenger, channelName) - .invokeMethod("updateProgress", ((time / totalTime) * 100).toString()) + .invokeMethod("updateProgress", ((time.toDouble() / totalTime.toDouble()) * 100).toString()) } catch (e: Exception) { print(e.stackTrace) }