Socket
Socket
Sign inDemoInstall

opentok-react-native

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentok-react-native - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

7

package.json
{
"name": "opentok-react-native",
"version": "0.3.0",
"version": "0.3.1",
"description": "React Native components for OpenTok iOS and Android SDKs",

@@ -30,3 +30,4 @@ "main": "src/index.js",

"underscore": "^1.8.3",
"prop-types": "^15.6.0"
"prop-types": "^15.6.0",
"axios": "^0.18.0"
},

@@ -44,4 +45,4 @@ "devDependencies": {

"react": "16.2.0",
"react-native": "0.51.0"
"react-native": "^0.51.0"
}
}
import { Platform } from 'react-native';
import { handleError } from '../OTError';
import { each } from 'underscore';
import axios from 'axios';
const _ = require('underscore');
const reassignEvents = (type, customEvents, events) => {

@@ -10,3 +10,3 @@ const newEvents = {};

const platform = Platform.OS;
_.each(events, (eventHandler, eventType) => {
each(events, (eventHandler, eventType) => {
if (customEvents[platform][eventType] !== undefined) {

@@ -36,10 +36,8 @@ newEvents[`${preface}${customEvents[platform][eventType]}`] = eventHandler;

};
fetch('https://hlg.tokbox.com/prod/logging/ClientEvent', {
body: JSON.stringify(body),
axios({
url: 'https://hlg.tokbox.com/prod/logging/ClientEvent',
method: 'post',
data: JSON.stringify(body),
})
.then(() => {
// initial response
})
.then(() => {
// response complete

@@ -46,0 +44,0 @@ })

import { NativeModules, NativeEventEmitter, PermissionsAndroid } from 'react-native';
import { each } from 'underscore';
const _ = require('underscore');
const OT = NativeModules.OTSessionManager;

@@ -26,3 +25,3 @@ const nativeEvents = new NativeEventEmitter(OT);

permissionsError.permissionsDenied = [];
_.each(result, (permissionValue, permissionType) => {
each(result, (permissionValue, permissionType) => {
if (permissionValue === 'denied') {

@@ -73,3 +72,3 @@ permissionsError.permissionsDenied.push(permissionType);

OT.setNativeEvents(eventNames);
_.each(events, (eventHandler, eventType) => {
each(events, (eventHandler, eventType) => {
const allEvents = nativeEvents.listeners();

@@ -85,3 +84,3 @@ if (!allEvents.includes(eventType)) {

OT.removeNativeEvents(eventNames);
_.each(events, (eventHandler, eventType) => {
each(events, (eventHandler, eventType) => {
nativeEvents.removeListener(eventType, eventHandler);

@@ -88,0 +87,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc