Skip to content

Commit

Permalink
connection data, type -> userType
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Feb 24, 2022
1 parent d1c19c0 commit 3deced6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.2.0
version: 2.2.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86
description: Vonage (formerly OpenTok) Titanium module
Expand Down
10 changes: 7 additions & 3 deletions android/src/ti/vonage/TiVonageModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import pub.devrel.easypermissions.AfterPermissionGranted;
import pub.devrel.easypermissions.EasyPermissions;

@Kroll.module(name = "TiOpentok", id = "ti.vonage", propertyAccessors = {"apiKey", "token", "sessionId"})
@Kroll.module(name = "TiVonage", id = "ti.vonage", propertyAccessors = {"apiKey", "token", "sessionId"})
public class TiVonageModule extends KrollModule implements Session.SessionListener, PublisherKit.PublisherListener {

// Standard Debugging variables
Expand Down Expand Up @@ -145,7 +145,7 @@ public void onConnected(Session session) {
vp.createView(TiApplication.getAppCurrentActivity());

kd.put("view", vp);
kd.put("type", "published");
kd.put("userType", "published");
fireEvent("streamReceived", kd);
mSession.publish(mPublisher);
}
Expand All @@ -167,8 +167,12 @@ public void onStreamReceived(Session session, Stream stream) {
vp.createView(TiApplication.getAppCurrentActivity());

kd.put("view", vp);
kd.put("type", "subscriber");
kd.put("userType", "subscriber");
kd.put("streamId", stream.getStreamId());
kd.put("connectionData", stream.getConnection().getData());
kd.put("connectionId", stream.getConnection().getConnectionId());
kd.put("connectionCreationTime", stream.getConnection().getCreationTime());

fireEvent("streamReceived", kd);
}

Expand Down

0 comments on commit 3deced6

Please sign in to comment.