OpenTok not connecting (cordova-plugin-whitelist policy?)


Hi All,

I’m trying to get working with Ionic. I was making good progress integrating with the plugin until I need to create a session connection with OpenTok.

Which is becoming quite difficult to debug because:

  1. No errors were thrown (I’m using Weinre to track console logs)
  2. There is a call back function that never gets called (which is why I know the connection was not established)
  3. I did see a warning "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin". I did add the following to my config.xml in my root folder, but it didn’t seem to solve the problem:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> myOpentokApp ... ... >```

So, my guess is that the whitelist policy is preventing me from establishing a connection. If that is the case, how can I resolve the whitelist issue?

If there is something else that I have overlooked, please let me know too!

I’m currently testing on Android 4.0.0.

Thanks in advance!



Add in index.html page.

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">

And add this plugin:

It may solve this issue.


Thanks motiurion! That did get rid of the whitelist warning!!!

But, the opentok talk connection is still not getting established… :grin:


I found these things related your issue. it ma help.


Oh! Let me take a look at them! Thanks for the references!