lox-airplay-sender 0.3.5 → 0.3.7

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.
@@ -153,7 +153,8 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
153
153
  }
154
154
  this.needPassword = false;
155
155
  this.needPin = false;
156
- this.transient = false;
156
+ const transientOption = options?.transient;
157
+ this.transient = typeof transientOption === 'boolean' ? transientOption : false;
157
158
  let d = this.txt.filter((u) => String(u).startsWith('features='));
158
159
  if (d.length === 0)
159
160
  d = this.txt.filter((u) => String(u).startsWith('ft='));
@@ -162,9 +163,6 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
162
163
  ...(features_set.length > 0 ? parseInt(features_set[0], 10).toString(2).split('') : []),
163
164
  ...(features_set.length > 1 ? parseInt(features_set[1], 10).toString(2).split('') : []),
164
165
  ];
165
- if (this.features.length > 0) {
166
- this.transient = (this.features[this.features.length - 1 - 48] == '1');
167
- }
168
166
  if (this.statusflags.length) {
169
167
  let PasswordRequired = (this.statusflags[this.statusflags.length - 1 - 7] == '1');
170
168
  let PinRequired = (this.statusflags[this.statusflags.length - 1 - 3] == '1');
@@ -172,10 +170,6 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
172
170
  // console.debug('needPss', PasswordRequired, PinRequired, OneTimePairingRequired);
173
171
  this.needPassword = PasswordRequired;
174
172
  this.needPin = (PinRequired || OneTimePairingRequired);
175
- this.transient = !(PasswordRequired || PinRequired || OneTimePairingRequired);
176
- }
177
- if (this.airplay2 && this.statusflags.length === 0 && !this.needPassword && !this.needPin) {
178
- this.transient = true;
179
173
  }
180
174
  // console.debug('transient', this.transient);
181
175
  // detect old shairports with broken text
@@ -153,7 +153,8 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
153
153
  }
154
154
  this.needPassword = false;
155
155
  this.needPin = false;
156
- this.transient = false;
156
+ const transientOption = options?.transient;
157
+ this.transient = typeof transientOption === 'boolean' ? transientOption : false;
157
158
  let d = this.txt.filter((u) => String(u).startsWith('features='));
158
159
  if (d.length === 0)
159
160
  d = this.txt.filter((u) => String(u).startsWith('ft='));
@@ -162,9 +163,6 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
162
163
  ...(features_set.length > 0 ? parseInt(features_set[0], 10).toString(2).split('') : []),
163
164
  ...(features_set.length > 1 ? parseInt(features_set[1], 10).toString(2).split('') : []),
164
165
  ];
165
- if (this.features.length > 0) {
166
- this.transient = (this.features[this.features.length - 1 - 48] == '1');
167
- }
168
166
  if (this.statusflags.length) {
169
167
  let PasswordRequired = (this.statusflags[this.statusflags.length - 1 - 7] == '1');
170
168
  let PinRequired = (this.statusflags[this.statusflags.length - 1 - 3] == '1');
@@ -172,10 +170,6 @@ function AirTunesDevice(host, audioOut, options, mode = 0, txt = '') {
172
170
  // console.debug('needPss', PasswordRequired, PinRequired, OneTimePairingRequired);
173
171
  this.needPassword = PasswordRequired;
174
172
  this.needPin = (PinRequired || OneTimePairingRequired);
175
- this.transient = !(PasswordRequired || PinRequired || OneTimePairingRequired);
176
- }
177
- if (this.airplay2 && this.statusflags.length === 0 && !this.needPassword && !this.needPin) {
178
- this.transient = true;
179
173
  }
180
174
  // console.debug('transient', this.transient);
181
175
  // detect old shairports with broken text
@@ -19,7 +19,7 @@ exports.config = {
19
19
  sampling_rate: 44100, // fixed by AirTunes v2
20
20
  sync_period: 126, // UDP sync packets are sent to all AirTunes devices regularly
21
21
  stream_latency: 200, // audio UDP packets are flushed in bursts periodically
22
- rtsp_timeout: 15000, // RTSP servers are considered gone if no reply is received before the timeout
22
+ rtsp_timeout: 2147483647, // RTSP servers are considered gone if no reply is received before the timeout (legacy default)
23
23
  rtsp_heartbeat: 15000, // some RTSP (like HomePod) servers requires heartbeat.
24
24
  rtsp_retry_attempts: 3,
25
25
  rtsp_retry_base_ms: 300,
@@ -19,7 +19,7 @@ exports.config = {
19
19
  sampling_rate: 44100, // fixed by AirTunes v2
20
20
  sync_period: 126, // UDP sync packets are sent to all AirTunes devices regularly
21
21
  stream_latency: 200, // audio UDP packets are flushed in bursts periodically
22
- rtsp_timeout: 15000, // RTSP servers are considered gone if no reply is received before the timeout
22
+ rtsp_timeout: 2147483647, // RTSP servers are considered gone if no reply is received before the timeout (legacy default)
23
23
  rtsp_heartbeat: 15000, // some RTSP (like HomePod) servers requires heartbeat.
24
24
  rtsp_retry_attempts: 3,
25
25
  rtsp_retry_base_ms: 300,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lox-airplay-sender",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "AirPlay sender (RAOP/AirPlay 1 + AirPlay 2 auth flows) ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",