39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
export enum SongType {
|
|
YouTube,
|
|
Spotify
|
|
}
|
|
|
|
|
|
export class Song {
|
|
constructor(public type: SongType, public title: string, public songId: string, public image: string, public tags: string[], public inAutoPlay: boolean) {
|
|
|
|
}
|
|
}
|
|
|
|
export class QueuedSong extends Song {
|
|
constructor(type: SongType, title: string, songId: string, image: string, tags: string[], public listener: string, public inAutoPlay: boolean) {
|
|
super(type, title, songId, image, tags, inAutoPlay);
|
|
}
|
|
}
|
|
|
|
export class PlayingSong extends QueuedSong {
|
|
constructor(type: SongType, title: string, songId: string, image: string, tags: string[], listener: string, public inAutoPlay: boolean) {
|
|
super(type, title, songId, image, tags, listener, inAutoPlay);
|
|
}
|
|
}
|
|
|
|
export class PlayerControl {
|
|
constructor(public type: SongType, public songId: string, public position: number, public length: number) {
|
|
}
|
|
}
|
|
|
|
export class Playlist {
|
|
constructor(public title: string, public listener: string, public type: SongType, public songs: Song[]) {
|
|
}
|
|
}
|
|
|
|
export class PlaylistDescription {
|
|
constructor(public title: string, public listener: string, public type: SongType) {
|
|
}
|
|
}
|