opentok-react-native
Advanced tools
Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "opentok-react-native", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "React Native components for OpenTok iOS and Android SDKs", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -22,3 +22,3 @@ import { Platform } from 'react-native'; | ||
const logOT = (apiKey, sessionId) => { | ||
const getLog = (apiKey, sessionId, action, connectionId) => { | ||
const body = { | ||
@@ -30,4 +30,4 @@ payload: { | ||
}, | ||
action: 'rn_initialize', | ||
payload_type: 'info', | ||
action, | ||
partner_id: apiKey, | ||
@@ -37,2 +37,9 @@ session_id: sessionId, | ||
}; | ||
if (connectionId) { | ||
body.connectionId = connectionId; | ||
} | ||
return body; | ||
}; | ||
const logRequest = (body) => { | ||
axios({ | ||
@@ -51,2 +58,6 @@ url: 'https://hlg.tokbox.com/prod/logging/ClientEvent', | ||
const logOT = (apiKey, sessionId, action, connectionId) => { | ||
logRequest(getLog(apiKey, sessionId, action, connectionId)); | ||
}; | ||
export { | ||
@@ -53,0 +64,0 @@ sanitizeBooleanProperty, |
@@ -20,3 +20,3 @@ import React, { Component, Children, cloneElement } from 'react'; | ||
this.createSession(); | ||
logOT(this.props.apiKey, this.props.sessionId); | ||
logOT(this.props.apiKey, this.props.sessionId, 'rn_initialize'); | ||
} | ||
@@ -54,2 +54,3 @@ componentDidUpdate(previousProps) { | ||
}); | ||
logOT(this.props.apiKey, this.props.sessionId, 'rn_on_connect', sessionInfo.connection.connectionId); | ||
const signalData = sanitizeSignalData(this.props.signal); | ||
@@ -56,0 +57,0 @@ OT.sendSignal(signalData, signalData.errorHandler); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94632
627