Closed brunosoune closed 6 years ago
The iOS webview does not support webrtc so you cannot use the JS SDK to run it in an iOS app. You have add this plugin and use the JS wrapper from this plugin to run OpenTok on your iOS app
plugins\cordova-plugin-opentok\www\opentok.js ? I should use this to android too?
Yes, that's correct! You can use the JS SDK and run it in an Android WebView, but I recommend sticking with the plugin so you can leverage the native SDKs.
Ok @msach22
I'll try your recommendation and I'll post any result here.
Thanks a lot
@brunosoune Since this is not an issue with the plugin, I'm going to close this issue. Please feel free to re-open if you have issues using the plugin!
@msach22 the same code wich work using JS SDK, also work using JS wrapper opentok.js?
@brunosoune Yes, it should be working. I recommend checking out the samples here: https://github.com/opentok/opentok-cordova-samples/
In your samples you use this way:
session.connect(token, function() { // publish to the session session.publish(publisher); });
But in tokbox's examples is:
session.connect(token, function(error) { if (error) { console.log(error.message); } else { session.publish(publisher); } });
There are some difference use the if (error).... ?
@brunosoune Yes, it looks like the error handler on the cordova js wrapper is not firing. I'll file an issue and try to patch it in the next release. You should be able to use it without adding the error handler.
Here's the issue: https://github.com/opentok/cordova-plugin-opentok/issues/107
ok @msach22
thanks
I have the error "Browser haven´t support to WebRTC" to IOS
I added the plugin cordova-plugin-opentok and the npm install --save @opentok/client to use @opentok/client/dist/js/opentok.min.js on html...
It work fine to desktop web browser, safari browser in iphone and compiled app android. But in compiled app iphone occur the error above.