cody-music
Version:
mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control
42 lines (41 loc) • 2.26 kB
TypeScript
import { PlayerName } from "./models";
export declare class MusicController {
static readonly WINDOWS_SPOTIFY_TRACK_FIND: string;
private scriptsPath;
private lastVolumeLevel;
private scripts;
private static instance;
private constructor();
static getInstance(): MusicController;
isMusicPlayerActive(player: PlayerName): Promise<boolean>;
stopPlayer(player: PlayerName): Promise<any>;
startPlayer(player: string, options?: any): Promise<any>;
startMacPlayer(player: string, options?: any): Promise<any>;
launchPlayerWithCommand(command: string): Promise<any>;
execScript(player: string, scriptName: string, params?: any, argv?: any): Promise<any>;
run(player: PlayerName, scriptName: string, params?: any, argv?: any): Promise<any>;
setVolume(player: string, volume: number): Promise<any>;
setItunesLoved(loved: boolean): Promise<any>;
playSpotifyDesktopTrack(trackId?: string, playlistId?: string): void;
playTrackInContext(player: string, params: any[]): Promise<any>;
playPauseSpotifyDevice(device_id: string, play: boolean): Promise<import("./models").CodyResponse>;
spotifyWebPlayPlaylist(playlistId: string, startingTrackId?: string, deviceId?: string): Promise<import("./models").CodyResponse>;
spotifyWebPlayTrack(trackId: string, deviceId?: string): Promise<import("./models").CodyResponse>;
spotifyWebPlay(options: any): Promise<import("./models").CodyResponse>;
spotifyWebPause(options: any): Promise<import("./models").CodyResponse>;
spotifyWebPrevious(options: any): Promise<import("./models").CodyResponse>;
spotifyWebNext(options: any): Promise<import("./models").CodyResponse>;
getGenre(artist: string, songName?: string, spotifyArtistId?: string): Promise<string>;
getHighestFrequencySpotifyGenre(genreList: string[]): string;
getGenreFromSpotify(artist: string, spotifyArtistId?: string): Promise<string>;
/**
* Kills the Spotify desktop player if it's running
* @param player {spotify|spotify-web|itunes}
*/
quitApp(player: PlayerName): Promise<any>;
/**
* Launches the desktop player
* @param player {spotify|spotify-web|itunes}
*/
launchApp(player: PlayerName): Promise<any>;
}