Callback onMyVideoStateChange not triggering after dismissing created view controller

I’m using the custom meeting UI and created a new UIViewController to be presented. When that new controller is dismissed, the onMyVideoStateChange callback is not triggered anymore (when the user taps the video button) and thus the video icon and the user thumbnail doesn’t change.

SDK Version

To Reproduce
Steps to reproduce the behavior:

  1. Create a new UIViewController
  2. Present it on top of the topViewController (with .present method):
    let nav = UINavigationController.init(rootViewController: self) // self because it's a method inside the created view controller
    nav.modalPresentationStyle = .fullScreen
    topViewController.present(nav, animated: true)
  3. Create a method to dismiss this view controller: dismiss(animated: true)
  4. Now, enter the room
  5. Tap the video button: it’s working
  6. Enter that newly created view controller
  7. Dismiss (go back)
  8. Tap the video button: it’s not working anymore



  • Device: iPhone 5s
  • OS: iOS 12.4.8

I found the solution. I was mistakenly setting my UIViewController as the delegate of MobileRTCMeetingServiceDelegate, without actually implementing anything of that protocol:

class MyViewController: UIViewController, MobileRTCMeetingServiceDelegate {
  override func viewDidLoad() {
    MobileRTC.shared().getMeetingService()?.delegate = self

After removing MobileRTC.shared().getMeetingService()?.delegate = self and MobileRTCMeetingServiceDelegate, it worked again.

1 Like

Hey @joao.moraes,

It’s nice to hear from you again!
I am glad you got this working :slight_smile:

Let us know if you have any other issues

1 Like