-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extracted yet more of the domControl into the new tidalController
- Loading branch information
1 parent
f608d42
commit d36bc74
Showing
5 changed files
with
414 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,47 @@ | ||
import { MediaStatus } from "../models/mediaStatus"; | ||
import { RepeatState } from "../models/repeatState"; | ||
|
||
export interface TidalController { | ||
goToHome(): void; | ||
openSettings(): void; | ||
|
||
/** | ||
* Play or pause the current media | ||
*/ | ||
playPause(): void; | ||
play(): void; | ||
pause(): void; | ||
stop(): void; | ||
toggleFavorite(): void; | ||
back(): void; | ||
forward(): void; | ||
repeat(): void; | ||
next(): void; | ||
previous(): void; | ||
toggleShuffle(): void; | ||
|
||
/** | ||
* Hook up the controller to the current web instance | ||
* Update the current status of tidal (e.g playing or paused) | ||
*/ | ||
hookup(): void; | ||
getCurrentlyPlayingStatus(): MediaStatus; | ||
getCurrentShuffleState(): boolean; | ||
getCurrentRepeatState(): RepeatState; | ||
getCurrentPosition(): string; | ||
getCurrentPositionInSeconds(): number; | ||
getTrackId(): string; | ||
getCurrentTime(): string; | ||
getDuration(): string; | ||
getAlbumName(): string; | ||
getTitle(): string; | ||
getArtists(): string[]; | ||
getArtistsString(): string; | ||
getPlayingFrom(): string; | ||
getSongIcon(): string; | ||
|
||
goToHome(): void; | ||
isFavorite(): boolean; | ||
// add an observable to react on instead of a hookup function | ||
// onMediaChange(): any; | ||
|
||
// this can probably be removed after ^ | ||
setPlayStatus(status: MediaStatus): void; | ||
} |
Oops, something went wrong.