@basmilius/apple-devices 0.6.6 → 0.7.0
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 +11 -12
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1590,7 +1590,6 @@ class device_default extends EventEmitter2 {
|
|
|
1590
1590
|
async#feedback() {
|
|
1591
1591
|
try {
|
|
1592
1592
|
await this.#protocol.feedback();
|
|
1593
|
-
await this.#protocol.dataStream.exchange(DataStreamMessage3.setConnectionState(Proto5.SetConnectionStateMessage_ConnectionState.Connected));
|
|
1594
1593
|
} catch (err) {
|
|
1595
1594
|
this.#protocol.context.logger.error("Feedback error", err);
|
|
1596
1595
|
}
|
|
@@ -1755,7 +1754,7 @@ class device_default2 extends EventEmitter3 {
|
|
|
1755
1754
|
}
|
|
1756
1755
|
async#heartbeat() {
|
|
1757
1756
|
try {
|
|
1758
|
-
await this.#protocol.
|
|
1757
|
+
await this.#protocol.noOp();
|
|
1759
1758
|
} catch (err) {
|
|
1760
1759
|
this.#protocol.context.logger.error("Heartbeat error", err);
|
|
1761
1760
|
}
|
|
@@ -1780,12 +1779,12 @@ class device_default2 extends EventEmitter3 {
|
|
|
1780
1779
|
const keys = this.#keys;
|
|
1781
1780
|
this.#protocol.stream.enableEncryption(keys.accessoryToControllerKey, keys.controllerToAccessoryKey);
|
|
1782
1781
|
try {
|
|
1783
|
-
await this.#protocol.
|
|
1784
|
-
await this.#protocol.
|
|
1785
|
-
await this.#protocol.
|
|
1786
|
-
await this.#protocol.
|
|
1787
|
-
await this.#protocol.
|
|
1788
|
-
await this.#protocol.
|
|
1782
|
+
await this.#protocol.systemInfo(this.#credentials.pairingId);
|
|
1783
|
+
await this.#protocol.sessionStart();
|
|
1784
|
+
await this.#protocol.tvrcSessionStart();
|
|
1785
|
+
await this.#protocol.touchStart();
|
|
1786
|
+
await this.#protocol.tiStart();
|
|
1787
|
+
await this.#protocol.unsubscribe("_iMC");
|
|
1789
1788
|
this.#heartbeatInterval = setInterval(async () => await this.#heartbeat(), 15000);
|
|
1790
1789
|
await this.#subscribe();
|
|
1791
1790
|
} catch (err) {
|
|
@@ -1795,15 +1794,15 @@ class device_default2 extends EventEmitter3 {
|
|
|
1795
1794
|
}
|
|
1796
1795
|
}
|
|
1797
1796
|
async#subscribe() {
|
|
1798
|
-
await this.#protocol.
|
|
1799
|
-
await this.#protocol.
|
|
1797
|
+
await this.#protocol.subscribe("SystemStatus", this.onSystemStatus);
|
|
1798
|
+
await this.#protocol.subscribe("TVSystemStatus", this.onTVSystemStatus);
|
|
1800
1799
|
const state = await this.getAttentionState();
|
|
1801
1800
|
this.emit("power", state);
|
|
1802
1801
|
}
|
|
1803
1802
|
async#unsubscribe() {
|
|
1804
1803
|
try {
|
|
1805
|
-
await this.#protocol.
|
|
1806
|
-
await this.#protocol.
|
|
1804
|
+
await this.#protocol.unsubscribe("SystemStatus", this.onSystemStatus);
|
|
1805
|
+
await this.#protocol.unsubscribe("TVSystemStatus", this.onTVSystemStatus);
|
|
1807
1806
|
} catch (_) {}
|
|
1808
1807
|
}
|
|
1809
1808
|
async onSystemStatus(data) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basmilius/apple-devices",
|
|
3
3
|
"description": "Exposes various Apple devices to connect with either AirPlay or Companion Link.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public",
|
|
28
|
-
"provenance":
|
|
28
|
+
"provenance": false
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsgo && bun -b build.ts",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@basmilius/apple-airplay": "0.
|
|
47
|
-
"@basmilius/apple-common": "0.
|
|
48
|
-
"@basmilius/apple-companion-link": "0.
|
|
49
|
-
"@basmilius/apple-encoding": "0.
|
|
46
|
+
"@basmilius/apple-airplay": "0.7.0",
|
|
47
|
+
"@basmilius/apple-common": "0.7.0",
|
|
48
|
+
"@basmilius/apple-companion-link": "0.7.0",
|
|
49
|
+
"@basmilius/apple-encoding": "0.7.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@basmilius/tools": "^2.
|
|
53
|
-
"@types/bun": "^1.3.
|
|
52
|
+
"@basmilius/tools": "^2.25.0",
|
|
53
|
+
"@types/bun": "^1.3.9",
|
|
54
54
|
"@types/lodash-es": "^4.17.12",
|
|
55
55
|
"lodash-es": "^4.17.23"
|
|
56
56
|
}
|