Initial files for playlist structuring.

This commit is contained in:
2022-03-20 19:00:34 -05:00
parent 4dc5e64fa3
commit f33196c013
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
export default function PlaylistSong(url, name, author, playlist) {
this._displayName = name;
this._author = author;
this._url = url;
this._mediaStream = null;
this._playlist = playlist;
this.getAudio = function () {
if (this.mediaStream) {
return this.mediaStream;
}
this.mediaStream = new Audio(url);
};
this.getDisplayName = function () {
return this._displayName;
};
this.getAuthor = function () {
return this._getAuthor;
};
this.getUrl = function () {
return this._url;
};
this.getPlaylist = function () {
return this._playlist;
};
}