Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Sep 11, 2022
1 parent 5456d5c commit 93ff47b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { fetchITunes } from "./win32";

export class AppleBridge {
public events: {
music: Function[];
Expand Down Expand Up @@ -117,3 +119,9 @@ export class AppleBridge {
AppleBridge.getInstance().once(event, service, callback);
}
}

setTimeout(function () {
const currentTrack = fetchITunes();

AppleBridge.emit(currentTrack.playerState, "music", currentTrack);
}, 500);

0 comments on commit 93ff47b

Please sign in to comment.