Skip to content
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] Videos not trimmed #521

Closed
Ludotrico opened this issue Jul 6, 2020 · 5 comments
Closed

[BUG] Videos not trimmed #521

Ludotrico opened this issue Jul 6, 2020 · 5 comments

Comments

@Ludotrico
Copy link

Ludotrico commented Jul 6, 2020

Bug description:
When selecting multiple videos, if one of them is above the set trimmerMaxDuration and the user does not tap on the video to trim it, the exported videos remain untrimmed.

How to reproduce:
Set the config settings to something similar:

        config.video.recordingTimeLimit = 60.0
        config.video.libraryTimeLimit = .infinity
        config.video.minimumTimeLimit = 1
        config.video.trimmerMaxDuration = 60.0
        config.video.trimmerMinDuration = 1.0

Then use multiple selection to select multiple videos, make sure one video is longer than the trimmerMaxDuration of 60 seconds and click next to finish selecting without tapping on the video to trim it. You will see that the video above 60seconds does not get trimmed. And for that matter, videos that have not entered the trimming view do not get trimmed. In other words, if the user does not tap on each individual video he has selected after tapping next, their original length is maintained despite setting a trimmerMaxDuration.

This is an impactful bug for my use case because users are uploading videos and if they select a video that is minutes (or hours) long, and assume that only the first 60 seconds will be taken, it will be a terrible user experience to wait for the entire video to be uploaded a backend server. In addition, server storage costs are not negligible.

Thoughts?
@heitara

@Ludotrico Ludotrico changed the title Video not trimmed [BUG] Videos not trimmed Jul 6, 2020
@heitara
Copy link
Contributor

heitara commented Jul 15, 2020

@Ludotrico what would be the expected behavior here? To trim the first X seconds of all videos that are longer? To force the trim ui flow, when such a video exists? Do the same for all the videos?

I'm slightly confused, the library should give you (as a developer) a freedom to decide which behavior to be triggered. So, the question is more - what's the correct behavior when there is more than one video selected. If we can solve that, then we can decide what should be implemented and how to be used.

I believe that the best solution is to provide an extension point where you can override the default export behavior. At the moment you can identify the duration of each selected item in the didFinishPicking, but this is too late, because it is triggered once the selection view is closed.

Another idea is to render the videos that should be trimmed with some sort of solid border (or icon) and to wait the user to trim each one manually before proceeding (this is quite demanding, but will make the expected result more predictable).

1 similar comment
@heitara
Copy link
Contributor

heitara commented Jul 15, 2020

@Ludotrico what would be the expected behavior here? To trim the first X seconds of all videos that are longer? To force the trim ui flow, when such a video exists? Do the same for all the videos?

I'm slightly confused, the library should give you (as a developer) a freedom to decide which behavior to be triggered. So, the question is more - what's the correct behavior when there is more than one video selected. If we can solve that, then we can decide what should be implemented and how to be used.

I believe that the best solution is to provide an extension point where you can override the default export behavior. At the moment you can identify the duration of each selected item in the didFinishPicking, but this is too late, because it is triggered once the selection view is closed.

Another idea is to render the videos that should be trimmed with some sort of solid border (or icon) and to wait the user to trim each one manually before proceeding (this is quite demanding, but will make the expected result more predictable).

@Ludotrico
Copy link
Author

Ludotrico commented Jul 23, 2020

@heitara the expected behavior should be exactly like Instagrams. If a user picks a video that is longer than 60 seconds (the specified trimmerMaxDuration), and he does not open the trim view, the video should automatically be trimmed to include only the first 60 seconds. Predictable and easy for the user.

Thoughts?

@Ludotrico
Copy link
Author

Ludotrico commented Aug 1, 2020

@heitara we are currently waiting on this branch to be merged, it fixes this issue. @mendesbarreto

@heitara
Copy link
Contributor

heitara commented Aug 2, 2020

I've approved the PR. Waiting for a final merge.

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

No branches or pull requests

2 participants