songz / cordova-plugin-opentok

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

About connecting web demo #1

Closed kuvark closed 10 years ago

kuvark commented 10 years ago

Hi, i build an application with cordova plugin. Everything runs ok. But in android, application couldnt connect to https://opentokrtc.com/cordova

The other problem is, i got an api key, how can i use this in cordova & android?

Thanks

songz commented 10 years ago

Try this to connect to cordova: run the application with the command cordova run --device instead of importing project in eclipse

With an Api Key, simply take out the ajax request. Replace data.apiKey with you apiKey, replace data.sid and data.token with your own session Id/token generated from your server side (or on dashboard) -> https://dashboard.tokbox.com/

songz commented 10 years ago

What android device are you testing this on?

kuvark commented 10 years ago

Hi

I ve tested iphone 5s and galaxy s4. Your cordova sample works good but when i create a token and session id as a subacriber it didnt worked for me. Also i coded a web client too. You got any sample?

14 Mart 2014 Cuma tarihinde, Song Zheng notifications@github.com yazdý:

What android device are you testing this on?

Reply to this email directly or view it on GitHubhttps://github.com/songz/cordova-plugin-opentok/issues/1#issuecomment-37690388 .

Gökhan Gökçe

Bilgisayar Mühendisi www.gokhangokce.info

songz commented 10 years ago

When you generate a token for your sessionId, did you set role to subscriber? Subscribers do not have publishing rights and will not be able to stream video. If you don't set any role, token's permission will default to publisher (with will give users using that token publishing and subscribing rights)

kuvark commented 10 years ago

Ok,

I ve also tried that as a subscriber on the web side. As you say my mistake can be about the data in cordova.json tomorrow i ll take a new publisher token and sid and try again, thank you so much

15 Mart 2014 Cumartesi tarihinde, Song Zheng notifications@github.com yazdý:

When you generate a token for your sessionId, did you set role to subscriber? Subscribers do not have publishing rights and will not be able to stream video. If you don't set any role, token's permission will default to publisher (with will give users using that token publishing and subscribing rights)

Reply to this email directly or view it on GitHubhttps://github.com/songz/cordova-plugin-opentok/issues/1#issuecomment-37704573 .

Gökhan Gökçe

Bilgisayar Mühendisi www.gokhangokce.info

songz commented 10 years ago

So just so I understand you correctly, sample works fine for on iOS and Android correct? You can see each other using example code and https://opentokrtc.com/cordova ?

When you use your own credentials (apikey, sessionId, token), then you cannot see yourself? Are you getting a sessionConnected event?

kuvark commented 10 years ago

Yeah, on your sample ips android and web connected

15 Mart 2014 Cumartesi tarihinde, Song Zheng notifications@github.com yazdý:

So just so I understand you correctly, sample works fine for on iOS and Android correct? You can see each other using example code and https://opentokrtc.com/cordova ?

When you use your own credentials (apikey, sessionId, token), then you cannot see yourself? Are you getting a sessionConnected event?

Reply to this email directly or view it on GitHubhttps://github.com/songz/cordova-plugin-opentok/issues/1#issuecomment-37704761 .

Gökhan Gökçe

Bilgisayar Mühendisi www.gokhangokce.info

songz commented 10 years ago

Awesome! Let me know if you can get your own credentials working tomorrow. Good Luck!

kuvark commented 10 years ago

hi Song ,

I ve created a publisher session & token. Added it into my html page and cordova.json and put them on web.

Android device and web sample couldnt connect each other. ,,what do you think about it?

2014-03-15 1:06 GMT+02:00 Song Zheng notifications@github.com:

Awesome! Let me know if you can get your own credentials working tomorrow. Good Luck!

Reply to this email directly or view it on GitHubhttps://github.com/songz/cordova-plugin-opentok/issues/1#issuecomment-37706390 .

Gökhan Gökçe

Bilgisayar Mühendisi www.gokhangokce.info

songz commented 10 years ago

Hmmm I'm really not sure. It works for me. Does your android logcat show any bugs?

songz commented 10 years ago

Cannot replicate. I've update Android SDK to 2.2, hopefully that will solve your problem. If not, please reopen an issue. https://github.com/songz/cordova-plugin-opentok/commit/b82aa3d98d07d1d91221e8e3b398ad548178bd4f