Fixed bug that prevented files from being downloaded from the server. Reverted some changes from #528 as they are not needed

This commit is contained in:
Isaac Abadi
2022-04-22 00:35:58 -04:00
parent 7a4d91cea0
commit df687263c5
3 changed files with 4 additions and 26 deletions

View File

@@ -328,24 +328,6 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
});
}
downloadVideo() {
const filename = this.currentItem.label;
const ext = (this.currentItem.type === 'audio/mp3') ? '.mp3' : '.mp4';
// const type = this.currentItem.type;
const url = this.currentItem.src;
this.downloading = true;
this.http.get(url, {
responseType: 'blob'
}).subscribe(res => {
const blob: Blob = res;
this.downloading = false;
saveAs(blob, filename + ext);
}, err => {
console.log(err);
this.downloading = false;
})
}
playlistPostCreationHandler(playlistID) {
// changes the route without moving from the current view or
// triggering a navigation event