opentok-react-native
Advanced tools
Comparing version 0.8.3 to 0.8.4
{ | ||
"name": "opentok-react-native", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"description": "React Native components for OpenTok iOS and Android SDKs", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -8,3 +8,3 @@ import React, { Component } from 'react'; | ||
import { sanitizeSubscriberEvents, sanitizeProperties } from './helpers/OTSubscriberHelper'; | ||
import { isNull, each, isEqual, isEmpty } from 'underscore'; | ||
import { isNull, isUndefined, each, isEqual, isEmpty } from 'underscore'; | ||
@@ -31,3 +31,3 @@ export default class OTSubscriber extends Component { | ||
componentDidUpdate() { | ||
const { streamProperties } = this.props; | ||
const { streamProperties } = this.props; | ||
if (!isEqual(this.state.streamProperties, streamProperties)) { | ||
@@ -47,7 +47,7 @@ each(streamProperties, (individualStreamProperties, streamId) => { | ||
const events = sanitizeSubscriberEvents(this.props.eventHandlers); | ||
removeNativeEvents(events); | ||
removeNativeEvents(events); | ||
} | ||
streamCreatedHandler = (stream) => { | ||
const { streamProperties, properties } = this.props; | ||
const subscriberProperties = isNull(streamProperties[stream.streamId]) ? | ||
const subscriberProperties = isNull(streamProperties[stream.streamId]) ? | ||
sanitizeProperties(properties) : sanitizeProperties(streamProperties[stream.streamId]); | ||
@@ -81,3 +81,3 @@ OT.subscribeToStream(stream.streamId, subscriberProperties, (error) => { | ||
const streamProperties = this.props.streamProperties[streamId]; | ||
const style = isEmpty(streamProperties) ? this.props.style : isNull(streamProperties.style) ? this.props.style : streamProperties.style; | ||
const style = isEmpty(streamProperties) ? this.props.style : (isUndefined(streamProperties.style) || isNull(streamProperties.style)) ? this.props.style : streamProperties.style; | ||
return <OTSubscriberView key={streamId} streamId={streamId} style={style} /> | ||
@@ -94,3 +94,3 @@ }); | ||
eventHandlers: PropTypes.object, // eslint-disable-line react/forbid-prop-types | ||
streamProperties: PropTypes.object, // eslint-disable-line react/forbid-prop-types | ||
streamProperties: PropTypes.object, // eslint-disable-line react/forbid-prop-types | ||
}; | ||
@@ -97,0 +97,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
168693