@soundworks/core
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -94,2 +94,3 @@ "use strict"; | ||
let url; | ||
let webSocketOptions; | ||
@@ -103,4 +104,5 @@ if (isBrowser()) { | ||
url = `${protocol}//${hostname}:${port}/${path}`; | ||
webSocketOptions = {}; | ||
} else { | ||
const protocol = config.useHttps ? 'wss:' : 'ws:'; | ||
const protocol = config.env.useHttps ? 'wss:' : 'ws:'; | ||
const { | ||
@@ -111,2 +113,5 @@ serverIp, | ||
url = `${protocol}//${serverIp}:${port}/${path}`; | ||
webSocketOptions = { | ||
rejectUnauthorized: false | ||
}; | ||
} | ||
@@ -122,3 +127,3 @@ | ||
log(`[string socket] trying connection - url: ${stringSocketUrl}`); | ||
const ws = new _isomorphicWs.default(stringSocketUrl); | ||
const ws = new _isomorphicWs.default(stringSocketUrl, webSocketOptions); | ||
ws.addEventListener('open', connectEvent => { | ||
@@ -161,3 +166,3 @@ // parse incoming messages for pubsub | ||
log(`[binary socket] trying connection - url: ${binarySocketUrl}`); | ||
const ws = new _isomorphicWs.default(binarySocketUrl); | ||
const ws = new _isomorphicWs.default(binarySocketUrl, webSocketOptions); | ||
ws.binaryType = 'arraybuffer'; | ||
@@ -164,0 +169,0 @@ ws.addEventListener('open', connectEvent => { |
{ | ||
"name": "@soundworks/core", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "full-stack javascript framework for distributed audio visual experiences on the web", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -313,2 +313,4 @@ "use strict"; | ||
// ------------------------------------------------------------ | ||
// we should at least have one activity registered for each client here | ||
// i.e. the Experience so it's ok | ||
this.activities.forEach(activity => { | ||
@@ -576,2 +578,7 @@ activity.clientTypes.forEach(clientType => { | ||
const activities = this._clientTypeActivitiesMap[clientType]; | ||
if (activities == undefined) { | ||
throw new Error(`No activity registered for "${clientType}" clients, make sure an Experience has been initialized for this client (see src/server/index.js)`); | ||
} | ||
socket.addListener('close', () => { | ||
@@ -578,0 +585,0 @@ // clean sockets |
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
168884
4166