Skip to content

[BUG] [iOS] currentConfig is not updated after a playlist-only setConfig apply #249

Description

@simon-wexer

Describe the bug

In ios/RNJWPlayer/RNJWPlayerView.swift, setConfig has a branch for the case where only the playlist key differs (lines 297–365). That branch applies the new playlist but never assigns currentConfig.

Every other apply path does assign it — lines 627, 715, 752 and 889.

After a playlist-only update the module's cached config therefore still describes the previous playlist, so the next setConfig diffs the incoming config against a configuration that was never the one applied.

To Reproduce

  1. Set up a player with an array config.playlist.
  2. Change only config.playlist (e.g. reorder the items).
  3. Observe that currentConfig is unchanged, while the player has been sent the new playlist.

Expected behavior

currentConfig reflects whatever was last applied, consistently across all apply paths.

Additional context

We have not traced a user-visible symptom to this on its own, so filing it as a correctness issue rather than a defect report. It surfaced while investigating #248, and it makes reasoning about that branch harder because the module's own record of state is unreliable.

Looks like a one-line fix.

Unchanged in 1.7.0 and on main.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions