lox-airplay-sender 0.3.2 → 0.3.3
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/dist/core/audioOut.js +2 -1
- package/dist/core/rtsp.js +2 -1
- package/dist/esm/core/audioOut.js +2 -1
- package/dist/esm/core/rtsp.js +2 -1
- package/package.json +1 -1
package/dist/core/audioOut.js
CHANGED
|
@@ -47,9 +47,10 @@ class AudioOut extends node_events_1.EventEmitter {
|
|
|
47
47
|
packet.timestamp = (0, numUtil_1.low32)(seq * config_1.default.frames_per_packet + 2 * config_1.default.sampling_rate);
|
|
48
48
|
if (this.hasAirTunes && seq % config_1.default.sync_period === 0) {
|
|
49
49
|
this.emit('need_sync', seq);
|
|
50
|
+
const nowMs = node_perf_hooks_1.performance.now();
|
|
50
51
|
const expectedTimeMs = this.rtpTimeRef +
|
|
51
52
|
((seq * config_1.default.frames_per_packet) / config_1.default.sampling_rate) * 1000;
|
|
52
|
-
const deltaMs =
|
|
53
|
+
const deltaMs = nowMs - expectedTimeMs;
|
|
53
54
|
this.emit('metrics', { type: 'sync', seq, deltaMs, latencyFrames: this.latencyFrames });
|
|
54
55
|
}
|
|
55
56
|
this.emit('packet', packet);
|
package/dist/core/rtsp.js
CHANGED
|
@@ -1636,7 +1636,8 @@ Client.prototype.processData = function (blob, rawData) {
|
|
|
1636
1636
|
;
|
|
1637
1637
|
break;
|
|
1638
1638
|
case SETPROGRESS:
|
|
1639
|
-
|
|
1639
|
+
// After reporting progress, stay in PLAYING; avoid forcing FLUSH on every update.
|
|
1640
|
+
this.status = PLAYING;
|
|
1640
1641
|
break;
|
|
1641
1642
|
case SETDAAP:
|
|
1642
1643
|
this.status = PLAYING;
|
|
@@ -47,9 +47,10 @@ class AudioOut extends node_events_1.EventEmitter {
|
|
|
47
47
|
packet.timestamp = (0, numUtil_1.low32)(seq * config_1.default.frames_per_packet + 2 * config_1.default.sampling_rate);
|
|
48
48
|
if (this.hasAirTunes && seq % config_1.default.sync_period === 0) {
|
|
49
49
|
this.emit('need_sync', seq);
|
|
50
|
+
const nowMs = node_perf_hooks_1.performance.now();
|
|
50
51
|
const expectedTimeMs = this.rtpTimeRef +
|
|
51
52
|
((seq * config_1.default.frames_per_packet) / config_1.default.sampling_rate) * 1000;
|
|
52
|
-
const deltaMs =
|
|
53
|
+
const deltaMs = nowMs - expectedTimeMs;
|
|
53
54
|
this.emit('metrics', { type: 'sync', seq, deltaMs, latencyFrames: this.latencyFrames });
|
|
54
55
|
}
|
|
55
56
|
this.emit('packet', packet);
|
package/dist/esm/core/rtsp.js
CHANGED
|
@@ -1636,7 +1636,8 @@ Client.prototype.processData = function (blob, rawData) {
|
|
|
1636
1636
|
;
|
|
1637
1637
|
break;
|
|
1638
1638
|
case SETPROGRESS:
|
|
1639
|
-
|
|
1639
|
+
// After reporting progress, stay in PLAYING; avoid forcing FLUSH on every update.
|
|
1640
|
+
this.status = PLAYING;
|
|
1640
1641
|
break;
|
|
1641
1642
|
case SETDAAP:
|
|
1642
1643
|
this.status = PLAYING;
|