@clockworkdog/cogs-client 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -385,4 +385,3 @@ function log(...data) {
385
385
  function isFadeValid(fade) {
386
386
  return typeof fade === 'number' && !isNaN(fade) && fade > 0;
387
387
  }
388
- //# sourceMappingURL=AudioPlayer.js.map
@@ -133,11 +133,12 @@ function websocketParametersFromUrl(url) {
133
133
  const localClientId = pathParams.get('local_id');
134
134
  const isSimulator = pathParams.get('simulator') === 'true';
135
135
  const display = (_a = pathParams.get('display')) !== null && _a !== void 0 ? _a : '';
136
+ const pluginId = parsedUrl.pathname.startsWith('/plugin/') ? parsedUrl.pathname.split('/')[2] : undefined;
136
137
  if (localClientId) {
137
138
  const type = (_b = pathParams.get('t')) !== null && _b !== void 0 ? _b : '';
138
139
  pathParams.delete('local_id');
139
140
  return {
140
- path: `/client/local/${encodeURIComponent(localClientId)}`,
141
+ path: `/local/${encodeURIComponent(localClientId)}`,
141
142
  pathParams: new URLSearchParams({ t: type }),
142
143
  useReconnectingWebsocket: true,
143
144
  };
@@ -154,10 +155,12 @@ function websocketParametersFromUrl(url) {
154
155
  pathParams.delete('displayIdIndex');
155
156
  return { path: `/display/${encodeURIComponent(display)}/${encodeURIComponent(displayIdIndex)}` };
156
157
  }
158
+ else if (pluginId) {
159
+ return { path: `/plugin/${encodeURIComponent(pluginId)}`, useReconnectingWebsocket: true };
160
+ }
157
161
  else {
158
162
  const serial = (_e = pathParams.get('serial')) !== null && _e !== void 0 ? _e : '';
159
163
  pathParams.delete('serial');
160
164
  return { path: `/client/${encodeURIComponent(serial)}`, pathParams };
161
165
  }
162
166
  }
163
- //# sourceMappingURL=CogsConnection.js.map
@@ -304,4 +304,3 @@ exports.default = VideoPlayer;
304
304
  function preloadString(preload) {
305
305
  return typeof preload === 'string' ? preload : preload ? 'metadata' : 'none';
306
306
  }
307
- //# sourceMappingURL=VideoPlayer.js.map