jonataslaw / jonataslaw/VideoCompress

cancelCompression returns null on Android

Open
#271 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
262
Forks
344
PR merge metrics
No merged PRs in 30d

Description

The `cancelCompression` method causes the `Future compressVideo()` method to resolve to null. On iOS it is resolved as expected to a `MediaInfo` object with `isCancel` set to true. The `cancelCompression` method does seem to cancel the compression operation on both platforms.

I notice there is still a TODO, "Add cancel function to Android" in the package readme, however the change log entry for v2.1.0 states `Added cancel compression to android`, therefore I'm guessing the TODO was incorrectly left in the readme? This has been tested on both physical Android and iOS devices

To provide consistency between platforms, and match expected behaviour, we would expect the `cancelCompression` method to cause a running `compressVideo` to resolve to a MediaInfo object.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the cancelCompression and compressVideo methods across the Android and iOS implementations, using the README TODO and v2.1.0 changelog entry as context. Confirm the Android cancellation path and compare its result with iOS; done means a cancelled Android compression resolves to a MediaInfo object with isCancel set to true rather than null.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter, ios, swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.