@basmilius/apple-airplay 0.0.94 → 0.0.96
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 +16 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1866,7 +1866,7 @@ class AirPlayDataStream extends AirPlayStream {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
} catch (err) {
|
|
1869
|
-
reporter.error("Error in data stream onData()", err);
|
|
1869
|
+
reporter.error("Error in data stream #onData()", err);
|
|
1870
1870
|
this.emit("error", err);
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
@@ -2142,17 +2142,22 @@ class AirPlayEventStream extends AirPlayStream {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
async#onData(buffer) {
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
while (this.#buffer.byteLength > 0) {
|
|
2150
|
-
const result = makeHttpRequest(this.#buffer);
|
|
2151
|
-
if (result === null) {
|
|
2152
|
-
return;
|
|
2145
|
+
try {
|
|
2146
|
+
this.#buffer = Buffer.concat([this.#buffer, buffer]);
|
|
2147
|
+
if (this.isEncrypted) {
|
|
2148
|
+
this.#buffer = await this.decrypt(this.#buffer);
|
|
2153
2149
|
}
|
|
2154
|
-
this.#buffer
|
|
2155
|
-
|
|
2150
|
+
while (this.#buffer.byteLength > 0) {
|
|
2151
|
+
const result = makeHttpRequest(this.#buffer);
|
|
2152
|
+
if (result === null) {
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
this.#buffer = this.#buffer.subarray(result.requestLength);
|
|
2156
|
+
await this.#handle(result.method, result.path, result.headers, result.body);
|
|
2157
|
+
}
|
|
2158
|
+
} catch (err) {
|
|
2159
|
+
reporter2.error("Error in event stream #onData()", err);
|
|
2160
|
+
this.emit("error", err);
|
|
2156
2161
|
}
|
|
2157
2162
|
}
|
|
2158
2163
|
}
|
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.96",
|
|
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.96",
|
|
45
|
+
"@basmilius/apple-encoding": "0.0.96",
|
|
46
46
|
"@bufbuild/protobuf": "^2.10.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|