Skip to content

Fix compressor issues and address review feedback#397

Merged
numandev1 merged 8 commits into
numandev1:mainfrom
XChikuX:main
May 8, 2026
Merged

Fix compressor issues and address review feedback#397
numandev1 merged 8 commits into
numandev1:mainfrom
XChikuX:main

Conversation

@XChikuX
Copy link
Copy Markdown
Contributor

@XChikuX XChikuX commented May 7, 2026

Addresses the remaining real issues tracked in TRIAGE.md across upload, thumbnailing, image quality, and Android video container handling.

  • iOS background upload

    • Accumulates URLSession response data.
    • Returns body as a UTF-8 string, matching Android behavior.
    • Cleans resolver/rejector/storage state on success and failure.
  • Thumbnail generation

    • Adds Android/iOS JPEG quality clamping.
    • Retries frame extraction with more tolerant timestamps/options.
    • Returns deterministic errors when no thumbnail frame can be decoded.
  • Image quality

    • Clamps JPEG quality to valid platform ranges before encoding.
    • Applies the same clamped quality path when PNG transparency is disabled.
  • Android video output

    • Writes compressed MP4s as fast-start/streamable files for broader browser compatibility.
    • Skips unsupported copied audio metadata that can crash mp4parser or produce invalid containers.
await createVideoThumbnail(videoUri, {
  quality: 0.8,
  headers: { Authorization: token },
});

Please treat as reference implementation. I've reviewed the changes though and they seem minimally invasive.
Should give fixes to long standing issues in this repo.

Copilot AI and others added 8 commits May 7, 2026 20:20
Agent-Logs-Url: https://github.com/XChikuX/react-native-compressor/sessions/98e6d175-52db-4405-a832-fb651d0255ee

Co-authored-by: XChikuX <5894493+XChikuX@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XChikuX/react-native-compressor/sessions/98e6d175-52db-4405-a832-fb651d0255ee

Co-authored-by: XChikuX <5894493+XChikuX@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XChikuX/react-native-compressor/sessions/98e6d175-52db-4405-a832-fb651d0255ee

Co-authored-by: XChikuX <5894493+XChikuX@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XChikuX/react-native-compressor/sessions/98e6d175-52db-4405-a832-fb651d0255ee

Co-authored-by: XChikuX <5894493+XChikuX@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XChikuX/react-native-compressor/sessions/98e6d175-52db-4405-a832-fb651d0255ee

Co-authored-by: XChikuX <5894493+XChikuX@users.noreply.github.com>
@numandev1 numandev1 merged commit d5cac44 into numandev1:main May 8, 2026
5 of 7 checks passed
@numandev1
Copy link
Copy Markdown
Owner

release it in v1.18.2

@XChikuX
Copy link
Copy Markdown
Contributor Author

XChikuX commented May 8, 2026

@numandev1 Hope you checked features and compile issues before merging..

@numandev1
Copy link
Copy Markdown
Owner

@XChikuX I did not check it manually
i checked it via github action https://github.com/numandev1/react-native-compressor/actions/runs/25541583900/job/74968467395

@XChikuX
Copy link
Copy Markdown
Contributor Author

XChikuX commented May 8, 2026

@numandev1
That only assures that builds are working. Individual features may still be sub-optimal or even cause crashes.

If you really want to be hands off with the updates. You need to add several tests.
Please use jest and/or maestro and add these tests to the CI after your build step.

Otherwise, please verify these once manually. I am short on time to perform comprehensive testing from my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants