Skip to content

[iOS] progressDivider is ignored for Video.compress — Nitro passes Double, as? Int always fails #425

Open

Description

@miguelnietoa

Same root cause as #417, but in the video path, which #417 and #422 describe as unaffected.

ios/Video/VideoMain.swift reads the option in four places as options["progressDivider"] as? Int ?? 0 (lines 67, 269, 292, 464 on main). Nitro delivers JS numbers as Double, so the cast fails and the divider falls back to 0: progress fires once per encoded frame no matter what is passed. bitrate and maxSize in the same functions already use (… as? NSNumber)?.intValue, which is why they work.

Measured on an iOS simulator with a 3-minute 1080p30 clip, compressionMethod: 'manual' and progressDivider: 1:

progress callbacks
2.0.3 as published 5,400 (one per frame)
the four reads changed to (options["progressDivider"] as? NSNumber)?.intValue ?? 0 100

Android is fine (reads it with getInt).

Activity

  1. github-actions commented on Oct 13, 2026

    @github-actions

    👋 @miguelnietoa
    Thanks for opening your issue here! If you find this package useful hit the star🌟!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions