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

Fix issue 118 #166

Open oxcarga opened 5 years ago

oxcarga commented 5 years ago

This PR adds a completion handler for OT.initPublisher method

Contributing checklist

Solves issue(s)

118

Hope this makes sense; We needed this callback to know exactly the moment initPublisher returns so we can publish to session right after that.

oxcarga commented 5 years ago

@msach22 is the project receiving PR? I've seen some old ones not merged yet, so just wondering :)

msach22 commented 5 years ago

@oxcarga Thanks for filing the PR - to keep a consistent code base, how do you feel about making the PR like this: https://github.com/opentok/cordova-plugin-opentok/blob/master/src/js/OTSession.coffee#L25

This would make sure that we're waiting on the code to complete in the native layer before executing the callback. I would also confirm that these callbacks are being called from the native layer.