songz / cordova-plugin-opentok

Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
Other
162 stars 270 forks source link

Fixes dropped calls and multiple streamCreated events #80

Closed rishi-livewiretax closed 10 years ago

rishi-livewiretax commented 10 years ago

For some reason, the two lines I deleted in this pull request caused multiple publisher streamCreated events to fire (L146), and sometimes dropped calls (L193). After deleting these, everything went back to working normally.

Here is my logcat output diffed between the plugin prior to your last pull-request, and the plugin after your last-pull request: https://www.diffchecker.com/ns612xmt (left side is after your last pull-request diff, right side is previous diff)

After I deleted L146, and L193, the diff is as follows (the same): https://www.diffchecker.com/u76sho1n

songz commented 10 years ago

you are absolutely right. I think session.publish is being called multiple times and your solution fixes it. Thanks @rishi-livewiretax !