Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.09 KB

README.md

File metadata and controls

53 lines (34 loc) · 1.09 KB

Apple-Bridge

Retrieve data from Apple Services on macOS and Windows

Events

  • playing: music
  • paused: music
  • stopped: music
  • timeChange: music
  • jsFileExtensionError: music

JS File Extension Error

Only Windows

This error is thrown when the .js file association data is missing or incorrect. This is not a problem with Apple-Bridge.

Learn more

Example

import { AppleBridge } from "apple-bridge";

const bridge = new AppleBridge();

let musicStatus;

bridge.on("playing", "music", (data) => {
    console.log(data);

    musicStatus = data.playerState; // "playing"
});

bridge.on("paused", "music", (data) => {
    console.log(data);

    musicStatus = data.playerState; // "paused"
});

bridge.on("stopped", "music", (data) => {
    console.log(data);

    musicStatus = data.playerState; // "stopped"
});

Information

  • On Windows, Apple TV and Apple Music data is retrieved from iTunes.
  • On macOS, Apple TV and Apple Music data is retrieved from the respective app.