stagelinq 1.0.4 → 1.0.5

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.
package/devices/Player.ts CHANGED
@@ -172,7 +172,7 @@ export class Player extends EventEmitter {
172
172
  }
173
173
 
174
174
  // If a song is loaded and we have a location emit the trackLoaded event.
175
- if (currentState.trackNetworkPath)
175
+ if (songLoadedSignalPresent && currentState.trackNetworkPath)
176
176
  this.emit('trackLoaded', currentState);
177
177
 
178
178
  // If the song is actually playing emit the nowPlaying event.
@@ -1,7 +1,8 @@
1
1
  import { PlayerLayerState } from '../types';
2
2
 
3
3
  // How long to wait for all the messages to come in before firing the callback.
4
- export const UPDATE_RATE_MS = 500;
4
+ // It seems that anything less than 1 second is too fast.
5
+ export const UPDATE_RATE_MS = 1500;
5
6
 
6
7
  export type DataQueueCallback = (data: PlayerLayerState) => void;
7
8
 
@@ -101,7 +101,7 @@ export class StageLinqDevices extends EventEmitter {
101
101
  this.deviceWatchTimeout = setInterval(async () => {
102
102
  // Check if any devices are still connecting.
103
103
  const values = Array.from(this.discoveryStatus.values());
104
- const foundDevices = values.length > 1;
104
+ const foundDevices = values.length >= 1;
105
105
  const allConnected = !values.includes(ConnectionStatus.CONNECTING);
106
106
 
107
107
  if (foundDevices && allConnected) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stagelinq",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Typescript library to connect to Denon StageLinq devices",
5
5
  "homepage": "https://github.com/chrisle/StageLinq",
6
6
  "scripts": {