cordova-plugin-opentok icon indicating copy to clipboard operation
cordova-plugin-opentok copied to clipboard

OpenTok Cordova initPublisher not consistent with OpenTok JS

Open ertanden opened this issue 9 years ago • 8 comments

Latest OpenTok JS has the initPublisher function with following parameters:

OT.initPublisher(targetElement, properties, completionHandler)

But, OpenTok Cordova plugin expects something like;

OT.initPublisher(apiKey, targetElement, properties)

It would be great to have Cordova plugin APIs up to date, so that we can use same code in both web and mobile apps...

ertanden avatar Jun 10 '15 09:06 ertanden

+1

ghost avatar Jun 12 '15 00:06 ghost

Hi @ertanden, I'm currently using the 64bit that aullman posted on his repo (posted just a 1 or 2 months ago) and I'm using the 1st version of initPublisher that you've posted except that it's not from the OT object but from the TB object. Cordova version uses the TB not OT object.

TB.initPublisher(targetElement, properties, completionHandler)

Hope this helps.

byronalfonso avatar Jun 15 '15 09:06 byronalfonso

Hi @byronalfonso, changes from @aullman are already merged into this repository as far as I see and the problem is the same.

I don't think TB object or OT object makes a difference. But anyways, OT is the new official object by the latest OpenTok documentation.

I would really like to have first class Cordova support for OpenTok with fully sync APIs.

ertanden avatar Jun 15 '15 11:06 ertanden

As I've mentioned.. I'm using an older version of the Opentok Cordova and on that version, I'm calling the initPublisher that way and it works for me... Btw, regarding the support, I think I've read somewhere in the Opentok forums that Cordova is not "officially" supported by the Opentok/Tokbox team, I'm not 100% though if this is the case right now as I don't have the link for that discussion anymore and I can't remember the date. Anyways.. I'm glad to know that aullman's version has been merged already I've actually been wanting and planning to update one of these days.. Thanks for the info!

byronalfonso avatar Jun 15 '15 14:06 byronalfonso

  1. Yes my 64-bit version has been merged into this repo.
  2. This plugin is not officially supported by OpenTok even though some of the maintainers are on the OpenTok team. We are basically working on it in our spare time at the moment. We would love to get a community of contributors helping to maintain it.
  3. For the main question about the different initPublisher API's, you're right we have changed the spec so you no longer require the apiKey for the official OpenTok. But the old way still works, so if you want to single source your code you can just use the old way that the cordova plugin works and it should work for the official opentok.js as well because it's backwards compatible. Unfortunately there is no completionHandler though. We should add that. Again, would love for anyone to contribute that if they have the time.

aullman avatar Jun 16 '15 04:06 aullman

Hi @aullman. Thanks for the clarification! :+1: I would love to contribute in any way I can but I can't with the current level of expertise I have on this matter. Hopefully I get better and be able to in the future. Let's see :)

byronalfonso avatar Jun 17 '15 10:06 byronalfonso

Thanks for clarifications @aullman. I would like to contribute, but it's not always possible because of tight project schedules. I would love to see official support for Cordova from OpenTok.

ertanden avatar Jun 18 '15 07:06 ertanden

We should all be focused on this repo, which is easilier maintained by everyone: https://github.com/aoberoi/cordova-plugin-opentokjs

mark-veenstra avatar Nov 12 '15 08:11 mark-veenstra