@basmilius/apple-airplay 0.0.95 → 0.0.97
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/index.js +15 -10
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2317,17 +2317,22 @@ class AirPlayRTSP extends AirPlayStream {
|
|
|
2317
2317
|
await this.#handle(undefined, new Error("Connection closed."));
|
|
2318
2318
|
}
|
|
2319
2319
|
async#onData(buffer) {
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
while (this.#buffer.byteLength > 0) {
|
|
2325
|
-
const result = makeHttpResponse(this.#buffer);
|
|
2326
|
-
if (result === null) {
|
|
2327
|
-
return;
|
|
2320
|
+
try {
|
|
2321
|
+
this.#buffer = Buffer.concat([this.#buffer, buffer]);
|
|
2322
|
+
if (this.isEncrypted) {
|
|
2323
|
+
this.#buffer = await this.decrypt(this.#buffer);
|
|
2328
2324
|
}
|
|
2329
|
-
this.#buffer
|
|
2330
|
-
|
|
2325
|
+
while (this.#buffer.byteLength > 0) {
|
|
2326
|
+
const result = makeHttpResponse(this.#buffer);
|
|
2327
|
+
if (result === null) {
|
|
2328
|
+
return;
|
|
2329
|
+
}
|
|
2330
|
+
this.#buffer = this.#buffer.subarray(result.responseLength);
|
|
2331
|
+
await this.#handle(result.response, undefined);
|
|
2332
|
+
}
|
|
2333
|
+
} catch (err) {
|
|
2334
|
+
reporter3.error("Error in rtsp #onData()", err);
|
|
2335
|
+
this.emit("error", err);
|
|
2331
2336
|
}
|
|
2332
2337
|
}
|
|
2333
2338
|
async#onError(err) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basmilius/apple-airplay",
|
|
3
3
|
"description": "Implementation of Apple's AirPlay2 in Node.js.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.97",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@basmilius/apple-common": "0.0.
|
|
45
|
-
"@basmilius/apple-encoding": "0.0.
|
|
44
|
+
"@basmilius/apple-common": "0.0.97",
|
|
45
|
+
"@basmilius/apple-encoding": "0.0.97",
|
|
46
46
|
"@bufbuild/protobuf": "^2.10.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|