a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
380 stars 117 forks source link

set max duration #50

Closed developercrazy021 closed 3 years ago

developercrazy021 commented 3 years ago

hello tnx for this library because is the best how can set max duration ?

a914-gowtham commented 3 years ago

You can use below code.

TrimVideo.activity(videoUri)
          .setTrimType(TrimType.MIN_MAX_DURATION)
          .setMinToMax(10, 30)  //seconds
          .start(this);

The issue with this is max duration is not restricted by seekbar, done option menu will be disabled if it exceed the max duration and a error toast will be shown when click option menu. there is a open issue regarding this #34

developercrazy021 commented 3 years ago

I mean set max duration to seekbar