-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Duration parameter is broken on Android #127
Comments
vanfresh
changed the title
Bug: Duration parameter is broken in Android
Bug: Duration parameter is broken on Android
Aug 1, 2021
Anything? |
I found out that using a video with seconds and dividing it by 100 and rounding it up (does not support double the duration parameter) it works. The issue here is that it may make videos longer if they are for example 11 seconds. I think the issue is in the android plugin here: val dataSource = if (startTime != null || duration != null){
val source = UriDataSource(context, Uri.parse(path))
TrimDataSource(source, (1000 * 1000 * (startTime ?: 0)).toLong(), (1000 * 1000 * (duration ?: 0)).toLong())
}else{
UriDataSource(context, Uri.parse(path))
} For some reason |
yes duration is not work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Duration
is broken in Android. I tried using seconds and milliseconds for the parameter. If I use seconds, it will trim the video to less than 1 second for a 10 second video. If I use milliseconds, it will run into negative value territory from being to large.The text was updated successfully, but these errors were encountered: