Giter Site home page Giter Site logo

Comments (2)

a914-gowtham avatar a914-gowtham commented on May 26, 2024

Hi @rahul4452 ,you could validate video duration using this snippet before you open the trimmer activitity

 //checking video duration on onactivityResult after video selected from gallery or taken with camera
              if (TrimmerUtils.getVideoDuration(this,data.getData())<=30){
                   Toast.makeText(this,"Video duration should be larger than 30 sec",Toast.LENGTH_SHORT).show();
               }else{
                        Intent intent=new Intent(this,ActVideoTrimmer.class);
                        intent.putExtra(TrimmerConstants.TRIM_VIDEO_URI,String.valueOf(videoUri));
                        intent.putExtra(TrimmerConstants.TRIM_TYPE,0); //optional: it will take by default
                        startActivityForResult(intent,TrimmerConstants.REQ_CODE_VIDEO_TRIMMER);
}

from android-video-trimmer.

rahul4452 avatar rahul4452 commented on May 26, 2024

Thanks, @a914-gowtham for the solution.

from android-video-trimmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.