Files
common/dist/dataTypes.js
T
2026-05-09 13:12:37 +02:00

61 lines
1.9 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlaylistDescription = exports.Playlist = exports.PlayerControl = exports.PlayingSong = exports.QueuedSong = exports.Song = exports.SongType = void 0;
var SongType;
(function (SongType) {
SongType[SongType["YouTube"] = 0] = "YouTube";
SongType[SongType["Spotify"] = 1] = "Spotify";
})(SongType || (exports.SongType = SongType = {}));
class Song {
constructor(type, title, songId, image, tags, inAutoPlay) {
this.type = type;
this.title = title;
this.songId = songId;
this.image = image;
this.tags = tags;
this.inAutoPlay = inAutoPlay;
}
}
exports.Song = Song;
class QueuedSong extends Song {
constructor(type, title, songId, image, tags, listener, inAutoPlay) {
super(type, title, songId, image, tags, inAutoPlay);
this.listener = listener;
this.inAutoPlay = inAutoPlay;
}
}
exports.QueuedSong = QueuedSong;
class PlayingSong extends QueuedSong {
constructor(type, title, songId, image, tags, listener, inAutoPlay) {
super(type, title, songId, image, tags, listener, inAutoPlay);
this.inAutoPlay = inAutoPlay;
}
}
exports.PlayingSong = PlayingSong;
class PlayerControl {
constructor(type, songId, position, length) {
this.type = type;
this.songId = songId;
this.position = position;
this.length = length;
}
}
exports.PlayerControl = PlayerControl;
class Playlist {
constructor(title, listener, type, songs) {
this.title = title;
this.listener = listener;
this.type = type;
this.songs = songs;
}
}
exports.Playlist = Playlist;
class PlaylistDescription {
constructor(title, listener, type) {
this.title = title;
this.listener = listener;
this.type = type;
}
}
exports.PlaylistDescription = PlaylistDescription;
//# sourceMappingURL=dataTypes.js.map