opentok / cordova-plugin-opentok

Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
MIT License
30 stars 80 forks source link

Several publisher and subscriber events don't fire #140

Closed msach22 closed 5 years ago

msach22 commented 5 years ago

Bug Report

Current behavior The audiolevel and network stats event listeners for the subscriber don't fire. This is because the native code is not registering the proper delegates and event listeners on iOS/Android.

Steps to reproduce For example, the following would not result in any console log statements even when the event fires.

subscriber.on({
  audioLevelUpdated: event => {
    console.log('event', event);
  }
});
Shtibel commented 5 years ago

+1

Shtibel commented 5 years ago

Hi @msach22 , Any news about this bug fix ? Thank you.

msach22 commented 5 years ago

@Shtibel I've submitted a PR for this - this should go out soon

msach22 commented 5 years ago

This has been released with v3.4.2

Shtibel commented 5 years ago

Hi @msach22 Thank you for the update. So is the audioLevelUpdated working for IOS and Android now? Because the problem is on both as you know.

Where can I see the change log of this version ?

msach22 commented 5 years ago

@Shtibel You can find the release here: https://github.com/opentok/cordova-plugin-opentok/releases/tag/v3.4.2

PR: https://github.com/opentok/cordova-plugin-opentok/pull/142

Shtibel commented 5 years ago

Hi @msach22 Sorry for all the questions. Did you test the audioLevelUpdated on android ?

msach22 commented 5 years ago

Yes, the audioLevelUpdated events were set already set in Android, but the JS wrapper was not dispatching them. With the following changes, you can see the events will be dispatched when they are received on the JS layer. https://github.com/opentok/cordova-plugin-opentok/pull/142/files#diff-981b9e90fef5db27c7eb09496bcd327bR113 and https://github.com/opentok/cordova-plugin-opentok/pull/142/files#diff-13b9a487a2528a5301accd6471a3549dR123

Please run this in a sample app and file a new issue if it's not working for you.

Shtibel commented 5 years ago

Hi @msach22 This fix is not working.

when we are doing one on one session the event is working but when a new user connects to the session the audioLevelUpdate stops working

msach22 commented 5 years ago

@Shtibel Thanks for sharing. It looks like you filed an issue here: https://github.com/opentok/cordova-plugin-opentok/issues/159

I'm happy to continue the discussion there.