@basmilius/apple-devices 0.0.95 → 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.
Files changed (2) hide show
  1. package/dist/index.js +18 -18
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1722,32 +1722,32 @@ class device_default2 extends EventEmitter3 {
1722
1722
  this.#credentials = credentials;
1723
1723
  }
1724
1724
  async getAttentionState() {
1725
- return await this.#protocol.api.getAttentionState();
1725
+ return await this.#protocol.getAttentionState();
1726
1726
  }
1727
1727
  async getLaunchableApps() {
1728
- return await this.#protocol.api.getLaunchableApps();
1728
+ return await this.#protocol.getLaunchableApps();
1729
1729
  }
1730
1730
  async getUserAccounts() {
1731
- return await this.#protocol.api.getUserAccounts();
1731
+ return await this.#protocol.getUserAccounts();
1732
1732
  }
1733
1733
  async launchApp(bundleId) {
1734
- await this.#protocol.api.launchApp(bundleId);
1734
+ await this.#protocol.launchApp(bundleId);
1735
1735
  }
1736
1736
  async launchUrl(url) {
1737
- await this.#protocol.api.launchUrl(url);
1737
+ await this.#protocol.launchUrl(url);
1738
1738
  }
1739
1739
  async mediaControlCommand(command, content) {
1740
- await this.#protocol.api.mediaControlCommand(command, content);
1740
+ await this.#protocol.mediaControlCommand(command, content);
1741
1741
  }
1742
1742
  async pressButton(command, type, holdDelayMs) {
1743
- await this.#protocol.api.pressButton(command, type, holdDelayMs);
1743
+ await this.#protocol.pressButton(command, type, holdDelayMs);
1744
1744
  }
1745
1745
  async switchUserAccount(accountId) {
1746
- await this.#protocol.api.switchUserAccount(accountId);
1746
+ await this.#protocol.switchUserAccount(accountId);
1747
1747
  }
1748
1748
  async#heartbeat() {
1749
1749
  try {
1750
- await this.#protocol.api._systemInfo(this.#credentials.pairingId);
1750
+ await this.#protocol._systemInfo(this.#credentials.pairingId);
1751
1751
  } catch (err) {
1752
1752
  reporter3.error("Heartbeat error", err);
1753
1753
  }
@@ -1772,23 +1772,23 @@ class device_default2 extends EventEmitter3 {
1772
1772
  async#setup() {
1773
1773
  const keys = this.#keys;
1774
1774
  await this.#protocol.socket.enableEncryption(keys.accessoryToControllerKey, keys.controllerToAccessoryKey);
1775
- await this.#protocol.api._systemInfo(this.#credentials.pairingId);
1776
- await this.#protocol.api._touchStart();
1777
- await this.#protocol.api._sessionStart();
1778
- await this.#protocol.api._tvrcSessionStart();
1779
- await this.#protocol.api._unsubscribe("_iMC");
1775
+ await this.#protocol._systemInfo(this.#credentials.pairingId);
1776
+ await this.#protocol._touchStart();
1777
+ await this.#protocol._sessionStart();
1778
+ await this.#protocol._tvrcSessionStart();
1779
+ await this.#protocol._unsubscribe("_iMC");
1780
1780
  this.#heartbeatInterval = setInterval(async () => await this.#heartbeat(), 15000);
1781
1781
  await this.#subscribe();
1782
1782
  }
1783
1783
  async#subscribe() {
1784
- await this.#protocol.api._subscribe("SystemStatus", this.onSystemStatus);
1785
- await this.#protocol.api._subscribe("TVSystemStatus", this.onTVSystemStatus);
1784
+ await this.#protocol._subscribe("SystemStatus", this.onSystemStatus);
1785
+ await this.#protocol._subscribe("TVSystemStatus", this.onTVSystemStatus);
1786
1786
  const state = await this.getAttentionState();
1787
1787
  this.emit("power", state);
1788
1788
  }
1789
1789
  async#unsubscribe() {
1790
- await this.#protocol.api._unsubscribe("SystemStatus", this.onSystemStatus);
1791
- await this.#protocol.api._unsubscribe("TVSystemStatus", this.onTVSystemStatus);
1790
+ await this.#protocol._unsubscribe("SystemStatus", this.onSystemStatus);
1791
+ await this.#protocol._unsubscribe("TVSystemStatus", this.onTVSystemStatus);
1792
1792
  }
1793
1793
  async onSystemStatus(data) {
1794
1794
  reporter3.info("System Status", 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.0.95",
4
+ "version": "0.0.96",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -43,10 +43,10 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@basmilius/apple-airplay": "0.0.95",
47
- "@basmilius/apple-common": "0.0.95",
48
- "@basmilius/apple-companion-link": "0.0.95",
49
- "@basmilius/apple-encoding": "0.0.95"
46
+ "@basmilius/apple-airplay": "0.0.96",
47
+ "@basmilius/apple-common": "0.0.96",
48
+ "@basmilius/apple-companion-link": "0.0.96",
49
+ "@basmilius/apple-encoding": "0.0.96"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@basmilius/tools": "^2.23.0",