Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 1.9 KB

README.md

File metadata and controls

74 lines (49 loc) · 1.9 KB

ASVideoTrimmer

Android Whatsapp Video trimmer is available for iOS as well :-

6Vo3PMRiZP

We made it for iOS Community. It's fully configurable (we are giving optional configuration model for user's needful modification).

Simple Integration Process:-

  1. Copy and Paste these 4 folders from ASVideoTrimmer Project to your project :-
- Configuration
- Libs
- Model
- View
  1. Copy & paste one demo video file as well from ASVideoTrimmer Project to your project :-

- test.m4v

  1. Go to your ViewController from where you want to open ASVideoTrimmer and register its delegates of ASVideoTrimmerViewDelegate:-
extension ViewController:ASVideoTrimmerViewDelegate{
    //MARK:- ASVideoTrimmerViewDelegate
    func cancel(message: String) {
        print(message)
    }
    //Final result
    func croped(trimedVideoUrl: URL?) {
        if let url = trimedVideoUrl {
          //play with your croped video
        }
    }
}

  1. Set Up A UIButton and make it's action from where you can call ASVideoTrimmer :-

    //MARK:- UIButton Actions
    @IBAction func btnOpenVideoTrimmerTaped(_ sender: Any) {
        //set trimmer
        if let path = Bundle.main.path(forResource: "test", ofType:"m4v")  {
            ASVideoTrimmerView.shared.setTrimmerOn(controller: self, configuration:TrimmerConfig(orignalPath:   path))
            ASVideoTrimmerView.shared.delegate = self
        }
    }
  1. Take All .pngs from Assets of ASVideoTrimmer to your porject.

  2. You can Play with Configuration of ASVideoTrimmerView, all values are optional and you can change accroding to your need :-

Configuration files are :-

 - TrimmerConfig
 - VideoQualityConfig
 - SliderConfig

There are lots of properties you can change like trim Trimming limit , UI Changes Etc.