Skip to content

Commit

Permalink
- Modified README
Browse files Browse the repository at this point in the history
  • Loading branch information
AbedElazizShe committed Jun 30, 2020
1 parent da81792 commit 55161f9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ You can pass the optional video quality (default is medium) and if to enable che

To cancel the compression job, just call [VideoCompressor.cancel()]

### Kotlin

```kotlin
VideoCompressor.start(
path,
Expand Down Expand Up @@ -97,6 +99,37 @@ VideoCompressor.start(

}, VideoQuality.MEDIUM, isMinBitRateEnabled = false)
```
### Java

```java
VideoCompressor.INSTANCE.start(path, desFile.path, new CompressionListener() {
@Override
public void onStart() {
// Compression start
}

@Override
public void onSuccess() {
// On Compression success
}

@Override
public void onFailure() {
// On Failure
}

@Override
public void onProgress(float v) {
// Update UI with progress value
}

@Override
public void onCancelled() {
// On Cancelled
}
}, VideoQuality.MEDIUM, true);

```

## Compatibility
Minimum Android SDK: LightCompressor requires a minimum API level of 21.
Expand Down

0 comments on commit 55161f9

Please sign in to comment.