opentok-accelerator-core
Advanced tools
Comparing version 2.0.13 to 2.0.14
@@ -173,3 +173,3 @@ # OpenTok Accelerator Core API Methods | ||
### `subscribe(stream, subscriberProperties)` | ||
### `subscribe(stream, subscriberProperties = {}, networkTest = false)` | ||
@@ -184,2 +184,4 @@ *Subscribe to a stream and update the state* | ||
**stream**: `Boolean` Optional boolean indicating that we are subscribing to our own publisher as part of a network test | ||
**Returns**: `Promise => <resolve: Subscriber, reject: Error >` | ||
@@ -243,2 +245,1 @@ | ||
* * * | ||
@@ -70,3 +70,2 @@ 'use strict'; | ||
// Init analytics | ||
this.applicationName = options.applicationName; | ||
this.analytics = new Analytics(window.location.origin, credentials.sessionId, null, credentials.apiKey); | ||
@@ -73,0 +72,0 @@ this.analytics.log(logAction.init, logVariation.attempt); |
@@ -40,3 +40,3 @@ 'use strict'; | ||
var Analytics = function Analytics(source, sessionId, connectionId, apikey, applicationName) { | ||
var Analytics = function Analytics(source, sessionId, connectionId, apikey) { | ||
_classCallCheck(this, Analytics); | ||
@@ -47,6 +47,6 @@ | ||
var otkanalyticsData = { | ||
clientVersion: 'js-vsol-2.0.13', // x.y.z filled by npm build script | ||
clientVersion: 'js-vsol-2.0.11', // x.y.z filled by npm build script | ||
source: source, | ||
componentId: 'acceleratorCore', | ||
name: applicationName || 'coreAccelerator', | ||
name: 'coreAccelerator', | ||
partnerId: apikey | ||
@@ -53,0 +53,0 @@ }; |
@@ -243,3 +243,3 @@ 'use strict'; | ||
var subscriber = subscribers.camera[subscriberId] || subscribers.screen[subscriberId]; | ||
subscriber && subscriber.subscribeToAudio(enable); | ||
subscriber && subscriber.subscribeToVideo(enable); | ||
} | ||
@@ -262,3 +262,3 @@ | ||
var subscriber = subscribers.camera[subscriberId] || subscribers.screen[subscriberId]; | ||
subscriber && subscriber.subscribeToVideo(enable); | ||
subscriber && subscriber.subscribeToAudio(enable); | ||
} | ||
@@ -265,0 +265,0 @@ |
{ | ||
"name": "opentok-accelerator-core", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"description": "Opentok Accelerator Core", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/opentok/accelerator-core-js", |
@@ -135,5 +135,6 @@ /* global OT */ | ||
* @param {Object} [subsriberOptions] | ||
* @param {Boolean} [networkTest] - Are we subscribing to our own publisher for a network test? | ||
* @returns {Promise} <resolve: Object, reject: Error > | ||
*/ | ||
subscribe = (stream, subscriberProperties = {}) => { | ||
subscribe = (stream, subscriberProperties = {}, networkTest = false) => { | ||
const { analytics, state, streamContainers, session, triggerEvent, callProperties, screenProperties } = this; | ||
@@ -147,3 +148,3 @@ return new Promise((resolve, reject) => { | ||
const type = pathOr('sip', 'videoType', stream); | ||
if (streamMap[streamId]) { | ||
if (streamMap[streamId] && !networkTest) { | ||
// Are we already subscribing to the stream? | ||
@@ -158,3 +159,3 @@ const { subscribers } = state.all(); | ||
} | ||
const container = dom.query(streamContainers('subscriber', type, connectionData, stream)); | ||
const container = dom.element(streamContainers('subscriber', type, connectionData, stream)); | ||
const options = Object.assign( | ||
@@ -161,0 +162,0 @@ {}, |
@@ -527,5 +527,7 @@ /* global OT */ | ||
* @param {Object} [subscriberProperties] - https://tokbox.com/developer/sdks/js/reference/Session.html#subscribe | ||
* @param {Boolean} [networkTest] - Subscribing to our own publisher as part of a network test? | ||
* @returns {Promise} <resolve: Subscriber, reject: Error> | ||
*/ | ||
subscribe = (stream, subscriberProperties) => this.communication.subscribe(stream, subscriberProperties) | ||
subscribe = (stream, subscriberProperties, networkTest = false) => | ||
this.communication.subscribe(stream, subscriberProperties, networkTest) | ||
@@ -532,0 +534,0 @@ /** |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
5
4
626284
50
14528