Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Delegate Callbacks #12892

Closed
j-caudill opened this issue Feb 9, 2023 · 0 comments · Fixed by #12893
Closed

Duplicate Delegate Callbacks #12892

j-caudill opened this issue Feb 9, 2023 · 0 comments · Fixed by #12893

Comments

@j-caudill
Copy link

j-caudill commented Feb 9, 2023

Description:

Updating to the new 7.0.1 SDK from current 5.1.0 SDK. Found when joining a meeting, all delegate callbacks (conferenceJoined, conferenceTerminated, participantUpdated, etc...) get triggered twice.

Steps to reproduce:

  1. Install new SDK
  2. Join a meeting by instantiating the JitsiMeetView()
  3. notice all delegate callbacks are triggered twice.

Expected behavior:

delegate callbacks should only be triggered one time as sent by the SDK.

Actual behavior:

since all delegate callbacks are triggered twice, nothing was working appropriately.

Server information:

  • Jitsi Meet version:
  • Operating System:

Client information:

iOS, Xcode 14.2, node 19.6.0, npm 9.4.0

Additional information:

Forum conversation is here:
https://community.jitsi.org/t/duplicate-delegate-calls/121051/6

The solution for our project is to initialize JitsiMeetView() with the frame function:
JitsiMeetView(frame: frame)

If you don't initialize with the frame, then both init() and initWithFrame() are called causing the notification observers to be setup twice, thus causing all delegate functions to be sent twice.

saghul added a commit to saghul/jitsi-meet that referenced this issue Feb 10, 2023
UIView has 2 designated initializers: initWithFrame and initWithCoder,
which means either of them is going to be called, whatever the
constructor.

THus overriding init will cause creating new (and unnecessary)
observers.

Ref: https://community.jitsi.org/t/duplicate-delegate-calls/121051/6
Fixes: jitsi#12892
saghul added a commit that referenced this issue Feb 13, 2023
UIView has 2 designated initializers: initWithFrame and initWithCoder,
which means either of them is going to be called, whatever the
constructor.

THus overriding init will cause creating new (and unnecessary)
observers.

Ref: https://community.jitsi.org/t/duplicate-delegate-calls/121051/6
Fixes: #12892
hristoterezov pushed a commit that referenced this issue Jul 19, 2023
UIView has 2 designated initializers: initWithFrame and initWithCoder,
which means either of them is going to be called, whatever the
constructor.

THus overriding init will cause creating new (and unnecessary)
observers.

Ref: https://community.jitsi.org/t/duplicate-delegate-calls/121051/6
Fixes: #12892
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 a pull request may close this issue.

1 participant