opentok-accelerator-core
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -138,3 +138,5 @@ 'use strict'; | ||
var streamMap = state.getStreamMap(); | ||
if (streamMap[stream.id]) { | ||
var streamId = stream.streamId; | ||
if (streamMap[streamId]) { | ||
// Are we already subscribing to the stream? | ||
@@ -147,3 +149,3 @@ resolve(); | ||
var connectionData = JSON.parse(path(['connection', 'data'], stream) || null); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData)); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData, streamId)); | ||
var options = type === 'camera' ? callProperties : screenProperties; | ||
@@ -150,0 +152,0 @@ var subscriber = session.subscribe(stream, container, options, function (error) { |
{ | ||
"name": "opentok-accelerator-core", | ||
"version": "0.0.34", | ||
"version": "0.0.35", | ||
"description": "Opentok Accelerator Core", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/opentok/accelerator-core-js", |
@@ -19,3 +19,3 @@ /* eslint-disable */ | ||
// A container can either be a query selector or an HTML Element | ||
streamContainers(pubSub, type, data){ | ||
streamContainers(pubSub, type, data, streamId){ | ||
return { | ||
@@ -22,0 +22,0 @@ publisher: { |
@@ -138,3 +138,5 @@ 'use strict'; | ||
var streamMap = state.getStreamMap(); | ||
if (streamMap[stream.id]) { | ||
var streamId = stream.streamId; | ||
if (streamMap[streamId]) { | ||
// Are we already subscribing to the stream? | ||
@@ -147,3 +149,3 @@ resolve(); | ||
var connectionData = JSON.parse(path(['connection', 'data'], stream) || null); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData)); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData, streamId)); | ||
var options = type === 'camera' ? callProperties : screenProperties; | ||
@@ -150,0 +152,0 @@ var subscriber = session.subscribe(stream, container, options, function (error) { |
@@ -82,4 +82,5 @@ | ||
* @param {*} data - Parsed connection data associated with the stream | ||
* @param {String} streamId - The stream id (subscriber only) | ||
*/ | ||
streamContainers(pubSub, type, data){ | ||
streamContainers(pubSub, type, data, streamId){ | ||
return { | ||
@@ -86,0 +87,0 @@ publisher: { |
@@ -138,3 +138,5 @@ 'use strict'; | ||
var streamMap = state.getStreamMap(); | ||
if (streamMap[stream.id]) { | ||
var streamId = stream.streamId; | ||
if (streamMap[streamId]) { | ||
// Are we already subscribing to the stream? | ||
@@ -147,3 +149,3 @@ resolve(); | ||
var connectionData = JSON.parse(path(['connection', 'data'], stream) || null); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData)); | ||
var container = dom.query(streamContainers('subscriber', type, connectionData, streamId)); | ||
var options = type === 'camera' ? callProperties : screenProperties; | ||
@@ -150,0 +152,0 @@ var subscriber = session.subscribe(stream, container, options, function (error) { |
@@ -114,3 +114,4 @@ /* global OT */ | ||
const streamMap = state.getStreamMap(); | ||
if (streamMap[stream.id]) { | ||
const { streamId } = stream; | ||
if (streamMap[streamId]) { | ||
// Are we already subscribing to the stream? | ||
@@ -122,3 +123,3 @@ resolve(); | ||
const connectionData = JSON.parse(path(['connection', 'data'], stream) || null); | ||
const container = dom.query(streamContainers('subscriber', type, connectionData)); | ||
const container = dom.query(streamContainers('subscriber', type, connectionData, streamId)); | ||
const options = type === 'camera' ? callProperties : screenProperties; | ||
@@ -125,0 +126,0 @@ const subscriber = session.subscribe(stream, container, options, (error) => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
676041
16061
254