Getting current download refactored to work and display less errors

Player component now sends jwt token if logged in
This commit is contained in:
Isaac Grynsztein
2020-04-26 17:34:38 -04:00
parent a7c810136b
commit 912a419bd4
2 changed files with 8 additions and 6 deletions

View File

@@ -183,6 +183,11 @@ export class PlayerComponent implements OnInit {
fullLocation = this.baseStreamPath + baseLocation + encodeURIComponent(fileName) + '?subName=' + this.subscriptionName +
'&subPlaylist=' + this.subPlaylist;
}
// adds user token if in multi-user-mode
if (this.postsService.isLoggedIn) {
fullLocation += '?jwt=' + this.postsService.token;
}
// if it has a slash (meaning it's in a directory), only get the file name for the label
let label = null;
const decodedName = decodeURIComponent(fileName);