Repository navigation
fix(ios): honour progressDivider for Video.compress - #426
Merged
numandev1 merged 1 commit intoOct 25, 2026
Merged
Conversation
Nitro hands JS numbers over as Double, which `as? Int` never matches, so progressDivider always fell back to 0 and progress fired once per encoded frame. Read it through NSNumber, as bitrate and maxSize already are. Fixes numandev1#425
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The four localized conversions follow existing numeric parsing patterns, preserve defaults, and have no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes #425 by making iOS video compression read progressDivider through NSNumber, matching existing numeric-option handling.
Changes:
- Updates all four reads, covering compression and remote-video downloads.
- Preserves the default value of
0and existing progress-throttling logic.
Native Swift changes were not runtime-verified during this review.
| File | Description |
|---|---|
ios/Video/VideoMain.swift |
Converts numeric progress-divider options through NSNumber.intValue. |
Review effort: Balanced
numandev1
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #425. Same root cause as #417 / #422, in the video path.
VideoMain.swiftreadsprogressDividerin four places withoptions["progressDivider"] as? Int. Nitro delivers JS numbers asDouble, so the cast never matches and the divider falls back to 0: progress fires once per encoded frame whatever the caller passes.bitrateandmaxSizein the same functions already go through(… as? NSNumber)?.intValue; this does the same forprogressDivider.Measured on an iOS simulator with a 3-minute 1080p30 clip,
compressionMethod: 'manual'andprogressDivider: 1: 5,400 callbacks before, 100 after.