Skip to content

Commit

Permalink
Merge pull request #1 from songz/master
Browse files Browse the repository at this point in the history
Merge opentok master
  • Loading branch information
mark-veenstra committed Jun 16, 2015
2 parents 3c69137 + 4734ba1 commit 3bd3332
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Cordova Plugin for OpenTok iOS
===

[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/songz/cordova-plugin-opentok?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Weave video chat into your web (and now mobile!) application.

## Using Cordova CLI
Make sure You have Cordova 3.5.0 Installed. If you haven't, view [Cordova instructions](http://cordova.apache.org/docs/en/3.5.0/guide_cli_index.md.html) Page.
Make sure You have Cordova 3.5.0 or greater installed. If you haven't, view [Cordova instructions](http://cordova.apache.org/docs/en/3.5.0/guide_cli_index.md.html) Page.
[Bug filed](https://issues.apache.org/jira/browse/CB-6500) against Cordova.

Clone this repo to get the source code for OpenTok's Cordova plugin
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</config-file>

<!-- copy opentok sdk -->
<source-file src="src/android/libs/opentok-android-sdk-2.3.1.jar" target-dir="libs/" />
<source-file src="src/android/libs/opentok-android-sdk-2.5.0.jar" target-dir="libs/" />
<source-file src="src/android/libs/armeabi/libopentok.so" target-dir="libs/armeabi" />
<source-file src="src/android/libs/x86/libopentok.so" target-dir="libs/x86" />

Expand Down
43 changes: 26 additions & 17 deletions src/android/com/tokbox/cordova/OpenTokAndroidPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

import com.opentok.android.Connection;
import com.opentok.android.OpentokError;
import com.opentok.android.Publisher;
import com.opentok.android.PublisherKit;
import com.opentok.android.Session;
import com.opentok.android.Stream;
import com.opentok.android.Stream.StreamVideoType;
import com.opentok.android.Subscriber;
import com.opentok.android.SubscriberKit;

Expand Down Expand Up @@ -685,24 +687,31 @@ public void triggerJSEvent(String event, String type, JSONObject data ){
myEventListeners.get(event).sendPluginResult(myResult);
}

@Override
public void onError(PublisherKit arg0, OpentokError arg1) {
// TODO Auto-generated method stub
@Override
public void onError(PublisherKit arg0, OpentokError arg1) {
// TODO Auto-generated method stub

}

}

@Override
public void onStreamCreated(PublisherKit arg0, Stream arg1) {
// TODO Auto-generated method stub
@Override
public void onStreamCreated(PublisherKit arg0, Stream arg1) {
// TODO Auto-generated method stub
}

}

@Override
public void onStreamDestroyed(PublisherKit arg0, Stream arg1) {
if(myPublisher != null){
myPublisher.destroyPublisher();
myPublisher = null;
}
}
@Override
public void onStreamDestroyed(PublisherKit arg0, Stream arg1) {
if(myPublisher != null){
myPublisher.destroyPublisher();
myPublisher = null;
}
}

@Override
public void onStreamVideoTypeChanged(Session arg0, Stream arg1,
StreamVideoType arg2) {
// TODO Auto-generated method stub

}
}

Binary file modified src/android/libs/armeabi/libopentok.so
Binary file not shown.
Binary file removed src/android/libs/opentok-android-sdk-2.3.1.jar
Binary file not shown.
Binary file added src/android/libs/opentok-android-sdk-2.5.0.jar
Binary file not shown.
Binary file modified src/android/libs/x86/libopentok.so
Binary file not shown.
2 changes: 1 addition & 1 deletion www/opentok.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ TBSession = (function() {
element = streamElements[elementId];
if (element) {
element.parentNode.removeChild(element);
delete streamElements[streamId];
delete streamElements[elementId];
TBUpdateObjects();
}
return Cordova.exec(TBSuccess, TBError, OTPlugin, "unsubscribe", [subscriber.streamId]);
Expand Down

0 comments on commit 3bd3332

Please sign in to comment.