livedesk 0.1.420 → 0.1.421

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.
@@ -20,6 +20,8 @@ export function planMode4AtlasInputTransitions(previous = {}, next = {}) {
20
20
  const captureSizeChanged = previousIds.size > 0
21
21
  && (Number(previous.tileWidth || 0) !== Number(next.tileWidth || 0)
22
22
  || Number(previous.tileHeight || 0) !== Number(next.tileHeight || 0));
23
+ const captureFpsChanged = previousIds.size > 0
24
+ && Number(previous.inputFps || 0) !== Number(next.inputFps || 0);
23
25
  const stop = [...previousIds].filter(deviceId => !nextIds.has(deviceId));
24
26
  const start = [];
25
27
  const restart = [];
@@ -32,7 +34,7 @@ export function planMode4AtlasInputTransitions(previous = {}, next = {}) {
32
34
  }
33
35
  const previousMonitorIndex = Number(previousMonitorSelections[deviceId] || 0);
34
36
  const nextMonitorIndex = Number(nextMonitorSelections[deviceId] || 0);
35
- if (captureSizeChanged || previousMonitorIndex !== nextMonitorIndex) {
37
+ if (captureSizeChanged || captureFpsChanged || previousMonitorIndex !== nextMonitorIndex) {
36
38
  restart.push(deviceId);
37
39
  } else {
38
40
  unchanged.push(deviceId);
package/hub/src/server.js CHANGED
@@ -2306,6 +2306,7 @@ function configureMode4Atlas(ws, payload = {}) {
2306
2306
  });
2307
2307
  const tileWidth = tileSize.width;
2308
2308
  const tileHeight = tileSize.height;
2309
+ const inputFps = clampNumber(payload.inputFps, 1, 30, 8);
2309
2310
  const previousInputDeviceIds = ws.liveDeskAtlasInputDeviceIds instanceof Set
2310
2311
  ? new Set(ws.liveDeskAtlasInputDeviceIds)
2311
2312
  : new Set();
@@ -2339,16 +2340,18 @@ function configureMode4Atlas(ws, payload = {}) {
2339
2340
  }
2340
2341
  ws.liveDeskAtlasDeviceIds = new Set(deviceIds);
2341
2342
  ws.liveDeskAtlasInputDeviceIds = new Set(captureDeviceIds);
2342
- ws.liveDeskAtlasInputOptions = { tileWidth, tileHeight, monitorSelections };
2343
+ ws.liveDeskAtlasInputOptions = { tileWidth, tileHeight, inputFps, monitorSelections };
2343
2344
  const inputTransitions = planMode4AtlasInputTransitions({
2344
2345
  inputDeviceIds: [...previousInputDeviceIds],
2345
2346
  tileWidth: previousInputOptions.tileWidth,
2346
2347
  tileHeight: previousInputOptions.tileHeight,
2348
+ inputFps: previousInputOptions.inputFps,
2347
2349
  monitorSelections: previousInputOptions.monitorSelections
2348
2350
  }, {
2349
2351
  inputDeviceIds: captureDeviceIds,
2350
2352
  tileWidth,
2351
2353
  tileHeight,
2354
+ inputFps,
2352
2355
  monitorSelections
2353
2356
  });
2354
2357
  for (const deviceId of inputTransitions.stop) {
@@ -2368,10 +2371,11 @@ function configureMode4Atlas(ws, payload = {}) {
2368
2371
  deviceIds,
2369
2372
  captureDeviceIds,
2370
2373
  inputMode: 'mode2-lzo',
2371
- outputMode: 'mode4-h264-atlas',
2372
- tileWidth,
2373
- tileHeight,
2374
- timestamp: new Date().toISOString()
2374
+ outputMode: 'mode4-h264-atlas',
2375
+ tileWidth,
2376
+ tileHeight,
2377
+ inputFps,
2378
+ timestamp: new Date().toISOString()
2375
2379
  });
2376
2380
  }
2377
2381
 
@@ -2379,7 +2383,7 @@ function startMode4AtlasInput(ws, deviceId, reason = 'atlas-configure', { forceR
2379
2383
  const options = ws?.liveDeskAtlasInputOptions;
2380
2384
  if (!options || !ws.liveDeskAtlasInputDeviceIds?.has(deviceId)) return { ok: false, error: 'atlas-device-not-configured' };
2381
2385
  return remoteHub.startLiveStream(deviceId, {
2382
- fps: 8,
2386
+ fps: options.inputFps,
2383
2387
  maxWidth: options.tileWidth,
2384
2388
  maxHeight: options.tileHeight,
2385
2389
  quality: 60,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livedesk",
3
- "version": "0.1.420",
3
+ "version": "0.1.421",
4
4
  "livedeskClientVersion": "0.1.182",
5
5
  "buildFlavor": "production",
6
6
  "description": "LiveDesk Hub and client launcher",